I have the following button
<p:button
onclick='javascript:Open_2_Windows_SideBy_Side("#{bean.id}", "#{bean.title}"); return false;' value="View Item">
</p:button>
The javascript basically opens two browser windows, one is a help page with instructions for how to interact with the second window, which is details of the item retrieved with a GET from an external application using the item.id
In the help window, I simply only use #{param.title}
but now I want to utilize more of the items properties. I don't want to send more URL parameters.
I tried
<p:commandButton
onclick='javascript:Open_2_Windows_SideBy_Side("#{bean.id}", "#{bean.title}");
return false;' value="View Item">
<f:setPropertyActionListener value="#{item}" target="#{helpView.selectedItem}" />
</p:commandButton>
And then in the help.xhtml I put
#{helpView.selectedItem.title}"
But the selectedItem property is never set in the helpView backing bean.
Is there a way to set the selected item from first view to the help View, or do I need to requery that item in my helpView using the id set using o:viewParam
and Converter?
My thought is I've already done the query to the database in the first view when I got a list of items and rather not have to requery the database.