Please ignore. I have figured it out myself.

Hi

The problem is that findParent(BasePage.class) returns a correct reference and after few more lines of code it returns null.
How is that possible ?

I am using 1.3 beta3.

           protected void onSubmit(AjaxRequestTarget target, Form form)
           {
               LoginForm loginForm = (LoginForm) form;
               String username = loginForm.getUsername();
               ProjectsSession session = (ProjectsSession) getSession();
               session.setLoggedIn(true);
               session.setUsername(username);

               for (int i =0 ; i<3 ; i++)
               {
log.info("**** : "+(findParent(BasePage.class)==null)); // FALSE
               }

               MarkupContainer container = findParent(BasePage.class);

               container.get("menuPanel").setVisible(true);
               target.addComponent(container.get("menuPanel"));

container.get("contentPanel").replaceWith(new ProjectsSearchResultsPanel("contentPanel").setOutputMarkupId(true));
               target.addComponent(container.get("contentPanel"));

               if (findParent(BasePage.class)==null)      // TRUE
               {
                   log.error("ERROR");
               }

               log.info("User " + username +" logged in");
           }


21:22:24,703 INFO  [LoginPanel] **** : false
21:22:24,703 INFO  [LoginPanel] **** : false
21:22:24,703 INFO  [LoginPanel] **** : false
21:23:14,359 ERROR [LoginPanel] ERROR



---------------------------------------------------------------------
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]

Reply via email to