You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jan Vissers <Ja...@cumquat.nl> on 2008/04/18 12:02:25 UTC
T5: How do I access a page property in my component
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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: How do I access a page property in my component
Posted by Jan Vissers <Ja...@cumquat.nl>.
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):
<t:heading t:id="heading" t:size="${basePage.size}" />
Heading class declares getter|setter pair for size and (Heading.java)
@Parameter
private int size;
Heading template itself uses size (Heading.tml):
<li>${size}</li>
Is this the 'best' way?
On Fri, 2008-04-18 at 11:43 +0100, nicholas Krul wrote:
> @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 <t:myComp t:basePage="this" />
>
> (I think)
>
>
> I'd suggest trying the first...
> but, at least you have a solution that works.
>
> --nK
>
> On Fri, Apr 18, 2008 at 11:32 AM, Jan Vissers <Ja...@cumquat.nl>
> wrote:
>
> > 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 :-(
> >
> > -J.
> >
> > On Fri, 2008-04-18 at 12:26 +0200, Jan Vissers wrote:
> > > 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 should the type
> > > be - 'Page'?
> > >
> > > -J.
> > >
> > > On Fri, 2008-04-18 at 11:23 +0100, nicholas Krul wrote:
> > > > bind it as a paramater
> > > >
> > > > @Paramater(required=true) //only if required
> > > > Object needed
> > > >
> > > >
> > > >
> > > > On Fri, Apr 18, 2008 at 11:07 AM, Chris Lewis <
> > chris_lewis@bellsouth.net>
> > > > 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 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 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: users-unsubscribe@tapestry.apache.org
> > > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > > --
> > > > > http://thegodcode.net
> > > > >
> > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: How do I access a page property in my component
Posted by nicholas Krul <ni...@gmail.com>.
'best way' ?
I can tell you what I think is better...
I would suggest that you handle AbstractBasePage -> Layout the same way that
you handle Layout -> Heading.
Let me guess - you want every page to have a title... I was thinking of that
at one stage.
The is a way to get the page class doing the rendering... something like
(Object) getPageClass... (then use instanceof)...
It can be done in the Header itself... but I cant remember how to get it.
ComponentResources getPage looks close... but I don't recall.
On Fri, Apr 18, 2008 at 12:20 PM, Blower, Andy <An...@proquest.co.uk>
wrote:
> Add the @Property annotation to dummy in component class to provide
> getter+setter?
>
> > -----Original Message-----
> > From: Jan Vissers [mailto:Jan.Vissers@cumquat.nl]
> > Sent: 18 April 2008 11:59
> > To: nicholas Krul
> > Cc: Tapestry users
> > Subject: Re: T5: How do I access a page property in my component
> >
> > 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
> > ${dummy}
> >
> > -> without getter in Component class: error
> > -> with getter in Component class: always 0
> >
> > Any other ideas - I must be doing some wrong, right?
> >
> > -J.
> >
> >
> >
> > On Fri, 2008-04-18 at 11:43 +0100, nicholas Krul wrote:
> > > @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 <t:myComp t:basePage="this" />
> > >
> > > (I think)
> > >
> > >
> > > I'd suggest trying the first...
> > > but, at least you have a solution that works.
> > >
> > > --nK
> > >
> > > On Fri, Apr 18, 2008 at 11:32 AM, Jan Vissers
> > <Ja...@cumquat.nl>
> > > wrote:
> > > 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 :-(
> > >
> > > -J.
> > >
> > >
> > > On Fri, 2008-04-18 at 12:26 +0200, Jan Vissers wrote:
> > > > 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
> > > should the type
> > > > be - 'Page'?
> > > >
> > > > -J.
> > > >
> > > > On Fri, 2008-04-18 at 11:23 +0100, nicholas Krul wrote:
> > > > > bind it as a paramater
> > > > >
> > > > > @Paramater(required=true) //only if required
> > > > > Object needed
> > > > >
> > > > >
> > > > >
> > > > > On Fri, Apr 18, 2008 at 11:07 AM, Chris Lewis
> > > <ch...@bellsouth.net>
> > > > > 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 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 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:
> > > users-unsubscribe@tapestry.apache.org
> > > > > > > For additional commands, e-mail:
> > > users-help@tapestry.apache.org
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > > --
> > > > > > http://thegodcode.net
> > > > > >
> > > > > >
> > > > > >
> > > -------------------------------------------------------------
> > --------
> > > > > > To unsubscribe, e-mail:
> > > users-unsubscribe@tapestry.apache.org
> > > > > > For additional commands, e-mail:
> > > users-help@tapestry.apache.org
> > > > > >
> > > > > >
> > > >
> > > >
> > > >
> > > -------------------------------------------------------------
> > --------
> > > > To unsubscribe, e-mail:
> > > users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail:
> > > users-help@tapestry.apache.org
> > > >
> > > >
> > >
> > >
> > > -------------------------------------------------------------
> > --------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail:
> > > users-help@tapestry.apache.org
> > >
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
RE: T5: How do I access a page property in my component
Posted by "Blower, Andy" <An...@proquest.co.uk>.
Add the @Property annotation to dummy in component class to provide getter+setter?
> -----Original Message-----
> From: Jan Vissers [mailto:Jan.Vissers@cumquat.nl]
> Sent: 18 April 2008 11:59
> To: nicholas Krul
> Cc: Tapestry users
> Subject: Re: T5: How do I access a page property in my component
>
> 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
> ${dummy}
>
> -> without getter in Component class: error
> -> with getter in Component class: always 0
>
> Any other ideas - I must be doing some wrong, right?
>
> -J.
>
>
>
> On Fri, 2008-04-18 at 11:43 +0100, nicholas Krul wrote:
> > @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 <t:myComp t:basePage="this" />
> >
> > (I think)
> >
> >
> > I'd suggest trying the first...
> > but, at least you have a solution that works.
> >
> > --nK
> >
> > On Fri, Apr 18, 2008 at 11:32 AM, Jan Vissers
> <Ja...@cumquat.nl>
> > wrote:
> > 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 :-(
> >
> > -J.
> >
> >
> > On Fri, 2008-04-18 at 12:26 +0200, Jan Vissers wrote:
> > > 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
> > should the type
> > > be - 'Page'?
> > >
> > > -J.
> > >
> > > On Fri, 2008-04-18 at 11:23 +0100, nicholas Krul wrote:
> > > > bind it as a paramater
> > > >
> > > > @Paramater(required=true) //only if required
> > > > Object needed
> > > >
> > > >
> > > >
> > > > On Fri, Apr 18, 2008 at 11:07 AM, Chris Lewis
> > <ch...@bellsouth.net>
> > > > 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 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 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:
> > users-unsubscribe@tapestry.apache.org
> > > > > > For additional commands, e-mail:
> > users-help@tapestry.apache.org
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > > --
> > > > > http://thegodcode.net
> > > > >
> > > > >
> > > > >
> > -------------------------------------------------------------
> --------
> > > > > To unsubscribe, e-mail:
> > users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail:
> > users-help@tapestry.apache.org
> > > > >
> > > > >
> > >
> > >
> > >
> > -------------------------------------------------------------
> --------
> > > To unsubscribe, e-mail:
> > users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail:
> > users-help@tapestry.apache.org
> > >
> > >
> >
> >
> > -------------------------------------------------------------
> --------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail:
> > users-help@tapestry.apache.org
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: How do I access a page property in my component
Posted by Jan Vissers <Ja...@cumquat.nl>.
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
${dummy}
-> without getter in Component class: error
-> with getter in Component class: always 0
Any other ideas - I must be doing some wrong, right?
-J.
On Fri, 2008-04-18 at 11:43 +0100, nicholas Krul wrote:
> @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 <t:myComp t:basePage="this" />
>
> (I think)
>
>
> I'd suggest trying the first...
> but, at least you have a solution that works.
>
> --nK
>
> On Fri, Apr 18, 2008 at 11:32 AM, Jan Vissers <Ja...@cumquat.nl>
> wrote:
> 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 :-(
>
> -J.
>
>
> On Fri, 2008-04-18 at 12:26 +0200, Jan Vissers wrote:
> > 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
> should the type
> > be - 'Page'?
> >
> > -J.
> >
> > On Fri, 2008-04-18 at 11:23 +0100, nicholas Krul wrote:
> > > bind it as a paramater
> > >
> > > @Paramater(required=true) //only if required
> > > Object needed
> > >
> > >
> > >
> > > On Fri, Apr 18, 2008 at 11:07 AM, Chris Lewis
> <ch...@bellsouth.net>
> > > 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 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 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:
> users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail:
> users-help@tapestry.apache.org
> > > > >
> > > > >
> > > > >
> > > >
> > > > --
> > > > http://thegodcode.net
> > > >
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail:
> users-help@tapestry.apache.org
> > > >
> > > >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail:
> users-help@tapestry.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail:
> users-help@tapestry.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: How do I access a page property in my component
Posted by nicholas Krul <ni...@gmail.com>.
@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 <t:myComp t:basePage="this" />
(I think)
I'd suggest trying the first...
but, at least you have a solution that works.
--nK
On Fri, Apr 18, 2008 at 11:32 AM, Jan Vissers <Ja...@cumquat.nl>
wrote:
> 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 :-(
>
> -J.
>
> On Fri, 2008-04-18 at 12:26 +0200, Jan Vissers wrote:
> > 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 should the type
> > be - 'Page'?
> >
> > -J.
> >
> > On Fri, 2008-04-18 at 11:23 +0100, nicholas Krul wrote:
> > > bind it as a paramater
> > >
> > > @Paramater(required=true) //only if required
> > > Object needed
> > >
> > >
> > >
> > > On Fri, Apr 18, 2008 at 11:07 AM, Chris Lewis <
> chris_lewis@bellsouth.net>
> > > 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 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 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: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> > > > >
> > > >
> > > > --
> > > > http://thegodcode.net
> > > >
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: T5: How do I access a page property in my component - PagePool
Page Page[Start en] is dirty
Posted by Chris Lewis <ch...@bellsouth.net>.
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 pages, components or mixins packages, because
they then look like valid pages, components or mixins. Instead, use the
root.base package to store such base classes."
So if you have a package structure:
my.company.components
my.company.pages
Then your abstract/base classes should go in something else.
Specifically not in a directory controlled by T5 such as 'pages' or
components. You are encouraged to use 'base':
my.company.base
chris
Jan Vissers wrote:
> 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.InstantiationError:
> com.*****.lighting.guidecontrol.view.pages.AbstractBasePage
> at
> $Instantiator_119611f8cd5.newInstance($Instantiator_119611f8cd5.java)
> at
> org.apache.tapestry.internal.structure.InternalComponentResourcesImpl.<init>(InternalComponentResourcesImpl.java:79)
> at
> org.apache.tapestry.internal.structure.ComponentPageElementImpl.<init>(ComponentPageElementImpl.java:571)
> at
> org.apache.tapestry.internal.structure.ComponentPageElementImpl.<init>(ComponentPageElementImpl.java:582)
> at
> org.apache.tapestry.internal.services.PageElementFactoryImpl.newRootComponentElement(PageElementFactoryImpl.java:261)
> at
> $PageElementFactory_119611f8c78.newRootComponentElement($PageElementFactory_119611f8c78.java)
> at
> org.apache.tapestry.internal.services.PageLoaderProcessor.loadRootComponent(PageLoaderProcessor.java:412)
> at
> org.apache.tapestry.internal.services.PageLoaderProcessor.loadPage(PageLoaderProcessor.java:390)
> at
> org.apache.tapestry.internal.services.PageLoaderImpl.loadPage(PageLoaderImpl.java:59)
> at $PageLoader_119611f8c76.loadPage($PageLoader_119611f8c76.java)
> at
> org.apache.tapestry.internal.services.PagePoolCache.checkout(PagePoolCache.java:188)
> at
> org.apache.tapestry.internal.services.PagePoolImpl.checkout(PagePoolImpl.java:107)
> at $PagePool_119611f8c75.checkout($PagePool_119611f8c75.java)
> at
> org.apache.tapestry.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:43)
> at
> $RequestPageCache_119611f8c74.get($RequestPageCache_119611f8c74.java)
> at
> $RequestPageCache_119611f8c3f.get($RequestPageCache_119611f8c3f.java)
> at com.*****.lighting.guidecontrol.view.components.Heading._
> $read_inject_page_basePage(Heading.java)
> at
> com.*****.lighting.guidecontrol.view.components.Heading.getBasePage(Heading.java:42)
> at $PropertyConduit_119611f8ca6.get($PropertyConduit_119611f8ca6.java)
> at
> org.apache.tapestry.internal.bindings.PropBinding.get(PropBinding.java:53)
> at
> org.apache.tapestry.internal.structure.ExpansionPageElement.render(ExpansionPageElement.java:47)
> at
> org.apache.tapestry.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:63)
> at
> org.apache.tapestry.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:84)
> at
> $PageRenderQueue_119611f8cb7.render($PageRenderQueue_119611f8cb7.java)
> at
> $PageRenderQueue_119611f8cb0.render($PageRenderQueue_119611f8cb0.java)
> at org.apache.tapestry.services.TapestryModule
> $19.renderMarkup(TapestryModule.java:1293)
> at org.apache.tapestry.services.TapestryModule
> $23.renderMarkup(TapestryModule.java:1402)
> at
> $MarkupRenderer_119611f8cb9.renderMarkup($MarkupRenderer_119611f8cb9.java)
> at org.apache.tapestry.services.TapestryModule
> $22.renderMarkup(TapestryModule.java:1383)
> at
> $MarkupRenderer_119611f8cb9.renderMarkup($MarkupRenderer_119611f8cb9.java)
> at org.apache.tapestry.services.TapestryModule
> $21.renderMarkup(TapestryModule.java:1365)
> at
> $MarkupRenderer_119611f8cb9.renderMarkup($MarkupRenderer_119611f8cb9.java)
> at org.apache.tapestry.services.TapestryModule
> $20.renderMarkup(TapestryModule.java:1347)
> at
> $MarkupRenderer_119611f8cb9.renderMarkup($MarkupRenderer_119611f8cb9.java)
> at
> $MarkupRenderer_119611f8cb5.renderMarkup($MarkupRenderer_119611f8cb5.java)
> at
> org.apache.tapestry.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:55)
> at
> $PageMarkupRenderer_119611f8cb3.renderPageMarkup($PageMarkupRenderer_119611f8cb3.java)
> at
> org.apache.tapestry.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:57)
> at
> $PageResponseRenderer_119611f8c6e.renderPageResponse($PageResponseRenderer_119611f8c6e.java)
> at
> org.apache.tapestry.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:59)
> at org.apache.tapestry.services.TapestryModule
> $29.handle(TapestryModule.java:1607)
> at
> $PageRenderRequestHandler_119611f8c6f.handle($PageRenderRequestHandler_119611f8c6f.java)
> at
> $PageRenderRequestHandler_119611f8c64.handle($PageRenderRequestHandler_119611f8c64.java)
> at
> org.apache.tapestry.internal.services.RootPathDispatcher.dispatch(RootPathDispatcher.java:61)
> at $Dispatcher_119611f8c6b.dispatch($Dispatcher_119611f8c6b.java)
> at $Dispatcher_119611f8c5d.dispatch($Dispatcher_119611f8c5d.java)
> at org.apache.tapestry.services.TapestryModule
> $13.service(TapestryModule.java:944)
> at com.*****.lighting.guidecontrol.view.services.AppModule
> $1.service(AppModule.java:70)
> at $RequestFilter_119611f8c5c.service($RequestFilter_119611f8c5c.java)
> at
> $RequestHandler_119611f8c5e.service($RequestHandler_119611f8c5e.java)
> at
> org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:42)
> at
> $RequestHandler_119611f8c5e.service($RequestHandler_119611f8c5e.java)
> at org.apache.tapestry.services.TapestryModule
> $3.service(TapestryModule.java:553)
> at
> $RequestHandler_119611f8c5e.service($RequestHandler_119611f8c5e.java)
> at org.apache.tapestry.services.TapestryModule
> $2.service(TapestryModule.java:520)
> at
> $RequestHandler_119611f8c5e.service($RequestHandler_119611f8c5e.java)
> at
> org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79)
> at
> $RequestHandler_119611f8c5e.service($RequestHandler_119611f8c5e.java)
> at org.apache.tapestry.internal.services.CheckForUpdatesFilter
> $2.invoke(CheckForUpdatesFilter.java:93)
> at org.apache.tapestry.internal.services.CheckForUpdatesFilter
> $2.invoke(CheckForUpdatesFilter.java:84)
> at
> org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
> at
> org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:106)
> at
> $RequestHandler_119611f8c5e.service($RequestHandler_119611f8c5e.java)
> at
> $RequestHandler_119611f8c55.service($RequestHandler_119611f8c55.java)
> at org.apache.tapestry.services.TapestryModule
> $12.service(TapestryModule.java:924)
> at
> org.apache.tapestry.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
> at
> $HttpServletRequestFilter_119611f8c54.service($HttpServletRequestFilter_119611f8c54.java)
> at
> $HttpServletRequestHandler_119611f8c56.service($HttpServletRequestHandler_119611f8c56.java)
> at
> $HttpServletRequestHandler_119611f8c53.service($HttpServletRequestHandler_119611f8c53.java)
> at org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:168)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> at org.apache.coyote.http11.Http11Protocol
> $Http11ConnectionHandler.process(Http11Protocol.java:583)
> at org.apache.tomcat.util.net.JIoEndpoint
> $Worker.run(JIoEndpoint.java:447)
> at java.lang.Thread.run(Thread.java:735)
> [ERROR] PagePool Page Page[Start en] is dirty, and will be discarded
> (rather than returned to the page pool).
>
>
>
> On Fri, 2008-04-18 at 12:32 +0200, Jan Vissers wrote:
>
>> 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 :-(
>>
>> -J.
>>
>> On Fri, 2008-04-18 at 12:26 +0200, Jan Vissers wrote:
>>
>>> 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 should the type
>>> be - 'Page'?
>>>
>>> -J.
>>>
>>> On Fri, 2008-04-18 at 11:23 +0100, nicholas Krul wrote:
>>>
>>>> bind it as a paramater
>>>>
>>>> @Paramater(required=true) //only if required
>>>> Object needed
>>>>
>>>>
>>>>
>>>> On Fri, Apr 18, 2008 at 11:07 AM, Chris Lewis <ch...@bellsouth.net>
>>>> 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 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 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: users-unsubscribe@tapestry.apache.org
>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> --
>>>>> http://thegodcode.net
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>>>
>>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
--
http://thegodcode.net
Re: T5: How do I access a page property in my component - PagePool
Page Page[Start en] is dirty
Posted by Jan Vissers <Ja...@cumquat.nl>.
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.InstantiationError:
com.*****.lighting.guidecontrol.view.pages.AbstractBasePage
at
$Instantiator_119611f8cd5.newInstance($Instantiator_119611f8cd5.java)
at
org.apache.tapestry.internal.structure.InternalComponentResourcesImpl.<init>(InternalComponentResourcesImpl.java:79)
at
org.apache.tapestry.internal.structure.ComponentPageElementImpl.<init>(ComponentPageElementImpl.java:571)
at
org.apache.tapestry.internal.structure.ComponentPageElementImpl.<init>(ComponentPageElementImpl.java:582)
at
org.apache.tapestry.internal.services.PageElementFactoryImpl.newRootComponentElement(PageElementFactoryImpl.java:261)
at
$PageElementFactory_119611f8c78.newRootComponentElement($PageElementFactory_119611f8c78.java)
at
org.apache.tapestry.internal.services.PageLoaderProcessor.loadRootComponent(PageLoaderProcessor.java:412)
at
org.apache.tapestry.internal.services.PageLoaderProcessor.loadPage(PageLoaderProcessor.java:390)
at
org.apache.tapestry.internal.services.PageLoaderImpl.loadPage(PageLoaderImpl.java:59)
at $PageLoader_119611f8c76.loadPage($PageLoader_119611f8c76.java)
at
org.apache.tapestry.internal.services.PagePoolCache.checkout(PagePoolCache.java:188)
at
org.apache.tapestry.internal.services.PagePoolImpl.checkout(PagePoolImpl.java:107)
at $PagePool_119611f8c75.checkout($PagePool_119611f8c75.java)
at
org.apache.tapestry.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:43)
at
$RequestPageCache_119611f8c74.get($RequestPageCache_119611f8c74.java)
at
$RequestPageCache_119611f8c3f.get($RequestPageCache_119611f8c3f.java)
at com.*****.lighting.guidecontrol.view.components.Heading._
$read_inject_page_basePage(Heading.java)
at
com.*****.lighting.guidecontrol.view.components.Heading.getBasePage(Heading.java:42)
at $PropertyConduit_119611f8ca6.get($PropertyConduit_119611f8ca6.java)
at
org.apache.tapestry.internal.bindings.PropBinding.get(PropBinding.java:53)
at
org.apache.tapestry.internal.structure.ExpansionPageElement.render(ExpansionPageElement.java:47)
at
org.apache.tapestry.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:63)
at
org.apache.tapestry.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:84)
at
$PageRenderQueue_119611f8cb7.render($PageRenderQueue_119611f8cb7.java)
at
$PageRenderQueue_119611f8cb0.render($PageRenderQueue_119611f8cb0.java)
at org.apache.tapestry.services.TapestryModule
$19.renderMarkup(TapestryModule.java:1293)
at org.apache.tapestry.services.TapestryModule
$23.renderMarkup(TapestryModule.java:1402)
at
$MarkupRenderer_119611f8cb9.renderMarkup($MarkupRenderer_119611f8cb9.java)
at org.apache.tapestry.services.TapestryModule
$22.renderMarkup(TapestryModule.java:1383)
at
$MarkupRenderer_119611f8cb9.renderMarkup($MarkupRenderer_119611f8cb9.java)
at org.apache.tapestry.services.TapestryModule
$21.renderMarkup(TapestryModule.java:1365)
at
$MarkupRenderer_119611f8cb9.renderMarkup($MarkupRenderer_119611f8cb9.java)
at org.apache.tapestry.services.TapestryModule
$20.renderMarkup(TapestryModule.java:1347)
at
$MarkupRenderer_119611f8cb9.renderMarkup($MarkupRenderer_119611f8cb9.java)
at
$MarkupRenderer_119611f8cb5.renderMarkup($MarkupRenderer_119611f8cb5.java)
at
org.apache.tapestry.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:55)
at
$PageMarkupRenderer_119611f8cb3.renderPageMarkup($PageMarkupRenderer_119611f8cb3.java)
at
org.apache.tapestry.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:57)
at
$PageResponseRenderer_119611f8c6e.renderPageResponse($PageResponseRenderer_119611f8c6e.java)
at
org.apache.tapestry.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:59)
at org.apache.tapestry.services.TapestryModule
$29.handle(TapestryModule.java:1607)
at
$PageRenderRequestHandler_119611f8c6f.handle($PageRenderRequestHandler_119611f8c6f.java)
at
$PageRenderRequestHandler_119611f8c64.handle($PageRenderRequestHandler_119611f8c64.java)
at
org.apache.tapestry.internal.services.RootPathDispatcher.dispatch(RootPathDispatcher.java:61)
at $Dispatcher_119611f8c6b.dispatch($Dispatcher_119611f8c6b.java)
at $Dispatcher_119611f8c5d.dispatch($Dispatcher_119611f8c5d.java)
at org.apache.tapestry.services.TapestryModule
$13.service(TapestryModule.java:944)
at com.*****.lighting.guidecontrol.view.services.AppModule
$1.service(AppModule.java:70)
at $RequestFilter_119611f8c5c.service($RequestFilter_119611f8c5c.java)
at
$RequestHandler_119611f8c5e.service($RequestHandler_119611f8c5e.java)
at
org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:42)
at
$RequestHandler_119611f8c5e.service($RequestHandler_119611f8c5e.java)
at org.apache.tapestry.services.TapestryModule
$3.service(TapestryModule.java:553)
at
$RequestHandler_119611f8c5e.service($RequestHandler_119611f8c5e.java)
at org.apache.tapestry.services.TapestryModule
$2.service(TapestryModule.java:520)
at
$RequestHandler_119611f8c5e.service($RequestHandler_119611f8c5e.java)
at
org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79)
at
$RequestHandler_119611f8c5e.service($RequestHandler_119611f8c5e.java)
at org.apache.tapestry.internal.services.CheckForUpdatesFilter
$2.invoke(CheckForUpdatesFilter.java:93)
at org.apache.tapestry.internal.services.CheckForUpdatesFilter
$2.invoke(CheckForUpdatesFilter.java:84)
at
org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
at
org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:106)
at
$RequestHandler_119611f8c5e.service($RequestHandler_119611f8c5e.java)
at
$RequestHandler_119611f8c55.service($RequestHandler_119611f8c55.java)
at org.apache.tapestry.services.TapestryModule
$12.service(TapestryModule.java:924)
at
org.apache.tapestry.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
at
$HttpServletRequestFilter_119611f8c54.service($HttpServletRequestFilter_119611f8c54.java)
at
$HttpServletRequestHandler_119611f8c56.service($HttpServletRequestHandler_119611f8c56.java)
at
$HttpServletRequestHandler_119611f8c53.service($HttpServletRequestHandler_119611f8c53.java)
at org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:168)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint
$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:735)
[ERROR] PagePool Page Page[Start en] is dirty, and will be discarded
(rather than returned to the page pool).
On Fri, 2008-04-18 at 12:32 +0200, Jan Vissers wrote:
> 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 :-(
>
> -J.
>
> On Fri, 2008-04-18 at 12:26 +0200, Jan Vissers wrote:
> > 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 should the type
> > be - 'Page'?
> >
> > -J.
> >
> > On Fri, 2008-04-18 at 11:23 +0100, nicholas Krul wrote:
> > > bind it as a paramater
> > >
> > > @Paramater(required=true) //only if required
> > > Object needed
> > >
> > >
> > >
> > > On Fri, Apr 18, 2008 at 11:07 AM, Chris Lewis <ch...@bellsouth.net>
> > > 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 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 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: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> > > > >
> > > >
> > > > --
> > > > http://thegodcode.net
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: How do I access a page property in my component
Posted by Jan Vissers <Ja...@cumquat.nl>.
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 :-(
-J.
On Fri, 2008-04-18 at 12:26 +0200, Jan Vissers wrote:
> 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 should the type
> be - 'Page'?
>
> -J.
>
> On Fri, 2008-04-18 at 11:23 +0100, nicholas Krul wrote:
> > bind it as a paramater
> >
> > @Paramater(required=true) //only if required
> > Object needed
> >
> >
> >
> > On Fri, Apr 18, 2008 at 11:07 AM, Chris Lewis <ch...@bellsouth.net>
> > 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 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 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: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > > >
> > >
> > > --
> > > http://thegodcode.net
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: How do I access a page property in my component
Posted by Jan Vissers <Ja...@cumquat.nl>.
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 should the type
be - 'Page'?
-J.
On Fri, 2008-04-18 at 11:23 +0100, nicholas Krul wrote:
> bind it as a paramater
>
> @Paramater(required=true) //only if required
> Object needed
>
>
>
> On Fri, Apr 18, 2008 at 11:07 AM, Chris Lewis <ch...@bellsouth.net>
> 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 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 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: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> > >
> >
> > --
> > http://thegodcode.net
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: How do I access a page property in my component
Posted by nicholas Krul <ni...@gmail.com>.
bind it as a paramater
@Paramater(required=true) //only if required
Object needed
On Fri, Apr 18, 2008 at 11:07 AM, Chris Lewis <ch...@bellsouth.net>
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 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 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: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> >
>
> --
> http://thegodcode.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: T5: How do I access a page property in my component
Posted by Chris Lewis <ch...@bellsouth.net>.
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 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
--
http://thegodcode.net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org