Hi,
The problem here is that the "object" attribute is not resolved in the
InjectPageWorker class (have a look at
org.apache.tapestry.enhance.InjectPageWorker:66), so passing in anything
but a String will not yield a valid page name.
This should probably be fixed, although care must be taken not to break
backwards-compatibility, since you need to resolve the object - that is,
handle prefixes and so on - and this would require a "literal:" in front
of hardcoded page names.
I'm on my way out the door to visit some family - happy Easter, by the
way : ) - but will look into this and possibly provide a solution when I
get home later tonight.
-Filip
On 4/10/06, Mike Snare <[EMAIL PROTECTED]> wrote:
I have a central repository (PageConstants.java) for page names. I
need to inject a page into another. The problem is that It doesn't
seem to work to inject the actual name of the page.
Let's say I have a page named Foo. I would therefore have the
following in PageConstants.java:
public static final String FOO_PAGE = "Foo";
Then, in my page file i'd like to use the FOO_PAGE member for the injection:
<inject property="fooPage" type="page"
object="@[EMAIL PROTECTED]"/> But that doesn't work. I get the following error:
Exception invoking listener method showInfo of component Bar: Page
'@[EMAIL PROTECTED] not found in application
namespace.
So i try to add an ognl prefix:
<inject property="viewPage" type="page"
object="ognl:@[EMAIL PROTECTED]"/> >> But that doesn't work either:
Exception invoking listener method showInfo of component Bar: Library
'ognl' not found in application namespace.
I'm using Tap4, java1.4 (1.5 is not an option, so no annotation
suggestions, please).
Any ideas what I'm doing wrong or how to fix it?
I can just inject the name and get the page myself, but I'd rather not
if I don't have to.
-Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]