• Post Reply Bookmark Topic Watch Topic
  • New Topic

datatable contents not updating  RSS feed

 
JP Estrada
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!