Hi Groovie,

rendered works fine on tc:column.

but you can't use the row variable for this, because the rendering of
a column can't depend on the row.
Or how would you expect e.g. exel to render a column in one row but
not in the next?

I thing what  you want is to render different content, row dependent,
in the same column? Than you should use the rendered not on the
column but on the out.

<tc:column label="...">
  <tc:panel>
    <tc:out rendered="#{currentLine.booleanBeanAttrib1}" value="..."/>
    <tc:out rendered="#{currentLine.booleanBeanAttrib2}" value="..."/>
    <tc:out rendered="#{currentLine.booleanBeanAttrib3}" value="..."/>
  </tc:panel>
</tc:column>

The panel surrounding the tc:out is not needed, but without you will
get a warning about layout problems in the log file.

Regards,

    Volker




2008/11/4 GroovieMan <[EMAIL PROTECTED]>:
>
> Hy Volker,
>
> the use of rendered will fail with tc:sheet variables, for (maybe
> the same reason as the JSTL problem).
> <tc:columns rendered= ...> runs perfectly with variables,
> that have been defined as beans on inside faces-config.xml.
> For any reason, the use of variable-declaration inside the tc:sheet
> (here currentLine) fails barely.
> The variable instance seems to exist, cause JSF can locate
> somewhat by using the expression "currentLine.booleanBeanAttrib1",
> but the result is strange. Iff you use the debugger and place a
> breakpoint into the isBooleanBeanAttrib1 methode of your data-bean,
> then you may find out, that the method is never been called.
> Anyway the varibale #{currentLine.booleanBeanAttrib1} returns
> a true, ughh where did it come from ??? that's weired!!!
>
> In order to circumscribe the bug, i defined a listviewer boolean attribute
> and received the expected result.
>
> As a consequence of this, i assume that there is a bug in tobago,
> with the internal sheet-tag handling of the var(iable).
>
> Anyway any workaround is welcomed, cause this is a blocking-point
> for my work.
>
> Thank you all
> Groovie
>
> I opened a bug in Tobago for further discussing:
>
> https://issues.apache.org/jira/browse/TOBAGO-719
>
>
>
>
> Volker Weber-5 wrote:
>>
>>
>> you can't use jstl inside a tc:sheet, because it evaluates not at
>> rendering time.
>>
>> you can use the rendered attribute of tc:column :
>>
>> <tc:sheet value="#{listviewer.showLines}" id="sheet"
>>    columns="1*;1*;1*;1*;1*;1*"
>>    var="currentLine"
>>    [... deleted...]
>>    selectable="single" >
>>
>>      <tc:column rendered="#{currentLine.booleanBeanAttrib1}"
>>        label="#{overviewBundle.selsyslst_lst_nameId}"
>>
>>
> --
> View this message in context: 
> http://www.nabble.com/-TOBAGO--Usging-jstl-tags-inside-a-tobago-sheet-tag-tp20297480p20318017.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>



-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13      | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de

Reply via email to