aspose file tools
The moose likes JSF and the fly likes datatable contents not updating Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "datatable contents not updating" Watch "datatable contents not updating" New topic
Author

datatable contents not updating

JP Estrada
Ranch Hand

Joined: Mar 21, 2006
Posts: 47
How come when i change the contents of the array to which the datatable is bound, the datatable does not reflect the change?

I have a checkbox for each row in the datatable. they are bound to a boolean property of an object.. but when i change the values, and run in debug mode, i do see that there values of the array changes. but it just doesn't show in the datatable..why is that?
Darryl Nortje
Ranch Hand

Joined: Jun 11, 2002
Posts: 140
Hi there JP,

The moderators are probably going to ask you to change your name, according to the naming policy or something like that.

As to your problem, the short answer is. It should. So perhaps something else is going wrong. Send your code, let's have a look and see if we can help.
JP Estrada
Ranch Hand

Joined: Mar 21, 2006
Posts: 47
Thanks for replying Darryl.. i did some testing, with the table. I bound the same property to an outputText, checkbox and a inputText. The outputText reflected the change, but the checkbox and inputText did not. Have you encountered this problem before?

here's my JSF:

<h:inputHidden id="testText2" value="#{vararrCities.selectedStr}"/>
<hutputText id="testText" value="#{vararrCities.selectedStr}" rendered="true"/>
<h:selectBooleanCheckbox id="checkbox1"value="#{vararrCities.selectedStr}" />



i updated it this way in my backing bean:

city[0] = new CityBean();
city[0].setCity_id(444);
city[0].setSelectedStr("false");
city[0].setCity_name("TEST CITY");
Darryl Nortje
Ranch Hand

Joined: Jun 11, 2002
Posts: 140
Howzit JP

No problem. Can you try save me a little time, by sending your entire jsp and entire bean. I'm getting busy here at work, so it'll just save me some time in helping you.

cheers
Darryl
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: datatable contents not updating
 
Similar Threads
Empty text Field Validation in JSF data Table
setValue -Method not called
Datatable Refresh Issue
A viewpage, a table and two backing beans
Multiple selectOneMenu with same value