Inside a primefaces overlayPanel
I am asking a user for a value, which will be reused directly afterwards. So I don't want to save it in a backing bean.
Here's the code:
<p:overlayPanel id="ovlpanel" for="copy" hideEffect="fade" style="width:300px">
<h:form>
<p:panel id="grid" header="#{msg.copy_item}">
<h:panelGrid columns="2" cellpadding="5"
styleClass="ui-panelgrid-blank">
<p:outputLabel value="#{msg.number_of_copies}: " for="number_of_copies" />
<p:column>
<p:inputText id="number_of_copies"
value="tempValNumberOfCopies" />
</p:column>
</h:panelGrid>
<p:commandButton
action="#{controller.copyItem(tempValNumberOfCopies)}"
value="#{msg.copy}" />
</p:panel>
</h:form>
</p:overlayPanel>
I want to save the value for tempValNumberOfCopies
inside a temporary variable and use it in the action of the button.
Do you maybe have any ideas how to implement that?