Re: Component with recurrent markup

2008-11-15 Thread shymon

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 .

'If' component sources are not very helpful.
The only thing it suggests is to define node markup
... 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]



Re: Component with recurrent markup

2008-11-14 Thread Thiago H. de Paula Figueiredo
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 .


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]



Re: Component with recurrent markup

2008-11-14 Thread shymon



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 . 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

2008-11-14 Thread Thiago H. de Paula Figueiredo
Em Fri, 14 Nov 2008 16:08:08 -0300, shymon <[EMAIL PROTECTED]>  
escreveu:



I think most natural tree markup will be nested
...
But how can I create recurrent  markup? Of course I can prepare  
markup in component class andwrite it out using  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 ?


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]