Now my query can be modified based on some selectOneMenus. On the valueChangeListener i fire the query to to fetch the data again that populate the columns and rows. However I found that the getter method for the binding Datatable value was called only the first time the datatable is created. Is there some way to force the binding to the datatable again? i have tried different things including moving the pagecode to request scope.
hi, I tried using FacesContext.getCurrentInstance().renderResponse(), but it didn't work. One of my colleagues then suggested obtaining the parent UIComponent and then explicitly removing that specific child. This works.
Originally posted by gov kur: Hi, However I found that the getter method for the binding Datatable value was called only the first time the datatable is created. Is there some way to force the binding to the datatable again? i have tried different things including moving the pagecode to request scope.
Move the lazy loading to the getter of the data list instead of the dataTable.
I have the same problem you encountered, my dynamic columns dataTable is not being reRendered correctly unless i reload the whole page, which is not acceptable. Can you please tell me where you placed this piece of code, in a faces listener ? My dataTable binds to a variable stored in a session scoped bean.
Thank you, Andrei
Nasim Salehi
Greenhorn
Joined: Oct 23, 2007
Posts: 9
posted
0
Hi guys, I've encountered the same problem,would you please let me know how did you exactly solve it? I don't understand the solutions you've presented,dear gov kur what is the logic behind the way your colleagues offered?
Is workerTable the element you've bound to your datatable ? And Bauke Scholtz,what do you mean of "Move the lazy loading to the getter of the data list instead of the dataTable."?
gov kur
Ranch Hand
Joined: Aug 30, 2004
Posts: 73
posted
0
sorry Andrei ... in my case the whole page gets reloaded. On changing the selectOneMenus, I execute the follwoing code in the valueChangeListener of the selectOneMenus
after this the db query fires and using the fetched data i create the workerTable all over again. All this happens via function calls made in the valueChangeListener function. After this the whole page reloads as I have onchange="submit();" attribute in my selectOneMenu.
yes Nasim, workerTable is the element I've bound to the datatable. It's shown below
[ November 13, 2007: Message edited by: gov kur ]
Dylan Honorez
Greenhorn
Joined: Oct 02, 2006
Posts: 29
posted
0
Guys,
Anyone with a decent solution for this? I've been encountering this for a while, getting servletexceptions because my page isn't entirely re-rendered. On complete re-render no errors however.
Isn't there something cleaner than manually setting your HTMLDataTable to null?
SCJP - SCWCD
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.