myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcio Jose Coelho <coe...@consistem.com.br>
Subject Trinidad
Date Thu, 20 Oct 2011 11:51:18 GMT
Hi..
I am need to create trinidad component to render a dynamic table form a 
bean class.
This component render cells and rows from config properties.
I created xhtml page with this config:
<trh:tableLayout width="100%">
<ui:repeat value="#{tabela.atributo}" step="2" var="item" 
varStatus="status">
<trh:rowLayout>
<tr:iterator value="#{tabela.atributo}" var="el" first="#{status.index}" 
rows="2">
<trh:cellFormat width="20%">
<tr:outputLabel value="#{el.nome}:&nbsp;" />
</trh:cellFormat>
<trh:cellFormat width="30%">
<tr:inputText value="#{el.valor}" />
</trh:cellFormat>
</tr:iterator>
</trh:rowLayout>
</ui:repeat>
</trh:tableLayout>

This reder a from table like this:
| label | inputText | label | inputText|
| label | inputText | label | inputText|

I need create a page like this:

| label | inputText | label | inputText|
| label | inputText                             |
| label | inputText                             |
| label | inputText | label | inputText|

For this need. I think about custom component, extend from tableLayout:
But.. how to Create ui:repeat, trh:rowLayout, and trh:cellFormat in java 
class?
someone know how I can start this component?
Tanks..

-- 

Mime
View raw message