0

Im starting with jsf with icefaces and i need to do this this is my mysql table

links table

I want to generate an outputlink for each row, thats what i did

fail!

LuisM
  • 35
  • 5

2 Answers2

1

Based on Mr @BalusC's answer, you can achieve that by :

<h:dataTable value="#{bean.someList}" var="v" binding="#{someList}" rules="all">
     <h:column>
          <f:facet name="header">titulos</f:facet> #{v.field1}
     </h:column>
     <h:column>
          <f:facet name="header">link</f:facet> #{v.field2}
     </h:column>
     <h:column>
          <h:outputLink>www.newentity#{someList.rowIndex + 1}.com</h:outputLink>
     </h:column>
 </h:dataTable>

In case the generated current website number does not depend to the row table, but rather to some current entity value, then replace the last column content by:

         <h:outputLink>www.newentity#{v.someIdentifiantField}.com</h:outputLink>
Community
  • 1
  • 1
Omar
  • 1,430
  • 1
  • 14
  • 31
0

You can use one of these <h:outputLink >, <h:commandLink > , or <h:link> components depending on your use case.