-
1. <rich:dataTable> with a static content?
ilya_shaikovsky Mar 23, 2011 7:34 AM (in response to xmdx)1 of 1 people found this helpfuliteration component will not works without dataModel
So just use html table and apply richfaces rich-* classes listed in documentation.
-
2. <rich:dataTable> with a static content?
nbelaevski Mar 23, 2011 12:30 PM (in response to xmdx)You can use value="#{facesContext}" and iterate over those single object. But I'm curious - why use JSF component when all you need is HTML markup?
-
3. Re: <rich:dataTable> with a static content?
hegemondev Sep 5, 2012 4:08 AM (in response to nbelaevski)The problem is with richFaces. Static tables are not skinned, and look completely different. You have to provide the "look" manually (by applying all kinds of css styles), which is awful.
**The solution is: use rich:dataTable, providing some dummy value** (*rich:dataTable value="DummyStaticValue"*) and use *rich:columnGroup* together with *rich:column*. Your combination will only be rendered once (because of the dummyValue being just a string), and you can get any table structure you want.
<rich:dataTable width="100%" value="DummyStaticValue">
<f:facet name="header">
<h:outputText value="myHeader" />
</f:facet>
<rich:columnGroup>
<rich:column>
<h:outputText value="myValue1" />
</rich:column>
<rich:column>
<h:outputText value="myValue2" />
</rich:column>
</rich:columnGroup>
<rich:columnGroup>
<rich:column>
<h:outputText value="myValue3" />
</rich:column>
<rich:column>
<h:outputText value="myValue4" />
</rich:column>
</rich:columnGroup>
</rich:dataTable>