it's not working... The problem probably is that the form has it's own 
generated markup id and the button looks for the form with markup id from the 
one that comes in the AjaxButton's constructor as an argument. Because I have:

submitButton = new AjaxButton("submit_button", formPanel.getForm()) {
        protected void onSubmit(ART target) {
                do smth
        }
}

and because I display different panels with different forms ( especially their 
markupId ) it can't find the current one by it's markup id. I just can't think 
of a workaround to solve this.

Please, if someone has a better idea, it would be great to share it...

Best Regards,
Martin 

-----Original Message-----
From: Martin Asenov [mailto:mase...@velti.com] 
Sent: Monday, January 18, 2010 3:33 PM
To: users@wicket.apache.org
Subject: RE: submit a form from outside of it

Yes, Bert, it's accessible. The way you proposed comes up with:

ERROR: Wicket.Ajax.Call.submitFormById: Trying to submit form with id 'form49a' 
that is not in document.

in the ajax debug. But the form is in the document. Probably it has dynamic 
markup id and I should try making it persistent.

Thanks,

-----Original Message-----
From: Bert [mailto:taser...@gmail.com] 
Sent: Monday, January 18, 2010 2:17 PM
To: users@wicket.apache.org
Subject: Re: submit a form from outside of it

I 'm not sure i completely understand your requirement, but the
AjaxButton too has a constructor
with a Form as parameter. Would it be possible to access the form when
creating the button?

Bert

On Mon, Jan 18, 2010 at 13:11, Martin Asenov <mase...@velti.com> wrote:
> Thanks Bert, but I use a button... I need to have the button in the page, 
> because it does the same for any form. I want to have code re-usage.  But 
> however my abstract MyFormPanel does not have relevant markup, so I can't 
> include the buttons there, it would be nice, but I can not. I just want to 
> avoid having the very same buttons and markup in every subclass of 
> MyFormPanel...
>
> Can anyone please give further assist?

---------------------------------------------------------------------
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


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

Reply via email to