Hi all,

                I have a UserBean and I created a propertyModel for that
bean so when a TextField text is modified the property name of the UserBean
updates. I use this in a model windows, added a link so when it clicks I use
the value from the textfield but the value is always null. Should I use a
form?How can I solve or read about this? Cause everywhere I see
documentation seems that should work the way I did it.

                

                userBean=new UserBean();

        final PropertyModel messageModel = new
PropertyModel(userBean,"name");

 

        textField=new TextField("msg",messageModel);

        

        add(new AjaxLink("Save")

        {

            public void onClick(AjaxRequestTarget target)

            {

                modal.close(target);

                java.lang.String user = userBean.getName();//this is null

 

}

}

 

Any help would be appreciated , thanks,

Wadi

Reply via email to