You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jens <wo...@gmx.de> on 2005/02/18 21:16:36 UTC

[newbie] accessing global properties from *.jwc

Hi all,

I've trouble to figure out how to access global properties from a component
specification file, e.g.

<component id="foo" type="Insert">
       	<binding name="value" expression="global.myGlobalProperty"/>
</component>


The idiom "Global global = (Global)getGlobal();" doesn't work either in the
components listener.

Any hints?

Thanks,
Jens
 


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


Re: [newbie] accessing global properties from *.jwc

Posted by Jamie Orchard-Hays <ja...@dang.com>.
Have you mapped your global object in the application specification?

----- Original Message ----- 
From: "Jens" <wo...@gmx.de>
To: <ta...@jakarta.apache.org>
Sent: Friday, February 18, 2005 3:16 PM
Subject: [newbie] accessing global properties from *.jwc


> Hi all,
>
> I've trouble to figure out how to access global properties from a 
> component
> specification file, e.g.
>
> <component id="foo" type="Insert">
>       <binding name="value" expression="global.myGlobalProperty"/>
> </component>
>
>
> The idiom "Global global = (Global)getGlobal();" doesn't work either in 
> the
> components listener.
>
> Any hints?
>
> Thanks,
> Jens
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 


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


Re: [newbie] accessing global properties from *.jwc

Posted by Jens <wo...@gmx.de>.
Danny Mandel <dmandel <at> tolweb.org> writes:
> 
> The global is accessible via the page, not the component.  So to use it 
> you need:
> 
> <component id="foo" type="Insert">
>        	<binding name="value" expression="page.global.myGlobalProperty"/>
> </component>
> [...]

Hi Danny,

that was it!

Thanks all,
Jens






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


Re: [newbie] accessing global properties from *.jwc

Posted by Danny Mandel <dm...@tolweb.org>.
The global is accessible via the page, not the component.  So to use it 
you need:

<component id="foo" type="Insert">
       	<binding name="value" expression="page.global.myGlobalProperty"/>
</component>

Then you should have access to the Global object.

Hope that helps,
Danny


Jens wrote:

>Hi all,
>
>I've trouble to figure out how to access global properties from a component
>specification file, e.g.
>
><component id="foo" type="Insert">
>       	<binding name="value" expression="global.myGlobalProperty"/>
></component>
>
>
>The idiom "Global global = (Global)getGlobal();" doesn't work either in the
>components listener.
>
>Any hints?
>
>Thanks,
>Jens
> 
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>  
>


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


Re: [newbie] accessing global properties from *.jwc

Posted by Jamie Orchard-Hays <ja...@dang.com>.
Somehow I sent my last email without this example:

<property name="org.apache.tapestry.visit-class" 
value="edu.darden.registrar.student.tapestry.Visit"/>
<property name="org.apache.tapestry.global-class" 
value="edu.darden.registrar.student.tapestry.RegistrarStudentGlobal"/>


----- Original Message ----- 
From: "Jens" <wo...@gmx.de>
To: <ta...@jakarta.apache.org>
Sent: Friday, February 18, 2005 3:16 PM
Subject: [newbie] accessing global properties from *.jwc


> Hi all,
>
> I've trouble to figure out how to access global properties from a 
> component
> specification file, e.g.
>
> <component id="foo" type="Insert">
>       <binding name="value" expression="global.myGlobalProperty"/>
> </component>
>
>
> The idiom "Global global = (Global)getGlobal();" doesn't work either in 
> the
> components listener.
>
> Any hints?
>
> Thanks,
> Jens
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 


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