Please look at this older post:
http://thread.gmane.org/gmane.comp.java.tapestry.user/27105
Hope that helps.
Ron Piterman wrote:
ok - it seems you don't use jdk1.5. the .page file does not get inherited.
The only solution I can see is copy/paste the <inject to all your .page
defs.
Gentry, Michael (Contractor) wrote:
Since getVisit() and getGlobal() have been deprecated and I need the
visit on every page in my application and the global on some of them, I
decided to try to roll my own solution. I've searched through the
documentation and this list, but still haven't stumbled across the right
magic. What I have is:
AbstractPage (Tapestry)
BasePage (Tapestry)
CommonPage (Mine)
Home/etc (Mine)
In CommonPage.java I have:
public abstract class CommonPage extends BasePage
{
public abstract Application getApplication(); // was getGlobal()
public abstract Session getSession(); // was getVisit()
}
CommonPage.page contains:
...
<inject property="session" type="state" object="session"/>
...
Home extends CommonPage. I also have a hivemodule.xml file. When I
load Home, the session is never injected and getSession returns null.
If I move the <inject...> from CommonPage.page to Home.page, the
injection will occur and I'll get a session. However, I don't want to
have to have an <inject...> in every single .page (seems kind of silly).
Does anyone have suggestions for making this work? I could continue
using getVisit() and getGlobal(), but I really don't want any warnings
(even if they are just deprecation) present in my build. Also, I never
could stumble upon the correct <inject...> syntax for a global object.
Thanks!
/dev/mrg
PS. T4 RC1 with Java 1.4.2.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
__________ NOD32 1.1275 (20051103) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
--
.........................................
Derick Fernando
Lead Architect
[EMAIL PROTECTED]
(323) 314-9593
http://www.thelabllc.com
Content is for intended recipient only.
Copyright 2001-2005, The Lab, LLC
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]