Hi,

When in an AjaxFallbackLink's onClick(), the object I retrieve from my
session is null, even if in my form constructor the object was properly
retrieved :
public CreatureForm(String id, HibernateObjectModel object ) {
        super(id,  object);
        Creature sessionCreature = ((DemoUser) ((DemoSession)
getSession()).getUser()).getCreature() ;
        System.out.println("Creature name in the form : " +
sessionCreature.getName());
        System.out.println("Creature location : " +
sessionCreature.getCurrentXP());
        add(new AjaxFallbackLink("aLink"){
         @Override
         public void onClick(AjaxRequestTarget target) {
                Creature sessionCreature = ((DemoUser) ((DemoSession)
getSession()).getUser()).getCreature() ;
                System.out.println("Creature name in the form : " +
sessionCreature.getName());
                System.out.println("Creature location : " +
sessionCreature.getCurrentXP());
         }
}

In the onClick, I get a java.lang.NullPointerException...

What do I do wrong ?

Thanks in advance
++
Nono
-- 
View this message in context: 
http://www.nabble.com/-Newbie-Session-lost-in-an-AjaxFallbackLink-onClick%28%29-tp18016504p18016504.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to