You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by mike jones <mi...@gmail.com> on 2005/11/06 16:22:19 UTC

Injecting ASO in the .page file

Hi
Quick question I am trying to inject a state object into my page class
through a declaration in the .page file but I keep getting an error.

After reading
http://jakarta.apache.org/tapestry/UsersGuide/state.html#state.aso.access I
have

<contribution configuration-id="tapestry.state.ApplicationObjects">
<state-object name="blogVisit" scope="session">
<create-instance class="
org.mikejones.coriolis.tapestry.framework.aso.BlogVisit"/>
</state-object>
</contribution>

and

<inject name="blogVisit" type="state" object="state:blogVisit"/>

however I guessed that the documentation was wrong because name is not a
valid property so I changed it to

<inject property="blogVisit" type="state" object="state:blogVisit"/>

but get 'state:blogVisit' is not a declared application state object.'

However when I do it through annotations eg

@InjectState("blogVisit")
public abstract BlogVisit getBlogVisit();

it works fine.

cheers
Mike

--
d-_-b \m/(>_<)\m/ (9ò_ó)-o(@_o)

Re: Injecting ASO in the .page file

Posted by mike jones <mi...@gmail.com>.
However it the if component now returns false if a log out link as added to
the page.

<span jwcid="@ServiceLink" service="ognl:@org.apache.tapestry.Tapestry
@RESTART_SERVICE">Logout</span>



On 07/11/05, mike jones <mi...@gmail.com> wrote:
>
> For anyone who is interested the problem was solved by fixing all the
> genertic type warnings in the project!
>
> On 07/11/05, mike jones < michael.daniel.jones@gmail.com> wrote:
> >
> > Hi Shing :)
> > Yeah I fixed that, the problem I have no is that
> >
> > <span jwcid="@If" condition="state:blogVisit" > always returns false
> >
> >
> >
> > On 07/11/05, Shing Hing Man <matmsh@yahoo.com > wrote:
> > >
> > >
> > > > <inject property="blogVisit" type="state"
> > > > object="state:blogVisit"/>
> > > >
> > >
> > > Instead of state:blogVisit, have you tried blogVisit ?
> > > Have you lookat at
> > > http://jakarta.apache.org/tapestry/UsersGuide/state.html#state.aso
> > >
> > >
> > > Shing
> > >
> > >
> > > --- mike jones < michael.daniel.jones@gmail.com> wrote:
> > >
> > > > Hi
> > > > Quick question I am trying to inject a state object
> > > > into my page class
> > > > through a declaration in the .page file but I keep
> > > > getting an error.
> > > >
> > > > After reading
> > > >
> > >
> > > http://jakarta.apache.org/tapestry/UsersGuide/state.html#state.aso.access
> > > > I
> > > > have
> > > >
> > > > <contribution
> > > >
> > > configuration-id="tapestry.state.ApplicationObjects">
> > > > <state-object name="blogVisit" scope="session">
> > > > <create-instance class="
> > > >
> > > org.mikejones.coriolis.tapestry.framework.aso.BlogVisit"/>
> > > > </state-object>
> > > > </contribution>
> > > >
> > > > and
> > > >
> > > > <inject name="blogVisit" type="state"
> > > > object="state:blogVisit"/>
> > > >
> > > > however I guessed that the documentation was wrong
> > > > because name is not a
> > > > valid property so I changed it to
> > > >
> > > > <inject property="blogVisit" type="state"
> > > > object="state:blogVisit"/>
> > > >
> > > > but get 'state:blogVisit' is not a declared
> > > > application state object.'
> > > >
> > > > However when I do it through annotations eg
> > > >
> > > > @InjectState("blogVisit")
> > > > public abstract BlogVisit getBlogVisit();
> > > >
> > > > it works fine.
> > > >
> > > > cheers
> > > > Mike
> > > >
> > > > --
> > > > d-_-b \m/(>_<)\m/ (9ò_ó)-o(@_o)
> > > >
> > >
> > >
> > > Home page :
> > >  http://uk.geocities.com/matmsh/index.html
> > >
> > >
> > >
> > > ___________________________________________________________
> > > To help you stay safe and secure online, we've developed the all new
> > > Yahoo! Security Centre. http://uk.security.yahoo.com
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> > --
> > d-_-b \m/(>_<)\m/ (9ò_ó)-o(@_o)
> >
>
>
>
> --
> d-_-b \m/(>_<)\m/ (9ò_ó)-o(@_o)
>



--
d-_-b \m/(>_<)\m/ (9ò_ó)-o(@_o)

Re: Injecting ASO in the .page file

Posted by mike jones <mi...@gmail.com>.
For anyone who is interested the problem was solved by fixing all the
genertic type warnings in the project!

On 07/11/05, mike jones <mi...@gmail.com> wrote:
>
> Hi Shing :)
> Yeah I fixed that, the problem I have no is that
>
> <span jwcid="@If" condition="state:blogVisit" > always returns false
>
>
>
> On 07/11/05, Shing Hing Man <ma...@yahoo.com> wrote:
> >
> >
> > > <inject property="blogVisit" type="state"
> > > object="state:blogVisit"/>
> > >
> >
> > Instead of state:blogVisit, have you tried blogVisit ?
> > Have you lookat at
> > http://jakarta.apache.org/tapestry/UsersGuide/state.html#state.aso
> >
> >
> > Shing
> >
> >
> > --- mike jones <mi...@gmail.com> wrote:
> >
> > > Hi
> > > Quick question I am trying to inject a state object
> > > into my page class
> > > through a declaration in the .page file but I keep
> > > getting an error.
> > >
> > > After reading
> > >
> >
> > http://jakarta.apache.org/tapestry/UsersGuide/state.html#state.aso.access
> > > I
> > > have
> > >
> > > <contribution
> > >
> > configuration-id="tapestry.state.ApplicationObjects">
> > > <state-object name="blogVisit" scope="session">
> > > <create-instance class="
> > >
> > org.mikejones.coriolis.tapestry.framework.aso.BlogVisit"/>
> > > </state-object>
> > > </contribution>
> > >
> > > and
> > >
> > > <inject name="blogVisit" type="state"
> > > object="state:blogVisit"/>
> > >
> > > however I guessed that the documentation was wrong
> > > because name is not a
> > > valid property so I changed it to
> > >
> > > <inject property="blogVisit" type="state"
> > > object="state:blogVisit"/>
> > >
> > > but get 'state:blogVisit' is not a declared
> > > application state object.'
> > >
> > > However when I do it through annotations eg
> > >
> > > @InjectState("blogVisit")
> > > public abstract BlogVisit getBlogVisit();
> > >
> > > it works fine.
> > >
> > > cheers
> > > Mike
> > >
> > > --
> > > d-_-b \m/(>_<)\m/ (9ò_ó)-o(@_o)
> > >
> >
> >
> > Home page :
> >  http://uk.geocities.com/matmsh/index.html
> >
> >
> >
> > ___________________________________________________________
> > To help you stay safe and secure online, we've developed the all new
> > Yahoo! Security Centre. http://uk.security.yahoo.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
>
> --
> d-_-b \m/(>_<)\m/ (9ò_ó)-o(@_o)
>



--
d-_-b \m/(>_<)\m/ (9ò_ó)-o(@_o)

Re: Injecting ASO in the .page file

Posted by mike jones <mi...@gmail.com>.
Hi Shing :)
Yeah I fixed that, the problem I have no is that

<span jwcid="@If" condition="state:blogVisit" > always returns false



On 07/11/05, Shing Hing Man <ma...@yahoo.com> wrote:
>
>
> > <inject property="blogVisit" type="state"
> > object="state:blogVisit"/>
> >
>
> Instead of state:blogVisit, have you tried blogVisit ?
> Have you lookat at
> http://jakarta.apache.org/tapestry/UsersGuide/state.html#state.aso
>
>
> Shing
>
>
> --- mike jones <mi...@gmail.com> wrote:
>
> > Hi
> > Quick question I am trying to inject a state object
> > into my page class
> > through a declaration in the .page file but I keep
> > getting an error.
> >
> > After reading
> >
> http://jakarta.apache.org/tapestry/UsersGuide/state.html#state.aso.access
> > I
> > have
> >
> > <contribution
> >
> configuration-id="tapestry.state.ApplicationObjects">
> > <state-object name="blogVisit" scope="session">
> > <create-instance class="
> >
> org.mikejones.coriolis.tapestry.framework.aso.BlogVisit"/>
> > </state-object>
> > </contribution>
> >
> > and
> >
> > <inject name="blogVisit" type="state"
> > object="state:blogVisit"/>
> >
> > however I guessed that the documentation was wrong
> > because name is not a
> > valid property so I changed it to
> >
> > <inject property="blogVisit" type="state"
> > object="state:blogVisit"/>
> >
> > but get 'state:blogVisit' is not a declared
> > application state object.'
> >
> > However when I do it through annotations eg
> >
> > @InjectState("blogVisit")
> > public abstract BlogVisit getBlogVisit();
> >
> > it works fine.
> >
> > cheers
> > Mike
> >
> > --
> > d-_-b \m/(>_<)\m/ (9ò_ó)-o(@_o)
> >
>
>
> Home page :
> http://uk.geocities.com/matmsh/index.html
>
>
>
> ___________________________________________________________
> To help you stay safe and secure online, we've developed the all new
> Yahoo! Security Centre. http://uk.security.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


--
d-_-b \m/(>_<)\m/ (9ò_ó)-o(@_o)

Re: Injecting ASO in the .page file

Posted by Shing Hing Man <ma...@yahoo.com>.
> <inject property="blogVisit" type="state"
> object="state:blogVisit"/>
> 

Instead of state:blogVisit, have you tried blogVisit ?
Have you lookat at 
http://jakarta.apache.org/tapestry/UsersGuide/state.html#state.aso


Shing 


--- mike jones <mi...@gmail.com> wrote:

> Hi
> Quick question I am trying to inject a state object
> into my page class
> through a declaration in the .page file but I keep
> getting an error.
> 
> After reading
>
http://jakarta.apache.org/tapestry/UsersGuide/state.html#state.aso.access
> I
> have
> 
> <contribution
>
configuration-id="tapestry.state.ApplicationObjects">
> <state-object name="blogVisit" scope="session">
> <create-instance class="
>
org.mikejones.coriolis.tapestry.framework.aso.BlogVisit"/>
> </state-object>
> </contribution>
> 
> and
> 
> <inject name="blogVisit" type="state"
> object="state:blogVisit"/>
> 
> however I guessed that the documentation was wrong
> because name is not a
> valid property so I changed it to
> 
> <inject property="blogVisit" type="state"
> object="state:blogVisit"/>
> 
> but get 'state:blogVisit' is not a declared
> application state object.'
> 
> However when I do it through annotations eg
> 
> @InjectState("blogVisit")
> public abstract BlogVisit getBlogVisit();
> 
> it works fine.
> 
> cheers
> Mike
> 
> --
> d-_-b \m/(>_<)\m/ (9ò_ó)-o(@_o)
> 


Home page :
  http://uk.geocities.com/matmsh/index.html


		
___________________________________________________________ 
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org