Hello, I have a list of users, When I click on the userlink I need to display
the name of user clicked (For example: If Bob,Hari and David are lists, If I
click on Bob the output in pop up should be User selected :Bob.

The problem I am having is, when I click on Bob the out put is User
selected:
When I click on the next name the output is User selected: Bob. i.e. The
first output comes in second click and second ouput comes in third click and
so on. My code is as shown below: Where am I missing ? Please help.

 String username ="";
  Link userLink = new Link("user") {

                    public void onClick() {
                        User selectedUser = (User)
getParent().getModelObject();
                        username = selectedUser.getUsername();
                       
                    }
                };

                userLink.add(new SimpleAttributeModifier("onclick", "return
alert('User selected:" +username + "');"));


thanks
-- 
View this message in context: 
http://www.nabble.com/Simple-question-about-alert-string-tp15950581p15997606.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