Hi,
To refresh the dataview, you need to register a windowsclosedcallback
on your modal window.
final WebMarkupContainer dataTableHolder = new
WebMarkupContainer("dataTableHolder);
dataTableHolder.setOutputMarkupId(true);
add(dataTableHolder);
dataTableHolder.add(dataTable);
window.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
public void onClose(AjaxRequestTarget target) {
target.addComponent(dataTableHolder);
}
});
Something like this should work.
-Matej
On 4/15/07, Julian Klappenbach <[EMAIL PROTECTED]> wrote:
> Here's the situation:
>
> I have a panel that displays a list of users using
> AjaxFallbackDefaultDataTable. This is working just fine. I have a button
> on the page, "Create" which launches a page based modal dialog with a form
> for gathering input on the new user. I couldn't get SubmitButton to work on
> the modal dialog form, so I tried AjaxSubmitButton, which worked. I get the
> User object from the form, persist it with the data API (EJB3), and close
> the window, which brings me back to the original user list panel.
>
> All great, except the DataTable doesn't show the new entry. I need to
> update it somehow. If I refresh, the re-rendered page / panel shows the new
> entry. So, I know it's making it into the database.
>
> What would you guys suggest? Should the traditional form submit logic work
> on a page based modal dialog (thus triggering a round trip)? Or is there a
> way that I can trigger an Ajax update of the DataTable as part of the
> closing method?
>
> Thanks in advance.
>
> -jjk
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/wicket-user