If you have full control over the contents of your dialog you could try to

1- create the interface to mark your dialog:

public interface IAjaxSubmitAware {
        
        void onSubmit(AjaxRequestTarget target);
}

2- create your own link, buttons, etc as in

public abstract class MyAjaxSubmitLink extends AjaxSubmitLink {

        private static final long serialVersionUID = 1L;

        /**
         * @param id
         */
        public MyAjaxSubmitLink(String id) {
                super(id);
        }

        /**
         * @param id
         * @param form
         */
        public MyAjaxSubmitLink(String id, Form<?> form) {
                super(id, form);
        }

        @Override
        protected final void onSubmit(AjaxRequestTarget target, Form<?> form) {
                IAjaxSubmitAware submitAware = 
findParent(IAjaxSubmitAware.class);
                if(submitAware != null) {
                        submitAware.onSubmit(target);
                }
                doOnSubmit(target, form);
        }

        protected abstract void  doOnSubmit(AjaxRequestTarget target, Form<?> 
form);
}

Ernesto


On Tue, Dec 14, 2010 at 9:16 PM, guydog28 <g...@guydo.com> wrote:
>
> Anyone?  Abstract:  I have extended WiQuery Dialog with our own custom
> dialog.  I want the MyDialog to know if any child components are a Form,
> being submitted via AJAX (AjaxFormSubmitBehavior).  I need access to the
> AjaxRequestTarget created by that ajax form submit so I can append
> javascript to it or add components.  I'm really hoping someone has a
> suggestion that I missed.  This is a major blocker for us right now.
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/How-to-listen-for-CHILD-ajax-form-submits-tp3086439p3087882.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to