I'm having trouble getting messages to display in the FeedbackPanel. Also, any idea how to get the form to submit after the user presses enter/return in a textfield (when using AjaxSubmitLink)? Any ideas? Below is my code.

       //feedbackPanel
FeedbackPanel feedbackPanel = new FeedbackPanel ("feedbackPanel"); feedbackPanel.add(new AttributeModifier("class", true, new Model("feedbackPanel"))); feedbackPanel.setFilter(new ContainerFeedbackMessageFilter (form));
        form.add(feedbackPanel);
        form.add(new TextField("name"));

        //submit button

        AjaxSubmitLink submit = new AjaxSubmitLink("submit") {
            public void onSubmit(AjaxRequestTarget target, Form form) {
                try {
groupsDisplay.add(new AttributeModifier("class", true, new Model("groupsDisplay")));
                    target.addComponent(groupsDisplay);
                    info("Groups for " + name + ".");
                } catch (Exception e) {
                    error("Unable to get groups for " + name + ".");
                }
            }
        };
        form.add(submit);

Thanks,
Ryan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to