-
1. Re: can navigation from-action method have parameters?
pjot Apr 11, 2010 3:08 PM (in response to shin0135)Hi James, normlly it works perfectly, if you use parameters in the action expression. One can even call the action method dynamically on some SEAM/JSF component:
call the action
<a4j:commandLink action="#{actionHandler[actionHandler.selectedAction]}"/>
and navigate with
<navigation from-action="#{actionHandler[actionHandler.selectedAction]}"> .. </navigation>
In your case the question is rather: are you sure the rowIndex is of type String? I guess, the EL expression
#{someBean.showDetails(rowIndex)}
doesnt get evaluated to the method
showDetails(final String rowIndex)
And by the way, i would recommend a very nice book Seam In Action by Dan Allen, Chapter 2.5.1, where u can find very usefull info about drill downs.
-
2. Re: can navigation from-action method have parameters?
shin0135 Apr 12, 2010 2:24 AM (in response to shin0135)Pjot,
Yes, I'm positive the rowIndex is type String. I have a rich:dataTable like
<rich:dataTable id="d1" rowKeyVar="rowIndex"> ... </rich:dataTable>
I could have used @DataModelSelection for a selected row from the rich:dataTable, but I'm trying to not use @DataModelSelection. To achieve that, I came up with an idea of passing a row index when a user clicks an a4j:commandLink 'showDetails'. So, my a4j:commandLink looks like
<a4j:commandLink id="l1" action="#{someBean.showDetails(rowIndex)}" value="Details" />
In my showDetails method, I could see rowIndex is passed correctly.
Odd, why the navigation doesn't work in pages.xml.