I am using Primefaces 3.0. I have a datatable with selectionMode single as shown below:
<p:dataTable id="paySumm" var="PSummRow"
value="#{beanPySummary.PySummariesModel}"
selection="#{beanPySummary.selectedPySummary}" selectionMode="single" paginator="true"
rows="15" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink}
{CurrentPageReport} {NextPageLink}" rowsPerPageTemplate="10,15,25,35" >
<p:ajax event="rowSelect" listener="#{beanPySummary.onRowSelect}" />
I have some business logic in the method onRowSelect and then I navigate to another page.
public String onRowSelect(SelectEvent event) {
......
ConfigurableNavigationHandler configurableNavigationHandler =
getCurrentInstance().getApplication().getNavigationHandler();
configurableNavigationHandler.performNavigation("MoreDetail?faces-redirect=true
return "";
I have some data that I would like to pass as parameters to MoreDeatils with includeViewParam. I can define those as f:ViewParam in MoreDeatils.xhtml. I am not sure if I need to use ManagedProperty annotation and at the same time define those params as hidden fields on my datatable page. Here I need advise and directions.
Thanks,
Peter
You can just send a redirect by
ExternalContext#redirect(). The data which you’d like to send along needs to be set in the query string of the URL.Please note that (ajax) action listener methods are supposed to return
void.