Olá,
deixa eu tentar explicar um pouco do problema…
Tenho 2 <h:selectOneRadio>
aninhados, sendo que esse segundo, no onclick eu abro um modalPanel com mais um <h:selectOneRadio>
um <h:inputText>
e um botao. até aí tudo bem; o problema acontece quando clico nesse botao, o método na action é chamado e eu precisaria de recuperar os valores desses 2 <h:selectOneRadio>
aninhados… o value="" dos 2 sao do tipo int, e sempre que verifico o método no debug, os mesmo vem preenchido como 0, ou seja, perdeu seu valores após abrir o modalPanel… alguma ideia de como recupera-los ?
<a4j:form>
<h:selectOneRadio value="#{tester.researchType}">
<f:selectItem itemValue="01" itemLabel="Type 1" />
<f:selectItem itemValue="02" itemLabel="Type 2" />
<f:selectItem itemValue="03" itemLabel="Type 3" />
<a4j:support event="onclick" reRender="pg_category" />
</h:selectOneRadio>
<h:panelGroup id="pg_category">
<a4j:outputPanel rendered="#{tester.researchType gt 0}">
<h:selectOneRadio value="#{tester.category}" onclick="#{rich:component('modalTest')}.show()">
<f:selectItem itemValue="01" itemLabel="Categ. 1" />
<f:selectItem itemValue="02" itemLabel="Categ. 2" />
<f:selectItem itemValue="03" itemLabel="Categ. 3" />
</h:selectOneRadio>
</a4j:outputPanel>
</h:panelGroup>
</a4j:form>
<rich:modalPanel id="modalTest" width="250" height="300">
<a4j:form>
<h:selectOneRadio value="#{tester.materialType}">
<f:selectItem itemValue="01" itemLabel="Type 1" />
<f:selectItem itemValue="02" itemLabel="Type 2" />
<f:selectItem itemValue="03" itemLabel="Type 3" />
</h:selectOneRadio>
<br/>
<h:inputText value="#{tester.materialNumber}" /><a4j:commandButton action="#{tester.testing}" />
</a4j:form>
</rich:modalPanel>
@Name("tester")
public class DBTest {
private int researchType;
private int category;
private int materialNumber;
private int materialType;
public void testing(){
System.out.println(researchType);
}
//getters n setters
alguma ideia? ou sabem alguma melhor forma de como fazer?
Grato