Hello all,
I have a Jsff page in that i have 2 panel group layout with panel form layout with some input fields in both.
in first panel form layout i have select one choice drop down with 2 values in that.
based on the selection of the list the second panel group layout will get rendered/visible(suggest me which one to use)
but i am facing the problem when i select the value from the drop down it will navigate to the main page.
here is my code.
<af:selectOneChoice value="#{bindings.IsPersentAddDifferent.inputValue}"
label="#{bindings.IsPersentAddDifferent.label}"
required="#{bindings.IsPersentAddDifferent.hints.mandatory}"
shortDesc="#{bindings.IsPersentAddDifferent.hints.tooltip}"
id="soc1"
valueChangeListener="#{UserManagement.isPresentAddresVCL}"
autoSubmit="true">
<af:selectItem label="Yes" id="si1" value="Y"/>
<af:selectItem label="No" id="si2" value="N"/>
</af:selectOneChoice>
bean code:
private RichPanelGroupLayout updateValue;
public void isPresentAddresVCL(ValueChangeEvent valueChangeEvent) {
valueChangeEvent.getComponent().processUpdates(FacesContext.getCurrentInstance());
System.out.println(valueChangeEvent.getNewValue().toString());
if (valueChangeEvent.getNewValue() != null &&
valueChangeEvent.getNewValue().toString().equalsIgnoreCase("Y"))
updateValue.setVisible(false);
else if (valueChangeEvent.getNewValue() != null &&
valueChangeEvent.getNewValue().toString().equalsIgnoreCase("N"))
updateValue.setVisible(true);
AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
adfFacesContext.addPartialTarget(updateValue);
}
public void setUpdateValue(RichPanelGroupLayout updateValue) {
this.updateValue = updateValue;
}
public RichPanelGroupLayout getUpdateValue() {
return updateValue;
}
}
and i have changed autosubmit =true for the select one choice and partialtrigger =si1 si2 for the secound panel group layout
Thanks in advance
Cheers