You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by ffred <ff...@gmail.com> on 2012/01/10 12:11:35 UTC

[5.2] Programmatically set Zone attributes ?

Hello,

I would like to programmatically (from java) set the 'show' and 'update'
attribute of a zone.
I found no way of doing this neither from the page with an injected Zone nor
from simply extending the Zone components as the corresponding fields are
private.
After a quick look at the Zone source code, I tried to act directly on the
ClientBehaviorSupport with no more success. 

Is there a simple way of doing this ?
What have i missed ?

Thanks in advance

Fred

--
View this message in context: http://tapestry.1045711.n5.nabble.com/5-2-Programmatically-set-Zone-attributes-tp5133881p5133881.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: [5.2] Programmatically set Zone attributes ?

Posted by Dragan Sahpaski <dr...@gmail.com>.
Hi,
Yes there is a rather simple solution.
Just find the ZoneManager for the specific zone and update it's updateFunc
member.

Look at the the definition of Tapestry.ZoneManager [1].

[1]
https://github.com/apache/tapestry5/blob/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js#L1772

Cheers,
Dragan Sahpaski



On Tue, Jan 10, 2012 at 12:11 PM, ffred <ff...@gmail.com> wrote:

> Hello,
>
> I would like to programmatically (from java) set the 'show' and 'update'
> attribute of a zone.
> I found no way of doing this neither from the page with an injected Zone
> nor
> from simply extending the Zone components as the corresponding fields are
> private.
> After a quick look at the Zone source code, I tried to act directly on the
> ClientBehaviorSupport with no more success.
>
> Is there a simple way of doing this ?
> What have i missed ?
>
> Thanks in advance
>
> Fred
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/5-2-Programmatically-set-Zone-attributes-tp5133881p5133881.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: [5.2] Programmatically set Zone attributes ?

Posted by Taha Hafeez Siddiqi <ta...@gmail.com>.
Hi

If I understand correctly 

<div t:type='zone' t:show='prop:show' t:update='prop:update' />

//Java

public String getShow(){
   return ...;
}

public String getUpdate(){
   return ....;
}
 
On Jan 10, 2012, at 4:41 PM, ffred wrote:

> Hello,
> 
> I would like to programmatically (from java) set the 'show' and 'update'
> attribute of a zone.
> I found no way of doing this neither from the page with an injected Zone nor
> from simply extending the Zone components as the corresponding fields are
> private.
> After a quick look at the Zone source code, I tried to act directly on the
> ClientBehaviorSupport with no more success. 
> 
> Is there a simple way of doing this ?
> What have i missed ?
> 
> Thanks in advance
> 
> Fred
> 
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/5-2-Programmatically-set-Zone-attributes-tp5133881p5133881.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> 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