You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Bogdan Stojkovic <bo...@bitsyu.net> on 2005/05/24 10:30:00 UTC

Rendering sequence?

Hi all,

 As I think, components are render by order as they appear on the page.
If I have 3 components on page: vcomp_1, vcomp_2, vcomp3 in this order is it
possible to tell Tapestry to render them in order vcomp_2, vcopn_1, vcomp_3
???

Thanks.

Bogdan


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


RE: Rendering sequence?

Posted by Patrick Casey <pa...@adelphia.net>.
	Not that I know of, but you could build a meta-component that spits
them out in arbitrary order via java code.

	e.g. build a component called "comp_wrapper" that takes an array of
component names as its argument.

	Then have your comp_wrapper override the renderComponent Method


public void renderPage(IMarkupWriter writer, IRequestCycle cycle) {
	IComponent comp = null;
	String compName = null;
	for (int x=0; x< fArgs.length; x++) {
		compName = (String) fArgs[x];
		comp = cycle.getPage().getComponent(compName);
		if (comp != null)
			comp.render(writer,cycle);
	}
}

> -----Original Message-----
> From: Bogdan Stojkovic [mailto:bogi@bitsyu.net]
> Sent: Tuesday, May 24, 2005 1:30 AM
> To: Tapestry users
> Subject: Rendering sequence?
> 
> 
> Hi all,
> 
>  As I think, components are render by order as they appear on the page.
> If I have 3 components on page: vcomp_1, vcomp_2, vcomp3 in this order is
> it
> possible to tell Tapestry to render them in order vcomp_2, vcopn_1,
> vcomp_3
> ???
> 
> Thanks.
> 
> Bogdan
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org



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