'Call data from another form in jsf
I need to call the data that is in another form, is this possible? I publish a summary code. I use this is Java + JSF + Primefaces When I look for the values of tramiteBean.description, I get null. Thank you
<p:tabView id="tab">
<p:tab title="Title1">
<h:form id="form1">
<p:textEditor value="#{tramiteBean.descripcion}" id="descripcion"/>
<p:inputNumber value="#{tramiteBean.idTipo}" id="tipo"/>
</h:form>
</p:tab>
<p:tab title="Title2">
<h:form id="form2">
<p:commandButton value="Send" actionListener="#{control.doSome}" update=":tab:form1"/>
</h:form>
</p:tab>
</p:tabView>
Solution 1:[1]
I don't think that is possible. Taking input from one form and submiting another form works. Why don't you wrap the entire tabView in a single form?
<h:form>
<p:tabView id="tab">
<p:tab title="Title1">
<p:textEditor value="#{tramiteBean.descripcion}" id="descripcion"/>
<p:inputNumber value="#{tramiteBean.idTipo}" id="tipo"/>
</p:tab>
<p:tab title="Title2">
<p:commandButton value="Send" actionListener="#{control.doSome}" update=":tab:form1"/>
</p:tab>
</p:tabView>
</h:form>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Asgar |
