Reputation: 909
I'm struggling now with redirecting. I want to redirect from one page to another with usage of h:commandButton / p:commandButton. And that works, but i need to pass an argument/ parameter with that request. And then use that parameter instantly after the new page reloads.
First page:
<p:dataTable id="list" var="oneRow"
value="#{test.get_list()}" rowKey="#{oneRow.id}"
rows="15" paginator="true" paginatorAlwaysVisible="false"
paginatorPosition="bottom"
selection="#{test.oneRowObject}"
paginatorTemplate="{PreviousPageLink} {PageLinks} {NextPageLink}"
emptyMessage="----------" >
<p:column selectionMode="single"/>
<p:column headerText="ID" >
#{oneRow.getID()}
</p:column>
</p:dataTable>
And there is a commandButton which should redirect from page1 to page2, and in that page it should open dialogbox.
How can I do that? Do you have any suggestions or examples?
p - primefaces
Upvotes: 0
Views: 1665
Reputation: 6593
I think you should use <f:param/>
<h:commandButton value="Send" action="#{bean.method}">
<f:param name="paramName" value="someValue" />
</h:commandButton>
Upvotes: 1