Using Primefaces 3.1.1.
I would like to add two date values and subtract two date values.
<p:calendar widgetVar="Var1" id="ID1" value="#{Bean.Till}" pattern="HH:mm" timeOnly="true" mode="popup" showOn="button">
<p:calendar widgetVar="Var2" id="ID2" value="#{Bean.Late}" pattern="HH:mm" timeOnly="true" mode="popup" showOn="button">
A managed bean is called on the click of a submit button.
<h:commandButton value="Save" action=" #{timePickingBean.submitMethod}" >
<f:ajax execute="@form" render="SUM DIFFERENCE" />
</h:commandButton>
My question: How does one read the two 'IDs' or 'WIdgetVars' from the managedbean (.java) file to add them and subtract them later and store the values back into 'SUM' and 'DIFFERENCE'?
Thank you in advance!
-V