Extract the form to a Panel and publish the onSubmit() listener there:

MyFormPanel extends Panel {
    MyFormPanel(...) {
        add(new MyGenericForm(...) {
            public void onSubmit() {
                MyFormPanel.onSubmit();
            }
        }
    }
    abstract void onSubmit();
}

Martijn

On Tue, Nov 18, 2008 at 4:36 PM, Adriano dos Santos Fernandes
<[EMAIL PROTECTED]> wrote:
> I have a generic Form component (extends Form) and it adds child components
> to this. But where I place this form, I need to specify more content for the
> form interior. Kind of:
>
> <form ...>
>   tags put by the Form class
>
>   tags put by who inserted the class on the page
> </form>
>
> In my prototype code, I have all the markup inside the page, and I add the
> form to it. But as I'm going to create more pages, I don't want to duplicate
> the markup. I feel my case is not for page inheritance. In fact, I'm already
> using page inheritance for generic layout.
>
> Any advice why I could do it?
>
>
> Adriano
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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

Reply via email to