You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Steve Tarlton <st...@gmail.com> on 2009/07/17 01:51:17 UTC

Update separate current select panel from AjaxSelfUpdatingTimerBehavior of inmethod DataGrid

Stumbling on this one: I am using an AjaxSelfUpdatingTimerBehavior added to
an inmethod DataGrid to have it update its datasource from a database every
15 seconds. This worked well but then I also want to update a corresponding
panel that contains data from the currently selected row of the DataGrid. I
feed to the DataGrid a data source that implements IDataSource so I can
provide my own sortIterator and have my data source pull from the database
automatically itself. Thing is, I want to update an external panel that
contains the currently selected row (I have it set to single select) if the
contents in the database changes. I figured one way to do that is to create
a getObject() method in my data source so that I can override it and get
each item being iterated over whenever the data source is refreshing and
compare it with the id of the one currently selected. This worked fine but
now I am not sure how to tell the panel to refresh itself from an Override
of the getObject() method of the extended IDataSource. Any suggestions?
Maybe I should be going about it differently and Overriding something within
the DataGrid and walking the data source from it? I know if I could do that,
the use of the AjaxRequestTarget.get() method works.

Thanks ahead of time for any help/hints on this one,
-Steve

Re: Update separate current select panel from AjaxSelfUpdatingTimerBehavior of inmethod DataGrid

Posted by satar <st...@gmail.com>.
Sorry, I should have explored deeper into the user list on this one. It was
basically already answered before in thread:
http://www.nabble.com/AjaxSelfUpdatingTimerBehavior-and-Panels-td24301204.html#a24301204

I simply changed the scope of my timer to be the whole page beings that is
all it has on it and this worked perfectly! Man I LOVE Wicket... I can do
very powerful things already and I am basically a newbie!
-- 
View this message in context: http://www.nabble.com/Update-separate-current-select-panel-from-AjaxSelfUpdatingTimerBehavior--of-inmethod-DataGrid-tp24526412p24526740.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org