Hi,

case 1: if i'm not wrong you have to place a submit button inside a form 
otherwise this button doesn't work.
Case 2: look at AjaxEventBehavior for on change

Mit freundlichen Grüßen
Christian Giambalvo
--
Fachinformatiker für Anwendungsentwicklung

EXCELSIS Informationssysteme GmbH
Wilhelmsplatz 8 - 70182 Stuttgart
Mobile +49 176 196 32 406
Office +49 711 6 20 30 406
christian.giamba...@excelsisnet.com
www.excelsisnet.com
www.twitter.com/excelsis_info
excelsisnet.blogspot.com

Sitz Stuttgart
Amtsgericht Stuttgart, HRB 21104
Geschäftsführer: Christian Sauter, Dr. Nils Herda, Frank Wolf


-----Ursprüngliche Nachricht-----
Von: Lester Chua [mailto:cicowic...@gmail.com] 
Gesendet: Donnerstag, 29. Oktober 2009 08:23
An: users@wicket.apache.org
Betreff: How to do Button onclick() and Input onchange()

Hi,

I need some help in trying to get onclick() and onchange() working.

Case 1: I'm trying to add an onclick behaviour to my button.

Java:

            Button cancelButton = new Button("cancelButton") {
                @Override
                public void onSubmit()
                {
                    System.out.println("Cancel Pressed");
                }
            };

            add(cancelButton);

Html:

<form wicket:id="form">

        <input type="submit" value="Confirm" ></input> <input 
wicket:id="cancelButton" type="button" value="Cancel"></input>

</form>

Problem is that when I click on the Cancel button, nothings happens. The 
Confirm button works as expected. Just that the cancel button does not 
seem to work at all.
When I look at the source of the generated HTML, there is no onclick 
code generated. Is this expected? What am I doing wrong in this case?

Case 2: What should I override when I want to do an onchange on an Input 
text box?

Thanks in advance!

Lester

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to