I'm trying to use AjaxFormComponentUpdatingBehavior with a RadioChoice component.

Using debugger I can see that ajax call is working but model is never updated, infact nothing is appearing in POST Body

 INFO: initiating ajax POST request with...
 INFO: url: /coin/budget?wicket:interface=:6:form:radioChoice::IBehaviorListener&wicket:behaviorId=1
 INFO: body:


It is a bug or I'm wrong?

-- Paolo



public class TestPage extends WebPage {

    private String choiceValue;
  
    public TestPage() {
         
        Form form = new Form("form");
        add( form );

        /*
         * Radio Choice
         */
        String[] choice = { "Choice A", "Choice B", "Choice C" };
        RadioChoice radioChoice = new RadioChoice("radioChoice",  new PropertyModel(this,"choiceValue"), Arrays.asList(choice));
        radioChoice.add( new AjaxFormComponentUpdatingBehavior("onchange") {

            protected void onUpdate(AjaxRequestTarget target) {
                target.addJavascript("alert('Hello choice: " + choiceValue + " ')");
            }
           
        }  );
        form.add( radioChoice );

    public String getChoiceValue() {
        return choiceValue;
    }

    public void setChoiceValue(String choiceValue) {
        this.choiceValue = choiceValue;
    }
}

<html>
<body>
<form wicket:id="form" >

    <span wicket:id="radioChoice" >
        <input type="radio" >choice a
        <input type="radio" >choice b
    </span>

</form>
</body>
</html>




Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to