Hello,

  I am trying to add auto validation in the modal window but I don't see any
error messages. I added a feedback panel on a modal window which has a
required text field.  When I try to submit, the modal window does not do any
thing and I think what happens here is wicket does validation (which is
failing) and does not submit the form. It does not show error messages in
the feedbackpanel also.

public class AddAccountModalWindow extends ModalWindow {

        public AddAccountModalWindow(String id) throws Exception {
                super(id);
                setInitialHeight(450);
                setInitialWidth(500);
                
                setTitle("Add New Account");
                AddAccountContentPanel newAccPanel = new 
AddAccountContentPanel("content")
{                   
                        private static final long serialVersionUID = 1L;

                        void onCancel(AjaxRequestTarget target) {
                                close(target);
                    }

                };
                setContent(newAccPanel);

    };

}

public abstract class AddAccountContentPanel extends Panel {

public AddAccountContentPanel(String id) throws Exception {
                Form accForm = new Form("accForm");
                accForm.setOutputMarkupId(true);
                setModel(new Model(""));
                add(accForm);
                
                feedbackPanel = new FeedbackPanel("feedback", new
ContainerFeedbackMessageFilter(accForm));
                accForm.add(feedbackPanel);

                TextField  accName = new TextField("accName", new
PropertyModel(clearingAccount, "mnemonic"));

               AjaxFallbackButton createAccount = new
AjaxFallbackButton("createAccount", accForm){
                         protected void onSubmit(AjaxRequestTarget target,
Form form) {
                        //hidden code here.....
                         }
               }
              accForm.add(accName);
              accForm.add(createAccount);

}

}

========= AddAccountContentPanel.html

<html>
<body style="background-color:#bbd1ef">
<wicket:panel>
<wicket:panel>

<form wicket:id="accForm" style="background-color:#bbd1ef">
<div style=" float:left;" >
        <div style="margin: 20px 0 0 20px;float:left" 
wicket:id="feedback"></div>
        <div style="clear:both"></div>
        <div style="margin: 20px 0 0 20px;float:left">
                 Account Name: 
                <input style="font:16px Calibri; margin-left:10px;" type="text"
wicket:id="accName"/>
        </div>
div>
                <input style="font: 16px Calibri; margin: 20px 0 0 120px;"
wicket:id="createAccount" type="submit" value="Add Account" />
                
        </div>
</div>
</form>

</wicket:panel>

========= AddAccountModalWindow.html

<html>

<body style="background-color:#bbd1ef">
        <wicket:panel>
                <div wicket:id="content" style="background-color:#bbd1ef; 
width:100%;
height: 100%"></div>
        </wicket:panel>
</body>
</html>



</body>
</html>

I apprciate your help,

Thanks
Suresh


-- 
View this message in context: 
http://www.nabble.com/Feedback-Panel-on-Modal-Window-With-Field-Validation-does-not-work-tp20216419p20216419.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