Re: question about recursion in a component.
Antonio Ordoñez wrote: Hallo everybody. My question is about how could I implement a recursion in tapestry 5? Tapestry does not support recursion. It's a pity, especially for your very use case, but according to Howard, it's a design choice that brings simplicity, scaling possibility and other good things. So, you will have to change your recursion to an imperative loop. Fortunally, it's simple enought for a tree component (you can find an example here : http://svn.forge.objectweb.org/cgi-bin/viewcvs.cgi/interldap/interldap-wui-common/branches/wui-common/src/main/java/org/interldap/wui/t5lib/components/Tree.java?rev=389&view=markup Be carefull, it was for a very old version of T5 (perhaps 5.0.6 or so, and I believe a lot of thing are simplier now). Hope it help, -- Francois Armand Etudes & Développements J2EE Groupe Linagora - http://www.linagora.com Tél.: +33 (0)1 58 18 68 28 --- InterLDAP - http://interldap.org FederID - http://www.federid.org/ Open Source identities management and federation - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Question about recursion in a component
You need to rewrite your recursive approach as a non-recursive one. Take a look at the wiki for the Tree component: http://wiki.apache.org/tapestry/Tapestry5TreeComponent?highlight=%28Tapestry 5%29 The code is a bit out of date because of changes to the handling of Javascript, but you can see how something that is normally recursive is done in Tapestry. Jonathan > -Original Message- > From: Antonio Ordoñez [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 22, 2008 10:56 > To: Tapestry users > Subject: Question about recursion in a component > > Hallo everybody. > > My question is about how could I implement a recursion in tapestry 5? > exactly in a tree component. I have a collection of nodes with a Node > father and a Collection children, then in the tml I have a loop and > check if the actual node is father or not, but I want execute again the > same control for each children. > > > > > > onclick="javascript:UTILS_Change_Display('${item.identifier}')"/> > > > alt="${item.identifier}"/> > > onClick="javascript:UTILS_Change_Color('name_${item.identifier}', > 'black', '#ff');"> > style="cursor:pointer"> >${item.name} > > > > name="${item.identifier}" style="display:none"> > cellpadding="0"> > Here I want implements the recursion (at > the momment I have another loop): > t:value="item"> > > > > > style="padding-right:1mm"> > border="0"/> > > >${item.name} > > > > > > > > > > > > I'm new in tapestry and I don't know if is possible or not. > > Thank you very much in advanced. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Question about recursion in a component
Hallo everybody. My question is about how could I implement a recursion in tapestry 5? exactly in a tree component. I have a collection of nodes with a Node father and a Collection children, then in the tml I have a loop and check if the actual node is father or not, but I want execute again the same control for each children. onclick="javascript:UTILS_Change_Display('${item.identifier}')"/> alt="${item.identifier}"/> onClick="javascript:UTILS_Change_Color('name_${item.identifier}', 'black', '#ff');"> style="cursor:pointer"> ${item.name} name="${item.identifier}" style="display:none"> cellpadding="0"> Here I want implements the recursion (at the momment I have another loop): t:value="item"> style="padding-right:1mm"> border="0"/> ${item.name} I'm new in tapestry and I don't know if is possible or not. Thank you very much in advanced. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
question about recursion in a component.
Hallo everybody. My question is about how could I implement a recursion in tapestry 5? exactly in a tree component. I have a collection of nodes with a Node father and a Collection children, then in the tml I have a loop and check if the actual node is father or not, but I want execute again the same control for each children. onclick="javascript:UTILS_Change_Display('${item.identifier}')"/> alt="${item.identifier}"/> onClick="javascript:UTILS_Change_Color('name_${item.identifier}', 'black', '#ff');"> style="cursor:pointer"> ${item.name} name="${item.identifier}" style="display:none"> cellpadding="0"> Here I want implements the recursion (at the momment I have another loop): t:value="item"> style="padding-right:1mm"> border="0"/> ${item.name} I'm new in tapestry and I don't know if is possible or not. Thank you very much in advanced. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]