Hi,
I would like to include reusable HTML snippets which contain Tapestry code
(jwcid) tags rather than build an actual component. There have been several
posts that I searched through and the answer was to build a component, though
I'm not sure if that will help in my case as I would like to keep the jwcid
tags in place and NOT render them.
Here is my situation, for example I have a sign up and edit info page. There
is common Java code between the two and common HTML code as well. The Java code
I can share by reusing the same base class. I would like to reuse the HTML
code, such as below. Rather than copying and pasting, is there a way I can
include common html code and componentize on that building one HTML page out of
smaller common HTML pages? Thanks in advance.
<tr>
<td align="right" valign="top">
Username :
</td>
<td align="left">
<table cellspacing=0 cellpadding=0 class="xxsmall_bold_arial">
<tr>
<td align="left">
<span jwcid="@If" condition="ognl:userNameErr">
<input type="text" size="16" maxlength="16" jwcid="@TextField"
value="prop:userName" class="backgroundinputfield_error" />
</span>
<span jwcid="@Else" >
<input type="text" size="16" maxlength="16" jwcid="@TextField"
value="prop:userName" />
</span>
</td>
</tr>
<tr>
<td align="left" valign="top">
<span class="xxsmall_grey_arial">no spaces please</span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="right">
Password :
</td>
<td align="left">
<span jwcid="@If" condition="ognl:passWordErr">
<input type="password" size="15" maxlength="15" jwcid="@TextField"
hidden="true" value="prop:passWord" class="backgroundinputfield_error"></input>
</span>
<span jwcid="@Else" >
<input type="password" size="15" maxlength="15" jwcid="@TextField"
hidden="true" value="prop:passWord" />
</span>
</td>
</tr>
Thanks,
Josh