[ 
https://issues.apache.org/jira/browse/WICKET-3104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221019#comment-13221019
 ] 

Igor Vaynberg commented on WICKET-3104:
---------------------------------------

fwiw


public class AutoFeedbackPanel extends FeedbackPanel
{
        public AutoFeedbackPanel(String id, MarkupContainer root)
        {
                super(id, new ContainerFeedbackMessageFilter(root));
                setOutputMarkupId(true);
        }
        
        public AutoFeedbackPanel(String id, IFeedbackMessageFilter filter)
        {
                super(id, filter);
                setOutputMarkupId(true);
        }


        @Override
        public void onEvent(IEvent<?> event)
        {
                super.onEvent(event);
                if (event.getPayload() instanceof AjaxRequestTarget)
                {
                        onUpdate((AjaxRequestTarget)event.getPayload());
                }
        }
        
        private void onUpdate(AjaxRequestTarget target)
        {
                target.add(this);
        }


}

                
> add feature to feedbackpanel to automatically add itself to ajax requests
> -------------------------------------------------------------------------
>
>                 Key: WICKET-3104
>                 URL: https://issues.apache.org/jira/browse/WICKET-3104
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5-M1, 1.5-M2.1
>            Reporter: Jeremy Thomerson
>            Priority: Trivial
>         Attachments: WICKET-3104.patch
>
>
> It would be nice to be able to tell a FeedbackPanel that you want it to 
> automatically add itself to AJAX requests when a feedback message is added to 
> any component, and it would accept the feedback message.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to