I have a <p:tabView>
on my screen where one of the tabs(<p:tab>
) has several <pe:inputNumber>
with minValue attribute set to -9999999999.99. When I enter any value be it positive or negative and switch between the tabs, the input value resets to its initial value whereas for the inputs with no minValue set, it retains the entered value after switching between the tabs.
Is there attribute i am missing to set ? Or is there a workaround for the same?
Edit : I'm using primefaces 5.3 and primefaces-extensions 4.0.0. My code for tabs is as shown below :
<p:tabView id="sections" style="width:inherit;background-color: #F0F0F0;">
<p:ajax event="tabChange" listener="#{tabbedViewManagedBean.onTabChange}" />
<p:ajax event="tabClose" listener="#{tabbedViewManagedBean.onTabClose}" />
<p:tab title="First Tab" id="firsttab">
<ui:include src="firsttab.xhtml" />
</p:tab>
<p:tab title="Second Tab" id="secondtab">
<ui:include src="secondtab.xhtml" />
</p:tab>
</p:tabView>
The tabbed view managed bean gets data for that tab when switching between the tabs. Each tab has its own session scoped managed beans.
The code for secondtab.xhtml is :
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:p="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions">
<h:outputText value="Net Loss :" />
<pe:inputNumber value="#{secondTabMB.netLoss}"
symbol="$ " minValue="-99999999999999.99" />
</ui:composition>