it's not a nested form:

        <body>
                concept ideas: display questionaire on main page, have popups 
when adding questions with available question types.
                <form wicket:id="form">
                        <input type="submit" wicket:id="addQuestion" />
                </form>
                <div wicket:id="modalquestionpopup"></div>
                <div wicket:id="selectedradio">none</div>
        </body>
form tag are closed before the popup tag(modalquestionpopup). I'll try creating 
a page instead?


regards Nino


-----Oprindelig meddelelse-----
Fra: [EMAIL PROTECTED] på vegne af Matej Knopp
Sendt: ma 26-03-2007 14:37
Til: wicket-user@lists.sourceforge.net
Emne: Re: [Wicket-user] AJAX modal window (1.2.5)and form
 
If you have nested forms it will fail. Nested forms are not supported
in wicket 1.2.

If you need separate form in modal window in 1.2, the safest bet is to
use a page inside modal window.

-Matej

On 3/26/07, Nino Wael <[EMAIL PROTECTED]> wrote:
> Hi
>
> I have a AJAX modal window wich contains a form. In the form there a an 
> radiochoice that has an ajax formcomponentupdatingbehavior. Now the updating 
> behavior are trigered but the model of the radiochoice aren't being updated.
>
> Also on the basepage where you can trigger the modal window, I also have a 
> form. Not sure if this should make anything fail?
>
> snip of the code from the panel thats used in the modal window:
>         public QuestionSelectorPanel(String id, final IModel selectedQuestion,
>                         final ModalWindow modalQuestionPop, final Label 
> label) {
>                 super(id);
>                 Form form = new Form("form");
>                 final RadioChoice questionRadio = new RadioChoice("questions",
>                                 selectedQuestion, Question.getTypes());
>                 questionRadio.setOutputMarkupId(true);
>                 questionRadio.add(new 
> AjaxFormComponentUpdatingBehavior("onchange") {
>                         protected void onUpdate(AjaxRequestTarget target) {
>                                 System.out.print("selected value should print 
> here!:"
>                                                 + 
> selectedQuestion.toString());
>                                 // below are working, label prints out foobar
>                                 // label.setModelObject("foobar!");
>                                 target.addComponent(label);
>                                 modalQuestionPop.close(target);
>                         }
>                 });
>                 add(form);
>                 form.add(questionRadio);
>         }
> snip of the basecode:
>                 final ModalWindow modalQuestionPop = new ModalWindow(
>                                 "modalquestionpopup");
>                 add(modalQuestionPop);
>                 Label label = new Label("selectedradio", selectedQuestion);
>                 label.setOutputMarkupId(true);
>                 modalQuestionPop.setOutputMarkupId(true);
>                 modalQuestionPop.setTitle("Please select a Question type");
>                 modalQuestionPop.setContent(new 
> QuestionSelectorPanel(modalQuestionPop
>                                 .getContentId(), selectedQuestion, 
> modalQuestionPop, label));
>                 Form form = new Form("form");
>
>                 AjaxSubmitButton addQuestion = new 
> AjaxSubmitButton("addQuestion", form) {
>
>                         protected void onSubmit(wicket.ajax.AjaxRequestTarget 
> arg0,
>                                         Form arg1) {
>                                 modalQuestionPop.show(arg0);
>                         };
>
>                 };
>                 form.add(addQuestion);
>                 add(form);
>                 add(label);
>
>
>
> regards Nino
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

<<winmail.dat>>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to