myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <awi...@gmail.com>
Subject Re: [Trinidad] tr:table within tr:table
Date Mon, 07 May 2007 16:26:26 GMT
Also, when you said that table-in-table "doesn't work",
what do you mean?  What exactly isn't working?

I suspect that your original problem was that the
Trinidad table does not support "rendered" being bound
per-row on a column.  Columns are either entirely
rendered or entirely hidden.

    <tr:table value="#{fichaOperadorBean.attributes}" var="attribute">
        <tr:column>
            <tr:outputText value="#{attribute.xnomatrb }"/>
        </tr:column>
        <tr:column rendered="#{attribute.xtipdado eq 'S' or
attribute.xtipdado eq 'L'}">
            <tr:table value="#{attribute.attributeData }" var="attributeData">
                <tr:column>
                    <tr:outputText value="#{attributeData.xvalor}" />
                </tr:column>
            </tr:table>
        </tr:column>
    </tr:table>

Move the "rendered" here off of column and down to the table.
It's evaluating once, without any "attribute", at which point
the expression is "null eq S or null eq L", which is false,
so the column doesn't render at all.


-- Adam


On 5/7/07, Adam Winer <awiner@gmail.com> wrote:
> Don't know.  I'd ask on the facelets list.  Do you happen
> to have any comments inside the facet, or have you
> e-mailed the exact XML content you're using?
>
> -- Adam
>
>
> On 5/7/07, Francisco Passos <francisco.passos@gmail.com> wrote:
> > After moving "rendered" from f:facet to tr:table, the error remains the
> > same, it complains that the facet can only have one child. What could cause
> > this?
> >
> >
> > On 5/7/07, Adam Winer <awiner@gmail.com> wrote:
> > > The only obvious problem there is that f:facet doesn't support
> > > "rendered" - Facelets should be complaining.  You have to put
> > > "rendered" on the table, not the facet.
> > >
> > > -- Adam
> > >
> > >
> > > On 5/7/07, Francisco Passos < francisco.passos@gmail.com> wrote:
> > > > I suppose it should indeed work inside of a column, but it isn't.
> > > >
> > > > I've tried with a detailStamp like this:
> > > >
> > > >     <tr:table value="#{ fichaOperadorBean.attributes}" var="attribute"
>
> > > >         <tr:column>
> > > >             <tr:outputText value="#{attribute.xnomatrb}"/>
> > > >         </tr:column>
> > > >         <f:facet name="detailStamp" rendered="#{attribute.xtipdado
eq
> > 'S' or
> > > > attribute.xtipdado eq 'L'}">
> > > >             <tr:table value="#{attribute.attributeData }"
> > > > var="attributeData">
> > > >                 <tr:column>
> > > >                     <tr:outputText value="#{ attributeData.xvalor}"
/>
> > > >                 </tr:column>
> > > >             </tr:table>
> > > >         </f:facet>
> > > >     </tr:table>
> > > >
> > > > and I got an error: <f:facet> Facet Tag can only have one child
> > UIComponent
> > > >
> > > > I don't understand, since the facet only has the tr:table. I also tried
> > it
> > > > using a tr:panelGroup with the tr:table in it, but to no avail.
> > > >
> > > > What can I do?
> > > >
> > > >
> > > > On 5/6/07, Adam Winer <awiner@gmail.com> wrote:
> > > > > Hrm.  It is supposed to work inside of a column as well
> > > > > as a detailStamp...
> > > > >
> > > > > -- Adam
> > > > >
> > > > >
> > > > > On 5/4/07, Brian Smith < unobriani@gmail.com> wrote:
> > > > > > Try wrapping your nested table inside of a detailStamp facet
instead
> > of
> > > > a
> > > > > > column
> > > > > >
> > > > > >     <tr:table value="#{ fichaOperadorBean.attributes}"
> > var="attribute">
> > > > > >         <tr:column>
> > > > > >             <tr:outputText value="#{ attribute.xnomatrb }"/>
> > > > > >         </tr:column>
> > > > > >         <f:facet name="detailStamp">
> > > > > >             <tr:table value="#{attribute.attributeData }"
> > > > > > var="attributeData">
> > > > > >                 <tr:column>
> > > > > >                     <tr:outputText value="#{attributeData.xvalor}"
> > />
> > > > > >                 </tr:column>
> > > > > >             </tr:table>
> > > > > >         </f:facet>
> > > > > >     </tr:table>
> > > > > >
> > > > > > Here is a demo
> > > > > >
> > > >
> > http://www.irian.at/trinidad-demo/faces/components/table_nested.jspx
> > > > > >
> > > > > > Here is the source
> > > > > >
> > > >
> > http://www.irian.at/trinidad-demo/faces/components/table_nested.jspx.source
> > > > > >
> > > > > >
> > > > > >  On 5/4/07, Francisco Passos <francisco.passos@gmail.com>
wrote:
> > > > > > > Hello there.
> > > > > > >
> > > > > > > I'm attempting to use a tr:table within another one and
the second
> > one
> > > > > > doesn't show. I'm trying to present a list of values, where
each
> > value
> > > > may
> > > > > > have a list of different values. So I was aiming for something
like
> > > > > > >
> > > > > > > Column 1 | Column 2
> > > > > > > ---------|-----------
> > > > > > > Value 1  | SubValue 1
> > > > > > >          | SubValue 2
> > > > > > > ---------|-----------
> > > > > > > Value 2  | SubValue 3
> > > > > > >          | SubValue 4
> > > > > > >          | SubValue 5
> > > > > > >
> > > > > > > This does not work:
> > > > > > >
> > > > > > >     <tr:table value="#{fichaOperadorBean.attributes}"
> > var="attribute">
> > > > > > >         <tr:column>
> > > > > > >             <tr:outputText value="#{ attribute.xnomatrb
}"/>
> > > > > > >         </tr:column>
> > > > > > >         <tr:column rendered="#{attribute.xtipdado eq
'S' or
> > > > > > attribute.xtipdado eq 'L'}">
> > > > > > >             <tr:table value="#{ attribute.attributeData
}"
> > > > > > var="attributeData">
> > > > > > >                 <tr:column>
> > > > > > >                     <tr:outputText value="#{
> > attributeData.xvalor}" />
> > > > > > >                 </tr:column>
> > > > > > >             </tr:table>
> > > > > > >         </tr:column>
> > > > > > >     </tr:table>
> > > > > > >
> > > > > > >
> > > > > > > Whereas this does indeed work (the same, but using h:dataTable
> > instead
> > > > of
> > > > > > tr:table):
> > > > > > >
> > > > > > >     <h:dataTable value="#{ fichaOperadorBean.attributes
}"
> > > > var="attribute">
> > > > > > >         <h:column>
> > > > > > >             <tr:outputText value="#{ attribute.xnomatrb}"/>
> > > > > > >         </h:column>
> > > > > > >         <h:column rendered="#{attribute.xtipdado eq
'S' or
> > > > > > attribute.xtipdado eq 'L'}">
> > > > > > >             <h:dataTable value="#{ attribute.attributeData}"
> > > > > > var="attributeData">
> > > > > > >                 <h:column>
> > > > > > >                     <tr:outputText value="#{ attributeData.xvalor
> > }" />
> > > > > > >                 </h:column>
> > > > > > >             </h:dataTable>
> > > > > > >         </h:column>
> > > > > > >     </h:dataTable>
> > > > > > >
> > > > > > > Is there another intended way to use tr:table for this
to work?
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >
>

Mime
View raw message