You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jo...@mizuhocbus.com on 2003/10/08 21:31:03 UTC

pager tags and nested tags

I would like to use the full functionality of the nested tags, including 
complicated forms within the nested:iterate block.


I've searched the Mail Archive for examples/experiences of using the the 
pager tags ( http://jsptags.com/tags/navigation/page). It seems that 
everyone who uses them has to settle for using simple logic:iterates:
logic:iterate id="foo" name="fooList">
     <pg:item>
       <bean:write name="foo" property="name" />
</pg:item>
   </logic:iterate>

To say the least, this seems limiting. 

I wish I had the time to investigate why I can't seem to get something 
like the following to work. If anyone can point to a successful example of 
use of nested tags with the pager tags IT WOULD BE GREATLY APPRECIATED. 
(I know about the various alternatives -- Struts-Layout, Ed Hill, etc. but 
I'd just like to know if the pager tags can be used this way.)


<nested:iterate property="eventList" id="ev" indexId="evIdx">
        <tr>
        <pg:item> 
                <td bgcolor="silver"><font size="-1" face="Arial, 
Helvetica, sans-serif" weight="500" > 
                <nested:write property="eventId" /> </font>
                </td>
                <td bgcolor="silver"><font size="-1" face="Arial, 
Helvetica, sans-serif"> 
                <nested:write property="appName" /> </font>
                </td>
                <td bgcolor="silver"><font size="-1" face="Arial, 
Helvetica, sans-serif"> 
                <nested:write property="objName" /> </font>
                </td>
                <td bgcolor="silver"><font size="-1" face="Arial, 
Helvetica, sans-serif"> 
                <nested:write property="moName" /> </font>
                </td>
                <td bgcolor="silver"><font size="-1" face="Arial, 
Helvetica, sans-serif"> 
                        <nested:write property="pctUsed" /> </font>
                </td>
                <td bgcolor="silver"><font size="-1" face="Arial, 
Helvetica, sans-serif"> 
                        <nested:write property="eventDate" /> </font>
                </td bgcolor="silver">
                <td bgcolor="silver" align="center"><font size="-1" 
face="Arial, Helvetica, sans-serif"> 
                        <nested:write property="riskLevel" /> </font>
                </td> 
                <td><font size="-1" face="Arial, Helvetica, sans-serif">
                <nested:textarea rows="2" property="actionTaken" /> 
</font>
                </td>
                <td valign="top">
                <script language='JavaScript'>var cal<%= tmpIndex%> = new 
CalendarPopup();
                cal<%= tmpIndex%>.setReturnFunction('showDate<%= 
tmpIndex%>');
                cal<%= tmpIndex%>.offsetX=2;
                function showDate<%= tmpIndex%>(y,m,d)
                {document.forms[0].elements['eventList[<%= 
tmpIndex%>].targetDate'].value = m + "-" + d + "-" + y;}
                </script>
                <a HREF="#" onClick="cal<%= 
tmpIndex%>.select(document.forms[0].elements['eventList[<%= 
tmpIndex%>].targetDate'],'anchor1','MM/dd/yyyy'); return false;" 
NAME="anchor1" ID="anchor1">
                <img src="image/cal.gif" width="18" height="18" 
border="0"><font size="-2" face="Arial, Helvetica, sans-serif"> 
(mm-dd-yyyy)
                </a>
                <font size="-1" face="Arial, Helvetica, sans-serif">
                <nested:text size="10" property="targetDate" /></font> 
                </td>
                <td><font size="-1" face="Arial, Helvetica, sans-serif"> 
                <nested:textarea rows="2" property="comments" /> </font>
                </td>
                <td  align="center" ><font size="-1" face="Arial, 
Helvetica, sans-serif"> 
                <nested:text size="3" property="reId" /> </font>
                </td>
                <td align="center" ><font size="-1" face="Arial, 
Helvetica, sans-serif"> 
                <nested:checkbox property="doUpdate" />       </font>
                </td>
                <td><nested:submit property="showRe" >Show 
RE</nested:submit>
                </td>
        </pg:item>
        </tr>
</nested:iterate>

= = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = 
This transmittal and any attachments may contain confidential, privileged or sensitive information and is solely for the use of the intended recipient. If you are not intended recipient, you are hereby notified that you have received this transmittal and any such attachments in error and any review, dissemination, distribution or copying thereof is strictly prohibited. If you have received this transmittal and any attachments in error please notify the sender and immediately destroy the message and all its attachments. Any opinions herein expressed may be those of the author and not necessarily of Mizuho Corporate Bank, Ltd (the "Bank"). The Bank accepts no responsibility for the accuracy or completeness of any information herein contained.
= = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = =