You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by pepone pepone <pe...@gmail.com> on 2005/05/13 20:15:28 UTC

Components

Hello 
can any body help to understand the renderComponet



//MENU

public abstract class Menu extends AbstractComponent {
	
	private String name;
	private String style;
	
	protected void renderComponent(IMarkupWriter writer,IRequestCycle cycle)
	{
		if(cycle.isRewinding())
		{
			return;
		}
		
		writer.begin("div");
		writer.attribute("class","Menu");
		writer.begin("ul");
                                   
               //here i want to begin render Items menu  i don't know how do it

		writer.end("ul");
		writer.end("div");
	}
}

How can i do to Items componet begin reder betwenn ul tags or in a
specific part of the html generated code?
 
is necesary that items be a property of the menu or can i specific
items as simple childs componets and set allow-body true?

<div jwcid="@Menu" name="topMenu" style="topmenu">
            <div jwcid="@ItemMenu" name="Inicio"/>
            <div jwcid="@ItemMenu" name="Tienda"/>
            <div jwcid="@ItemMenu" name="Tpv"/>
            <div jwcid="@ItemMenu" name="Desarrollo Web"/>
 </div>

Thanks to all

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


RE: Components

Posted by Patrick Casey <pa...@adelphia.net>.
writer.begin("ul");
for (int x=0; x<10; x++){
	writer.begin("li");
	writer.print("Line Item Number " + x);
	writer.end("li");
}
writer.end("ul");

> -----Original Message-----
> From: pepone pepone [mailto:pepone.onrez@gmail.com]
> Sent: Friday, May 13, 2005 11:15 AM
> To: tapestry-user@jakarta.apache.org
> Subject: Components
> 
> Hello
> can any body help to understand the renderComponet
> 
> 
> 
> //MENU
> 
> public abstract class Menu extends AbstractComponent {
> 
> 	private String name;
> 	private String style;
> 
> 	protected void renderComponent(IMarkupWriter writer,IRequestCycle
> cycle)
> 	{
> 		if(cycle.isRewinding())
> 		{
> 			return;
> 		}
> 
> 		writer.begin("div");
> 		writer.attribute("class","Menu");
> 		writer.begin("ul");
> 
>                //here i want to begin render Items menu  i don't know how
> do it
> 
> 		writer.end("ul");
> 		writer.end("div");
> 	}
> }
> 
> How can i do to Items componet begin reder betwenn ul tags or in a
> specific part of the html generated code?
> 
> is necesary that items be a property of the menu or can i specific
> items as simple childs componets and set allow-body true?
> 
> <div jwcid="@Menu" name="topMenu" style="topmenu">
>             <div jwcid="@ItemMenu" name="Inicio"/>
>             <div jwcid="@ItemMenu" name="Tienda"/>
>             <div jwcid="@ItemMenu" name="Tpv"/>
>             <div jwcid="@ItemMenu" name="Desarrollo Web"/>
>  </div>
> 
> Thanks to all
> 
> ---------------------------------------------------------------------
> 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