Hi Nathan,

Yes, I've seen you using that structure in various places in
Databinder!  Using methods of that form, I've now managed to
completely dispose of the boolean "ajax" flag I was passing around,
and the code is much cleaner now than it was before.

Many thanks!

Charlie



On 2/15/07, Nathan Hamblen <[EMAIL PROTECTED]> wrote:
> You don't need to use the same object to factor out that code. Instead
> of passing the same form object between pages, you could have a base
> form class that adds the components you want, with a subclass for the
> modal window. Sometimes it's handy to have methods like
>
> protected Component newSubmitButton(String id) {
>         [create with id and return]
> }
>
> that you call from the base constructor and override in the subclass.
>
> Nathan
>
> Charlie Dobbie wrote:
> > Is there a more suitable place to handle page navigation than the
> > Form's onSubmit/onError methods, or even an entirely better way of
> > doing things?
> > [...]
> >>> In my Databinder-using application I have the requirement to
> >>> create/edit entities both within a standard request cycle, and via
> >>> AJAX inside a Modal Window.  In the interests of not duplicating code,
> >>> I would like to drive both these processes from the same Form object,
> >>> passing a boolean from the page to tell the Panel containing the Form
> >>> whether it's submitting normally or via AJAX.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to