Hi,

I'm trying to select a item of inmethod grid after adding it in an ajax
call. Based on the current sort properties and filters, after I effectively
add the element in the database but in the same ajax call I'm determining
the element's page number and try to set it as current page in the grid. My
code works except in the case when the created element is in the last page
(the current grid page page count is cached internally in
AbstractPageableView.cachedPageCount). In this case the cachedPageCount is
equal to the create element page and when calling
grid.setCurrentPage(newPage) { ... if (page < 0 || page >= pageCount &&
pageCount > 0) ... } throws IndexOutOfBounds exception. I want to clear the
cachedPageCount somehow ... or maybe there is another solution? I want to
select the new page in the same ajax call. For the moment if I encounter
this situation I select the previous page ... but the my newly created
element is on the next one :(

Can somebody help me with some hints?

Thank you

-- 
_____________________________________________________
Elvis Ciocoiu
Senior Consultant

Synthesys Consulting ROMANIA

address: http://www.synthesys.ro
e-mail: elvis.cioc...@synthesys.ro
mobile : (40) 0745 13 75 85

This message and any attachments contain information, which may be
confidential or privileged.
If you are not the intended recipient, please refrain from any
disclosure, copying, distribution or use of this information.
Please be aware that such actions are prohibited. If you have received
this transmission in error, kindly notify us by email to
off...@synthesys.ro. We appreciate your cooperation.

Reply via email to