On Wed, Oct 8, 2008 at 12:47 AM, Hugo Palma <[EMAIL PROTECTED]> wrote: > I have a search form and a grid with the results. > I'd like to submit the form and update the grid with the filtered results > without doing a full page refresh. > > My take on this is to set the form component "zone" parameter to the grid > zone id so that the form submit it's treated "AJAX way" and the submission > triggers the grid zone to get updated. The form submit event handler method > filters the search results, changes the property that the grid uses as > datasource and returns the Grid component itself. > > This strangely enough only works the first time i perform the search. From > there on i always get an exception when i click the search button, that > seems to be related to the fact that the Grid doesn't acknowledge that the > datasource size has changed. Here's the stack trace: > > Caused by: java.lang.IndexOutOfBoundsException: Index: 10, Size: 10 > at java.util.ArrayList.RangeCheck(ArrayList.java:547) > at java.util.ArrayList.get(ArrayList.java:322) > at > org.apache.tapestry5.internal.grid.CollectionGridDataSource.getRowValue(CollectionGridDataSource.java:111) > at > org.apache.tapestry5.corelib.components.Grid$CachingDataSource.getRowValue(Grid.java:324) > at > org.apache.tapestry5.corelib.components.GridRows.setupForRow(GridRows.java:238) > at > org.apache.tapestry5.corelib.components.GridRows$SetupForRow.execute(GridRows.java:70) > at > org.apache.tapestry5.corelib.components.GridRows$SetupForRow.execute(GridRows.java:57) > at > org.apache.tapestry5.corelib.components.Form.executeStoredActions(Form.java:447) >
from the above stack trace seems like the DataSource was cached right? could that be the problem? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]