Hello there.

I'm trying to make a <tr:table> with two columns (name, value). The number
of lines is variable and I'd like to use tr:table to be able to use
pagination later, since it will probably be necessary.

So far everything's going fine.

Now, on the value column, I want to place another <tr:table>. And to make it
a little harder, I need it to have a variable number of columns and lines.

For the inner table, I'm trying to do something like this

<tr:table>
<c:forEach ...>
<tr:column>
...
</tr:column>
</c:forEach>
</tr:table>

The problem is this inner list shows no content - only an empty box. The
logs start by saying

18/Mai/2007 18:57:25
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TableRendererrenderTableWithoutColumns
WARNING: Table with id: mainForm:_id89:1:_id96 has no visible columns!

and then move on to lots of things like this:

18/Mai/2007 18:57:25
org.apache.myfaces.trinidadinternal.io.HtmlResponseWriter endElement
SEVERE: Element End name:td does not match start name:div


I believe the problem might have to do with the fact that the list the
c:forEach is iterating on is created as a variable by the outer tr:table.
Could that be it?

I'm attaching the code for you to see. By the way, I'm using JSF 1.1,
Trinidad 1.0.0-incubating, Tomahawk 1.1.5 and Facelets 1.1.11.





---- CODE BE HERE ----

<tr:table value="#{fichaBean.attributes}" var="attribute" rendered="#{not
empty fichaBean.attributes}" styleClass="stptable" inlineStyle="width:
default;">
       <tr:column>
           <tr:outputText value="#{attribute.xnomatrb}"/>
       </tr:column>
       <tr:column>
           <tr:table value="#{attribute.attributeData}" var="attributeData"
rendered="#{attribute.xtipdado eq 'S' or attribute.xtipdado eq 'L'}"
rows="0">
               <tr:column headerText="#{attributeData.inomcol}">
                   <tr:outputText value="#{attributeData.xvalor}" />
               </tr:column>
           </tr:table>

           <tr:table value="#{attribute.tableAttributeData}"
var="lineAttributeData" rendered="#{attribute.xtipdado eq 'T'}"
inlineStyle="border: 1px;">
               <c:forEach items="#{lineAttributeData}" var="attribData">
                   <tr:column headerText="#{attribData.inomcol}">
                       <tr:outputText value="#{attribData.xvalor}" />
                   </tr:column>
               </c:forEach>
           </tr:table>
       </tr:column>
   </tr:table>

Reply via email to