I'm using Icefaces 1.8.2 and an ice:inputTextarea
control, and I can't figure why the value is not getting set here:
.jsp
<ice:inputTextarea binding="#{easp$RecordSearch.repairRemark}" id="repairRemark"
partialSubmit="true" style="height:40px; width:100%;" />
.java
//bean
private HtmlInputTextarea repairRemark = new HtmlInputTextarea();
public HtmlInputTextarea getRepairRemark() {
return repairRemark;
}
public void setRepairRemark(HtmlInputTextarea hit) {
this.repairRemark = hit;
}
....
public String button3_action() {
...
//code that sets value
String myVal = "new value";
this.repairRemark.setValue(myVal);
...
return null;
}
The code that sets the value is part of a button click event that I know is getting fired because I'm setting several other Icefaces controls, and all the other setters are working except this one. I just noticed that it actually appears to set the text very briefly, but disappears instantly. I checked all the code on that page, and I'm almost certain there is no other setter overwriting it. Does anyone know what is going here?
Update:
It does not seem to be a "phase" related issue, as this event is being processed in the INVOKE_APPLICATION
phase. Also to note, I'm experiencing the same issue with the jsf h:inputTextarea
I found the cause and solution. The cause was the ice:commandButton
s that were triggering this click event were in a column in a ice:dataTable
. The ice:dataTable
had an ice:rowSelector
that seemed like it was causing an additional server request when a button was clicked. When I removed the ice:rowSelector
, the problem went away.
The solution was to add either toggleOnClick="false"
or toggleOnInput="false"
to the ice:rowSelector
. I added both, just in case.
http://res.icesoft.org/docs/v1_8_2/tld/ice/rowSelector.html
Hope this helps anyone else that runs into this issue.