In navigationBorder.add(new MyList("myList",
databaseManager.loadAndGetGroups()));
databaseManager.loadAndGetGroups() should return a reloading model
like LoadableDetachableModel which in the load method always goes to
the database
I assume that right now it simply returns a list or a non reloading model.

Maurice

On Mon, Apr 14, 2008 at 8:08 AM, Milan Křápek <[EMAIL PROTECTED]> wrote:
> Hi,
>   I am  still stack on this problem. It seems that page refresh does not 
> help. I try to add javascript command window.refresh and window.reload but 
> this does not wokr too.
>   Only thing that helps is new call of this page constructor. (I add some 
> refrsh link, that generates the new page)
>   This seems that I have bad written page constructor. That on the refresh 
> the model is not updated.
>
>  Here are some snippets of y code:
>
>  public class Page extends MainTemplate // maintemplate is some base page 
> that gives common look
>  {
>     // Inject spring bean for group management
>     @SpringBean(name="baseGroupManager")
>     private DtabaseManager databaseManager;
>
>     public Page() {
>         // Create navigation border
>         // this creates something like navomatic example on wicket
>         NavigationTable navigationBorder = new 
> NavigationTable("navigationBorder");
>
>         // Add items to page body
>         // model is created by calling function that receive some data from 
> database
>         navigationBorder.add(new MyList("myList", 
> databaseManager.loadAndGetGroups()));
>         /
>         // Add navigation border
>         add(navigationBorder);
>
>
>
>         // Add Add modal window
>         final ModalWindow addWindow;
>         navigationBorder.add(addWindow = new ModalWindow("addWindow"));
>
>         addWindow.setContent(new 
> GroupManagementAddPanel(addWindow.getContentId(), addWindow));
>         addWindow.setTitle("Add Group.");
>         addWindow.setCookieName("addWindow");
>
>         addWindow.setCloseButtonCallback(new ModalWindow.CloseButtonCallback()
>         {
>             @Override
>             public boolean onCloseButtonClicked(AjaxRequestTarget target)
>             {
>                 return true;
>             }
>         });
>
>         addWindow.setWindowClosedCallback(new 
> ModalWindow.WindowClosedCallback()
>
>         {
>             @Override
>             public void onClose(AjaxRequestTarget target)
>             {
>                 getPage().modelChanged();
>                 setResponsePage(target.getPage());
>                 setRedirect(true);
>             }
>         });
>
>         navigationBorder.add(new AjaxLink("add")
>         {
>             @Override
>             public void onClick(AjaxRequestTarget target)
>             {
>                 addWindow.show(target);
>             }
>         });
>     }
>  }
>
>  Please do anybody see something wrong. Let me know.  I do not know why the 
> model
>   navigationBorder.add(new MyList("myList", 
> databaseManager.loadAndGetGroups()));
>  is not reloaded. The constructor of MyList class just call super(id, list);
>
>  Thanks for your advice
>
>
>
>  Milan
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to