Hi Wong,

If u need a better view of table alignment then use the following code as such

<f:verbatim><table width="500px"></f:verbatim>
<c:forEach items="${storeFront.imageContentBox}" varStatus="content" >
    <f:verbatim>
        <tr valign="top">
            <td width="114px">
            </f:verbatim>
                <tc:out 
value="#{storeFront.imageContentBox[${content.index}].userGroupBoxImageId"/>
            <f:verbatim>                                                  
        </td>
       <td>
    </f:verbatim>
                <tc:out 
value="#{storeFront.imageContentBox[${content.index}].userGroupBoxImageText"/>
    <f:verbatim>
          </td>
            </tr>
     </f:verbatim>
</c:forEach>
<f:verbatim></table></f:verbatim>

But this is not advisable to use html table code with Tobago

U can do the same with gridLayout as follows

<f:facet name="layout">
    <tc:gridLayout columns="150px;300px"/>
</f:facet>
<c:forEach items="${storeFront.imageContentBox}" varStatus="content" >
    <tc:cell>
        <tc:out 
value="#{storeFront.imageContentBox[${content.index}].userGroupBoxImageId"/>
    </tc:cell>
    <tc:cell>
            <tc:out 
value="#{storeFront.imageContentBox[${content.index}].userGroupBoxImageText"/>  
      </tc:cell>
</c:forEach>

where ${storeFront.imageContentBox} is an List object , and  content is an 
refernce for that.

So u can iterate as such with JSTL forEach tag.

Regards,
Madan


----- Original Message ----
From: "Wong, Emmanuel (Sam)" <[EMAIL PROTECTED]>
To: MyFaces Discussion <[email protected]>
Sent: Monday, 5 March, 2007 6:09:04 PM
Subject: [Tobago] for loop or each

[Tobago] for loop or each


 
 




Hi:


        Is there a for loop or for each examples in Tobago or my faces?  I have 
for records of information to print, but if I use tc:sheet, I was not able to 
put a nice html page format for all the records.  Thanks.


--> Sam Wong











                
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/

Reply via email to