Re: T5: How do I access a page property in my component - PagePool Page Page[Start en] is dirty

2008-04-18 Thread Chris Lewis
Move your abstract page out of your pages package. http://tapestry.apache.org/tapestry5/tapestry-core/guide/component-classes.html: "In addition, it is common for an application to have base classes, often abstract base classes, that should not be directly referenced. These should not go in the p

Re: T5: How do I access a page property in my component

2008-04-18 Thread nicholas Krul
ROTECTED]> wrote: > Add the @Property annotation to dummy in component class to provide > getter+setter? > > > -Original Message- > > From: Jan Vissers [mailto:[EMAIL PROTECTED] > > Sent: 18 April 2008 11:59 > > To: nicholas Krul > > Cc: Tapestr

RE: T5: How do I access a page property in my component

2008-04-18 Thread Blower, Andy
Add the @Property annotation to dummy in component class to provide getter+setter? > -Original Message- > From: Jan Vissers [mailto:[EMAIL PROTECTED] > Sent: 18 April 2008 11:59 > To: nicholas Krul > Cc: Tapestry users > Subject: Re: T5: How do I access a page proper

Re: T5: How do I access a page property in my component

2008-04-18 Thread Jan Vissers
Somehow got it working: AbstractBasePage (AbstractBasePage.java) declares: public int getSize() { return 57575; //Test } Layout declares (Layout.java): @InjectContainer private AbstractBasePage basePage; Heading component on Layout template declares (Layout.tml): Heading

Re: T5: How do I access a page property in my component

2008-04-18 Thread Jan Vissers
This approach doesn't work. Top level class-> public abstract class AbstractBasePage { private int dummy; public int getDummy() { return 14575; //Test } } Component class (which is part of Layout) @Parameter private int dummy; Component template ${d

Re: T5: How do I access a page property in my component

2008-04-18 Thread nicholas Krul
@Paramater per property required. If you need access to all of them as a bundle, consider wrapping them into a class. ... or (I guess) you could use @Parameter private MyBasePageClass basePage; and make sure that the MyBasePageClass has a getThis(return this;) method bind as (I think) I'd

Re: T5: How do I access a page property in my component - PagePool Page Page[Start en] is dirty

2008-04-18 Thread Jan Vissers
Noticed the @InjectPage annotation and tried that - as the javadoc talked about accessing read only properties of a page. However I get this: [ERROR] RequestExceptionHandler Processing of request failed with uncaught exception: com.*.lighting.guidecontrol.view.pages.AbstractBasePage java.lang.

Re: T5: How do I access a page property in my component

2008-04-18 Thread Jan Vissers
Ok - figured out what @InjectContainer gives me. Although I'm not quite happy with it, as it returns another component, which contains the component - but not the actual page. This is one level further up the foodchain for me ;-) Would be nice to have a direct way to access page properties :-( -

Re: T5: How do I access a page property in my component

2008-04-18 Thread Jan Vissers
Thanks - but I don't understand... What is the parameter - the containing page? Basically I want to access a property from my 'AbstractBasePage' which has some common properties on it from a component that is placed on a concrete page. @Chris: regarding your hint of @InjectContainer...? what sho

Re: T5: How do I access a page property in my component

2008-04-18 Thread nicholas Krul
bind it as a paramater @Paramater(required=true) //only if required Object needed On Fri, Apr 18, 2008 at 11:07 AM, Chris Lewis <[EMAIL PROTECTED]> wrote: > Jan, > > There's probably a simpler way, but you should be able to use > @InjectContainer in your component to get the page and call what

Re: T5: How do I access a page property in my component

2008-04-18 Thread Chris Lewis
Jan, There's probably a simpler way, but you should be able to use @InjectContainer in your component to get the page and call whatever methods (in your case a a getter) you want. I imagine there's a more terse way, but I'm not sure what it would be. chris Jan Vissers wrote: > Hi, > > I want to

T5: How do I access a page property in my component

2008-04-18 Thread Jan Vissers
Hi, I want to access a page property from within my component - that has been placed on that page. In T4 I had something like 'page.' - how is this done in T5? Thx, -J. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional