So: always override onSumbit for the buttons and *sometimes* redirect.
Tis all.
- Alex
-Original Message-
From: Robert Moskal [mailto:rmos...@mostmedia.com]
Sent: Tuesday, December 08, 2009 12:05 PM
To: users@wicket.apache.org
Subject: Redirect after for submit, but not what you think
That's just what I don't want to do. My forms live as private classes on a
panel (one form per one style of panel). I don't want to have to introduce
n new panels to handle the case where I wan to do the redirect. I was
hoping I could do it in one place (kind of like an aop after advice :).
You don't have to expose your private panels. Just create a protected method
which handles the form submission override it in inherited components.
Alex Objelean
rmoskal wrote:
That's just what I don't want to do. My forms live as private classes on
a
panel (one form per one style of
I could do that, but would be nicer if I didn't have to touch n classes or
create a class hierarchy for my Panel. I don't like my Page knowing so much
about what goes on in my Panels either.
Thanks!
Robert
___
Robert Moskal
Most Media
Brooklyn, USA
347-529-4744
On Tue, Dec 8, 2009 at
You can define a default behavior (for instance no redirect after submit)
apply redirect only for few pages. It is a nice solution... it reminds me
about template method design pattern.
Alex
rmoskal wrote:
I could do that, but would be nicer if I didn't have to touch n classes or
create
Thanks Alex. It does seem a like a slightly old-fashioned way of doing
things. My factory instantiates the Panels by reflection from the class name
(kept in a spring file). I personally don't know how to create an anonymous
class when I instantiate something using the reflection api. I suppose
Wicket is unmanaged framework. I've never have seen a wicket code which would
use instantiation of panels using spring. I don't know I understand it... do
you have some special use-case? Can you describe it? My first thought is,
that this is some sort of over engineering which doesn't bring you
Our application is configured after compilation. I have many different
renderers implemented as panels with a private form for a large
population of content types.
When we deploy the application we have to specify the ones we want to
actually use. Since there's no compilation involved in
You may want to take a look to brix (http://code.google.com/p/brix-cms/)
project. It is a wicket-based CMS framework it also has a similar use-case
like yours. Maybe you'll find their approach interesting...
Alex
rmoskal wrote:
Our application is configured after compilation. I have many