Hello all,
as far as I have understood, I have at least two possibilities to make a
clickable list with h:dataTable.
The first option is to have the selected row injected per @DataModelSelection.
The second option is to have an action method with parameter, for example:
| <h:dataTable var="task" value="#{aufgabenFreigeber}">
| <h:column>
| <s:link action="#{aufgabenliste.onVersionBearbeiten(task)}">
| <h:outputText value="#{task.version.versionsnummer}" />
| </s:link>
| </h:column>
| </h:dataTable>
|
Either seems to work perfect, but are there differences? In my eyes, the method
parameter way has several advantages:
- reduces the number of necessary injections (important since every injection
must be done on every method call)
- multiple dataTables on one page may use the same action methods, no different
DataModelSelection variables to evaluate
Does the DataModelSelection way also have advantages? If not, what is it for?
Marcus.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106701#4106701
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106701
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user