Below is the code snippet for the JSF popup. It correctly binds the controller.text value when the form is rendered. However when we click OK the value is not being set on backing bean.
Also I can see the form values being submitted in the post on the Chrome Network Tool.
<rich:popupPanel id="revisionTextBox" width="250" height="150">
<f:facet name="header">Enter revision history text</f:facet>
<h:form method="post" action="#{controller.doSomething(this)}">
<h:panelGrid>
<h:inputTextarea
id="text"
binding="#{controller.text}"
style="border-bottom-style: none; width:100%;overflow:hidden"
disabled="false"
immediate="true"
cols="80"
value="#{controller.textValue}"
rows="7"
>
<f:ajax execute="@this @form"/>
</h:inputTextarea>
<h:panelGroup>
<h:commandButton type="button" value="OK"
onclick="#{rich:component('confirmation')}.hide();someFunction();return false" >
</h:commandButton>
<input type="button" value="Cancel"
onclick="#{rich:component('confirmation')}.hide();return false" />
</h:panelGroup>
</h:panelGrid>
</h:form>
</rich:popupPanel>
Controller
@Controller
public class TreeController implements TreeToggleListener{
private UIComponent text;
private String textValue = "HI";
public String getTextValue() {
return textValue;
}
public void setTextValue(String textValue) {
this.textValue = textValue;
}
public UIComponent getText() {
return text;
}
public void setText(UIComponent text) {
this.text = text;
}
public void doAnotherSomething(){
System.out.println("hi");
}
}