There is one dropdown and one button. After selecting any item and clicking on button I have to display the selected item in the confirmation dialog, how to achieve this. I am using jsf and prime faces. Below is my sample code:
For dropdown:
<p:selectOneMenu
value="#{decRm.fi_templType}" styleClass="combobox"
id="temptypID" style="Width:30%" filter="true" onchange="selectedinput()">
<f:selectItem itemLabel="--#{lang.select}--" disabled="#
{decRm.disableTemplate}"
itemValue="--Select--" />
<f:selectItems value="#{decRm.templtList}"></f:selectItems>
</p:selectOneMenu>
For dialog box:
<p:commandButton value="#{lang.gen_temp}">
<p:confirm header="Confirmation!" message="#{temptypID}" ></p:confirm>
</p:commandButton>
<p:confirmDialog global="true" showEffect="fade" hideEffect="fade">
<p:commandButton value="Yes" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" onclick="generateTemplate('FI')" />
<p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
</p:confirmDialog>
Below is the front end screenshot. Suppose I selected T1 from list, I want to display T1 in the confirmation box.