Hi Mathias, hi all,

thanks for your help, I didn't know the AjaxFormChoiceComponentUpdatingBehavior so far.

I now have the problem, that it jumps into the onUpdate method just once (when I click on a checkbox for the first time). If I click again on the same or any other checkbox, nothing happens. Does anyone have an explanation for that?

Thank you
Philipp


This may confuse the web user quite a bit. It's preferred to send the request
each time or cache it maybe.

Form form = new Form( "form" );
                List SITES = Arrays.asList(new String[] { "The Server Side", "Java 
Lobby",
"Java.Net" });
                final List<String> values = new LinkedList<String>();
                final CheckBoxMultipleChoice c = new 
CheckBoxMultipleChoice("site", new
Model(),  SITES );
                c.add( new AjaxFormChoiceComponentUpdatingBehavior(){
                        @Override
                        protected void onUpdate(AjaxRequestTarget target) {
                                
                                System.out.println( c.getModelObject() );
                        }
                        
                });
                form.add( c );
                add( form );

In this onUpdate you could send to server, cache or whatever.


--

Averbis GmbH
c/o Klinikum der Albert-Ludwigs-Universität
Stefan-Meier-Strasse 26
D-79104 Freiburg

Fon: +49 (0) 761 - 203 6707
Fax: +49 (0) 761 - 203 6800
E-Mail: dau...@averbis.de

Geschäftsführer: Dr. med. Philipp Daumke, Kornél Markó
Sitz der Gesellschaft: Freiburg i. Br.
AG Freiburg i. Br., HRB 701080


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

Reply via email to