Question

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!

Was it helpful?

Solution

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>

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top