You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Vinicius Carvalho <ja...@gmail.com> on 2005/06/07 04:43:32 UTC

RenderBlock & RenderBody confusion

Well, I'm still confused with this...
I followed Ron help and end up with this:

Border.html
<body jwcid="@Body" topmargin="0" bottommargin="0" leftmargin="0"
rightmargin="0" >
<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td bgcolor="#6699cc" width="25%">
		<TABLE cellSpacing=1 cellPadding=1 width="100%" border=0>
			<TR>
				<TD><a jwcid="@PageLink" page="Start" parameters="Start">Start</a></TD>
			</TR>
			<TR>
				<TD><a jwcid="@PageLink" page="Digest"
parameters="Digest">Gerenciar Digest</a></TD>
			</TR>
		</TABLE>
		</td>
		<td width="1"></td>
		<td width="75%" valign="top"><span jwcid="@RenderBody"/></td>
	</tr>
</table>
</body>
</html>

Border.jwc
<component-specification class="org.apache.tapestry.BaseComponent"
allow-body="yes" allow-informal-parameters="no">
</component-specification>

<span jwcid="@Border">
      <span jwcid="@TabPanel" blockNames="ognl:user.groupList">
      </span>
</span>

TabPanel.html
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
	<td>
		<table cellspacing="0" width="100%" border="0">
            <tr>
				<span jwcid="foreach@Foreach" source="ognl:blockNames"
value="ognl:currentBlock">
                <td jwcid="@Any" element="td" align="center" bgcolor="#8080FF">
                    <span jwcid="@Insert" value="ognl:currentBlock"></span>
                </td>
				<td width="1"></td>
                </span>
			</tr>
		</table>
	</td>
</tr>
<tr>
	<td width="100%" height="100%'"><span jwcid="@RenderBody"/></td>
</tr>
</table>

Here's where I got lost ...
How do I create pages (examples, category.page) which are gonna be
rendered insied the second @RenderBody?
I tried the Block example at tapestry reference, but how do I set the
Block contents to be a page? or a component?

Thanks all

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


Re: RenderBlock & RenderBody confusion

Posted by Vinicius Carvalho <ja...@gmail.com>.
Well I'm giving up on this...
RenderBody renders the body of a component right? Well here's what
I've been trying to do:

<span jwcid="@Border">
      <span jwcid="@TabPanel" blockNames="ognl:user.groupList">
 		
      </span>
</span>


if I put "a" inside the TabPanel component it's displayed. but what if
I'd like to have diferent pages inside the component?
My TabPanel renderComponent method:

protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle) {
		super.renderComponent(writer, cycle);
		Categories c = (Categories)cycle.getPage("Categories");
		Visit visit = (Visit)getPage().getVisit();
		User user = visit.getUser();
		Group group = (Group) user.getGroupList().get(0);
		c.setCategoryList(getUserService().getCategories(group));
		cycle.activate(c);
	}

What I was expecting is the Categories page be rendered inside my
component. Which does not occur.

I'm really having a big headache with this component. I'm not a new
developer so I guess it's not an easy to deal component.

How could something so simple as having nested ("tiles") be so problematic.

Any ideas please???

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


Re: RenderBlock & RenderBody confusion

Posted by Ron Piterman <mp...@vollbio.de>.
ציטוט Vinicius Carvalho:
> Hum ok. So content shall be my page with components and other stuff?
if you use this layout often, why not create a second "border" 
component, say LayoutX, where content (in my prev. post) is @RenderBody, 
and then your page looks like

<span jwcid="@LayoutX">
content
</span>

> 
> On 6/7/05, Ron Piterman <mp...@vollbio.de> wrote:
> 
>><span jwcid="@Border">
>>  <span jwcid="@TabPanel">
>>    content
>>  </span>
>></span>
>>
>>ציטוט Vinicius Carvalho:
>>
>>>Well, I'm still confused with this...
>>>I followed Ron help and end up with this:
>>>
>>>Border.html
>>><body jwcid="@Body" topmargin="0" bottommargin="0" leftmargin="0"
>>>rightmargin="0" >
>>><table width="100%" cellpadding="0" cellspacing="0">
>>>      <tr>
>>>              <td bgcolor="#6699cc" width="25%">
>>>              <TABLE cellSpacing=1 cellPadding=1 width="100%" border=0>
>>>                      <TR>
>>>                              <TD><a jwcid="@PageLink" page="Start" parameters="Start">Start</a></TD>
>>>                      </TR>
>>>                      <TR>
>>>                              <TD><a jwcid="@PageLink" page="Digest"
>>>parameters="Digest">Gerenciar Digest</a></TD>
>>>                      </TR>
>>>              </TABLE>
>>>              </td>
>>>              <td width="1"></td>
>>>              <td width="75%" valign="top"><span jwcid="@RenderBody"/></td>
>>>      </tr>
>>></table>
>>></body>
>>></html>
>>>
>>>Border.jwc
>>><component-specification class="org.apache.tapestry.BaseComponent"
>>>allow-body="yes" allow-informal-parameters="no">
>>></component-specification>
>>>
>>><span jwcid="@Border">
>>>      <span jwcid="@TabPanel" blockNames="ognl:user.groupList">
>>>      </span>
>>></span>
>>>
>>>TabPanel.html
>>><table cellpadding="0" cellspacing="0" border="0" width="100%">
>>><tr>
>>>      <td>
>>>              <table cellspacing="0" width="100%" border="0">
>>>            <tr>
>>>                              <span jwcid="foreach@Foreach" source="ognl:blockNames"
>>>value="ognl:currentBlock">
>>>                <td jwcid="@Any" element="td" align="center" bgcolor="#8080FF">
>>>                    <span jwcid="@Insert" value="ognl:currentBlock"></span>
>>>                </td>
>>>                              <td width="1"></td>
>>>                </span>
>>>                      </tr>
>>>              </table>
>>>      </td>
>>></tr>
>>><tr>
>>>      <td width="100%" height="100%'"><span jwcid="@RenderBody"/></td>
>>></tr>
>>></table>
>>>
>>>Here's where I got lost ...
>>>How do I create pages (examples, category.page) which are gonna be
>>>rendered insied the second @RenderBody?
>>>I tried the Block example at tapestry reference, but how do I set the
>>>Block contents to be a page? or a component?
>>>
>>>Thanks 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
>>
>>


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


Re: RenderBlock & RenderBody confusion

Posted by Ron Piterman <mp...@vollbio.de>.
ציטוט Vinicius Carvalho:
> Hum ok. So content shall be my page with components and other stuff
exactly
> 
> On 6/7/05, Ron Piterman <mp...@vollbio.de> wrote:
> 
>><span jwcid="@Border">
>>  <span jwcid="@TabPanel">
>>    content
>>  </span>
>></span>
>>
>>ציטוט Vinicius Carvalho:
>>
>>>Well, I'm still confused with this...
>>>I followed Ron help and end up with this:
>>>
>>>Border.html
>>><body jwcid="@Body" topmargin="0" bottommargin="0" leftmargin="0"
>>>rightmargin="0" >
>>><table width="100%" cellpadding="0" cellspacing="0">
>>>      <tr>
>>>              <td bgcolor="#6699cc" width="25%">
>>>              <TABLE cellSpacing=1 cellPadding=1 width="100%" border=0>
>>>                      <TR>
>>>                              <TD><a jwcid="@PageLink" page="Start" parameters="Start">Start</a></TD>
>>>                      </TR>
>>>                      <TR>
>>>                              <TD><a jwcid="@PageLink" page="Digest"
>>>parameters="Digest">Gerenciar Digest</a></TD>
>>>                      </TR>
>>>              </TABLE>
>>>              </td>
>>>              <td width="1"></td>
>>>              <td width="75%" valign="top"><span jwcid="@RenderBody"/></td>
>>>      </tr>
>>></table>
>>></body>
>>></html>
>>>
>>>Border.jwc
>>><component-specification class="org.apache.tapestry.BaseComponent"
>>>allow-body="yes" allow-informal-parameters="no">
>>></component-specification>
>>>
>>><span jwcid="@Border">
>>>      <span jwcid="@TabPanel" blockNames="ognl:user.groupList">
>>>      </span>
>>></span>
>>>
>>>TabPanel.html
>>><table cellpadding="0" cellspacing="0" border="0" width="100%">
>>><tr>
>>>      <td>
>>>              <table cellspacing="0" width="100%" border="0">
>>>            <tr>
>>>                              <span jwcid="foreach@Foreach" source="ognl:blockNames"
>>>value="ognl:currentBlock">
>>>                <td jwcid="@Any" element="td" align="center" bgcolor="#8080FF">
>>>                    <span jwcid="@Insert" value="ognl:currentBlock"></span>
>>>                </td>
>>>                              <td width="1"></td>
>>>                </span>
>>>                      </tr>
>>>              </table>
>>>      </td>
>>></tr>
>>><tr>
>>>      <td width="100%" height="100%'"><span jwcid="@RenderBody"/></td>
>>></tr>
>>></table>
>>>
>>>Here's where I got lost ...
>>>How do I create pages (examples, category.page) which are gonna be
>>>rendered insied the second @RenderBody?
>>>I tried the Block example at tapestry reference, but how do I set the
>>>Block contents to be a page? or a component?
>>>
>>>Thanks 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
>>
>>


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


Re: RenderBlock & RenderBody confusion

Posted by Vinicius Carvalho <ja...@gmail.com>.
Hum ok. So content shall be my page with components and other stuff?

On 6/7/05, Ron Piterman <mp...@vollbio.de> wrote:
> <span jwcid="@Border">
>   <span jwcid="@TabPanel">
>     content
>   </span>
> </span>
> 
> ציטוט Vinicius Carvalho:
> > Well, I'm still confused with this...
> > I followed Ron help and end up with this:
> >
> > Border.html
> > <body jwcid="@Body" topmargin="0" bottommargin="0" leftmargin="0"
> > rightmargin="0" >
> > <table width="100%" cellpadding="0" cellspacing="0">
> >       <tr>
> >               <td bgcolor="#6699cc" width="25%">
> >               <TABLE cellSpacing=1 cellPadding=1 width="100%" border=0>
> >                       <TR>
> >                               <TD><a jwcid="@PageLink" page="Start" parameters="Start">Start</a></TD>
> >                       </TR>
> >                       <TR>
> >                               <TD><a jwcid="@PageLink" page="Digest"
> > parameters="Digest">Gerenciar Digest</a></TD>
> >                       </TR>
> >               </TABLE>
> >               </td>
> >               <td width="1"></td>
> >               <td width="75%" valign="top"><span jwcid="@RenderBody"/></td>
> >       </tr>
> > </table>
> > </body>
> > </html>
> >
> > Border.jwc
> > <component-specification class="org.apache.tapestry.BaseComponent"
> > allow-body="yes" allow-informal-parameters="no">
> > </component-specification>
> >
> > <span jwcid="@Border">
> >       <span jwcid="@TabPanel" blockNames="ognl:user.groupList">
> >       </span>
> > </span>
> >
> > TabPanel.html
> > <table cellpadding="0" cellspacing="0" border="0" width="100%">
> > <tr>
> >       <td>
> >               <table cellspacing="0" width="100%" border="0">
> >             <tr>
> >                               <span jwcid="foreach@Foreach" source="ognl:blockNames"
> > value="ognl:currentBlock">
> >                 <td jwcid="@Any" element="td" align="center" bgcolor="#8080FF">
> >                     <span jwcid="@Insert" value="ognl:currentBlock"></span>
> >                 </td>
> >                               <td width="1"></td>
> >                 </span>
> >                       </tr>
> >               </table>
> >       </td>
> > </tr>
> > <tr>
> >       <td width="100%" height="100%'"><span jwcid="@RenderBody"/></td>
> > </tr>
> > </table>
> >
> > Here's where I got lost ...
> > How do I create pages (examples, category.page) which are gonna be
> > rendered insied the second @RenderBody?
> > I tried the Block example at tapestry reference, but how do I set the
> > Block contents to be a page? or a component?
> >
> > Thanks 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
> 
>

Re: RenderBlock & RenderBody confusion

Posted by Ron Piterman <mp...@vollbio.de>.
<span jwcid="@Border">
  <span jwcid="@TabPanel">
    content
  </span>
</span>

ציטוט Vinicius Carvalho:
> Well, I'm still confused with this...
> I followed Ron help and end up with this:
> 
> Border.html
> <body jwcid="@Body" topmargin="0" bottommargin="0" leftmargin="0"
> rightmargin="0" >
> <table width="100%" cellpadding="0" cellspacing="0">
> 	<tr>
> 		<td bgcolor="#6699cc" width="25%">
> 		<TABLE cellSpacing=1 cellPadding=1 width="100%" border=0>
> 			<TR>
> 				<TD><a jwcid="@PageLink" page="Start" parameters="Start">Start</a></TD>
> 			</TR>
> 			<TR>
> 				<TD><a jwcid="@PageLink" page="Digest"
> parameters="Digest">Gerenciar Digest</a></TD>
> 			</TR>
> 		</TABLE>
> 		</td>
> 		<td width="1"></td>
> 		<td width="75%" valign="top"><span jwcid="@RenderBody"/></td>
> 	</tr>
> </table>
> </body>
> </html>
> 
> Border.jwc
> <component-specification class="org.apache.tapestry.BaseComponent"
> allow-body="yes" allow-informal-parameters="no">
> </component-specification>
> 
> <span jwcid="@Border">
>       <span jwcid="@TabPanel" blockNames="ognl:user.groupList">
>       </span>
> </span>
> 
> TabPanel.html
> <table cellpadding="0" cellspacing="0" border="0" width="100%">
> <tr>
> 	<td>
> 		<table cellspacing="0" width="100%" border="0">
>             <tr>
> 				<span jwcid="foreach@Foreach" source="ognl:blockNames"
> value="ognl:currentBlock">
>                 <td jwcid="@Any" element="td" align="center" bgcolor="#8080FF">
>                     <span jwcid="@Insert" value="ognl:currentBlock"></span>
>                 </td>
> 				<td width="1"></td>
>                 </span>
> 			</tr>
> 		</table>
> 	</td>
> </tr>
> <tr>
> 	<td width="100%" height="100%'"><span jwcid="@RenderBody"/></td>
> </tr>
> </table>
> 
> Here's where I got lost ...
> How do I create pages (examples, category.page) which are gonna be
> rendered insied the second @RenderBody?
> I tried the Block example at tapestry reference, but how do I set the
> Block contents to be a page? or a component?
> 
> Thanks 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