Re: Component with recurrent markup
How can I create ActionLink dynamically in component class? Especially, how can I add zone attribute? addParameter() method of Link is not what I want. And how can I write this link through Writer? When I use Writer I'm not able to write Tapestry components like ActionLink. When I use template, I'm not able to output recurrent/nested ul. 'If' component sources are not very helpful. The only thing it suggests is to define node markup lit:actionLink../li as block in template and then output this block through writer. But how can I do this. Is this possible? -- View this message in context: http://www.nabble.com/Component-with-recurrent-markup-tp20506638p20513955.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Component with recurrent markup
I want to create an ajax component: kind of tree which shows current node and all its parent and child nodes (but only for current node - nodes which are not relatives of current are not visible). Component consists of zone which is reloaded after user clicks on any of visible nodes. Component template looks like this: t:container xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; t:zone t:id=nodesZone visible=literal:true t:delegate to=nodesBlock/ /t:zone t:block t:id=nodesBlock !-- tree markup -- /t:block /t:container I think most natural tree markup will be nested ulli...ulli/lili/li.../ul/li/ul. But how can I create recurrent ul markup? Of course I can prepare markup in component class and write it out using t:outputRaw component. But I want each node title be enclosed by t:actionLink. Is that possible? Can I create a link with createEventLink method and use toRedirectURI() method to get href for a...? (I tried but it didn't work) please help... -- View this message in context: http://www.nabble.com/Component-with-recurrent-markup-tp20506638p20506638.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Component with recurrent markup
Em Fri, 14 Nov 2008 16:08:08 -0300, shymon [EMAIL PROTECTED] escreveu: I think most natural tree markup will be nested ulli...ulli/lili/li.../ul/li/ul. But how can I create recurrent ul markup? Of course I can prepare markup in component class andwrite it out using t:outputRaw component. Use a MarkupWriter instead: @BeginRender public void render(MarkupWriter writer) { // read the MarkupWriter section in http://tapestry.apache.org/tapestry5/guide/dom.html. } Can I create a link with createEventLink method and use toRedirectURI() method to get href for a...? Why toRedirectURI()? Why not toURI() or even toString()? -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Component with recurrent markup
Thiago H. de Paula Figueiredo wrote: Use a MarkupWriter instead: @BeginRender public void render(MarkupWriter writer) { // read the MarkupWriter section in http://tapestry.apache.org/tapestry5/guide/dom.html. } But can I use @BeginRender if i use template? And i have to use template because I need to use t:zone. As I know it is not possible to write tapestry components through Writer. My question is: is it possible to use template and write only part of markup with Writer? -- View this message in context: http://www.nabble.com/Component-with-recurrent-markup-tp20506638p20506979.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Component with recurrent markup
Em Fri, 14 Nov 2008 16:31:03 -0300, shymon [EMAIL PROTECTED] escreveu: But can I use @BeginRender if i use template? Yes. And i have to use template because I need to use t:zone. The component would be used inside the Zone, rendering the nested lists. As I know it is not possible to write tapestry components through Writer. It is possible. Take a look at the If Tapestry component. My question is: is it possible to use template and write only part of markup with Writer? I think so, but I haven't tested and I'm not completely sure. ;) -- Thiago H. de Paula Figueiredo Consultor, desenvolvedor e instrutor em Java http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]