Hi Steve, I would do the following (which might not be the best solution;-):
1- Create panel "EmptyOrTablePanel" with setOutputMarkupId(true); 2- and then have a child of this panel that either displays an EmptyPanel or your table: depending on whether you have records or not. You could determine that on the onBeforeRender of "EmptyOrTablePanel"panel and use addOrReplace to put the table or the EmptyPanel. 3- Just tell this panel to update itself after AJAX operations. Best, Ernesto On Wed, Jun 30, 2010 at 3:29 PM, Steve Hiller <[email protected]> wrote: > Hi All, > > I have what seems like a strange problem with refreshing a DataView. > > I have a WebMarkupContainer that contains a DataView. > The DataView uses a SortableDataProvider as its DataProvider. > The WebMarkupContainer uses the DataView's SortableDataProvider > to determine if there are any items to be displayed within the DataView. > If there any items then the WebMarkupContainer's isVisible() method > returns true, and therefore the WebMarkupContainer and DataView should > be rendered. > > I am also using a ModalWindow to add new items to the DataView. > On exiting from the ModalWindow, I am using an AjaxRequestTarget > to refresh the WebMarkupContainer and therefore redraw the DataView > with the new item added to it. > > This all works fine IF there were already items in the DataView when > it was first rendered during the initial loading of its page. > > If the DataView is initially empty then the WebMarkupContainer > is not rendered as expected on page load. My issue is that adding new > items via the ModalWindow does not cause the WebMarkupContainer and > DataView to be rendered. Via debugging, I can see that the > WebMarkupContainer's isVisible() method is returning true yet nothing > appears. > > Any suggestions on resolving this issue would be appreciated. > > Thanks so much, > Steve > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
