Re: T5.3 's Tree in a Loop

2012-05-23 Thread Lance Java
This sounds like a generic problem which might have a generic solution. If the Loop component push()ed the current element onto the environment, EventLinks could peek() for the value when rendering an ajax link. When an ajax even fires, tapestry could populate the current loop value in the componen

Re: T5.3 's Tree in a Loop

2012-05-23 Thread Nicolas Barrera
Ok, thanks both for your help... I 'll see if I can modify Tree's eventlink behaviour to have the needed information. I 'll update here if I reach some progress cheers and thanks Nicolás.- On Wed, May 23, 2012 at 12:59 PM, Arno Haase < arno.ha...@haase-consulting.com> wrote: > -BEGIN PGP

Re: T5.3 's Tree in a Loop

2012-05-23 Thread Arno Haase
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sorry, my mistake - I replied without really thinking... I was thinking about a similar phenomenon when a loop contains links that refer to the loop variable, e.g. as their context. Then you need to use 'deferred="true"' with the links. As Lance wrot

Re: T5.3 's Tree in a Loop

2012-05-23 Thread Lance Java
Think about it this way, once your page has rendered the trees, this list is gone unless it stored it in the html or in the session (bad). Take a look at the event link that tapestry generates to expand a tree node, I'm betting that it does not contain enough information to determine the loop val

Re: T5.3 's Tree in a Loop

2012-05-23 Thread Nicolas Barrera
Arno, sorry can you send me the link of the javadoc you 're looking at? 'cause I couldn't find nothing about deffered in http://tapestry.apache.org/5.3.3/apidocs/org/apache/tapestry5/corelib/components/Loop.html Lance, I 'm thinking about what you said and the loop and form relationship, I don't

Re: T5.3 's Tree in a Loop

2012-05-23 Thread Lance Java
I'm not 100% sure but I think you might have encountered a tricky issue. The Loop component uses the "encoder" property to integrate with the Form component so that the list is serialized to a hidden form element and then deserialized when the form is posted. I don't think that the same kind of int

Re: T5.3 's Tree in a Loop

2012-05-23 Thread Arno Haase
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 try adding deferred="false" to the loop - see javadoc for explanations. Am 23.05.2012 15:09, schrieb Nicolas Barrera: > Hi, > > I got the need to show a dynamic number of tree components in a > page, I thought about using a loop around a tree comp

T5.3 's Tree in a Loop

2012-05-23 Thread Nicolas Barrera
Hi, I got the need to show a dynamic number of tree components in a page, I thought about using a loop around a tree component but I 've bumped with the problem that I 'll need to set the Tree's model property with something variable. I 've already tried this: