wood burning stoves 2.0*
The moose likes JSF and the fly likes jsf ajax rerender inputText Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "jsf ajax rerender inputText" Watch "jsf ajax rerender inputText" New topic
Author

jsf ajax rerender inputText

Thomas Poffet
Greenhorn

Joined: Mar 28, 2008
Posts: 9
Hi,
I have a selection list and detail inputText elements which should be populated according to the selection.
But unfortunately I cannot manage to populate an inputText field upon selection.
The backing bean is working fine, because if I change from inputText to outputText it works.
What am I doing wrong? Are inputText fields not rerenderable?

Following are some code extracts:

<rich:panel header="test immediate FLC update" >
...
<h:selectOneListbox
valueChangeListener="#{seaFltHandling.doPopulateDetails}"
onchange="submit()"
immediate="true"
value="#{seaFltHandling.selectedItem}" >
<f:selectItems value="#{seaFltHandling.selection}" />
<a4j:support event="onchange" reRender="rep" />
</h:selectOneListbox>
...
<h:inputText maxlength="3" size="2" value="#{seaFltHandling.flcArr}"
rendered="true"
styleClass="normalbold" id="rep" />
...
Bob Good
Ranch Hand

Joined: Jan 09, 2008
Posts: 86
does you backing bean have a both getFlcArr and a setFlcArr?
Thomas Poffet
Greenhorn

Joined: Mar 28, 2008
Posts: 9
Yes it has both and it works when I use hutputText instead of h:inputText
Bob Good
Ranch Hand

Joined: Jan 09, 2008
Posts: 86
if you debug / break on the getter, is it going up to the server when you expect?
Varun Garg
Greenhorn

Joined: Apr 17, 2008
Posts: 1
The setter on the inputText gets called after the value has been changed, if you define the a4j:region just on the object creating the event, then the setter does not get called and it works perfectly.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: jsf ajax rerender inputText
 
Similar Threads
how to force setter in jsf??
JSF onchange event on SelectOneListbox
inputtext Valuchangelistener ISSUE
Problem with loading the data after Value Change Listener on selectonemenu
Spurious valueChangeListener calls on same JSP page