Well... as far as validators are concerned - there is some murky water. 
Depending on your design, the services/domain layer should include object
validation - this allows you to expose services.  The trick is getting these
validators to be shared by the view layer AND the service layer.

I'm not sure if a technology exists to bridge this gap.  Spring validators
are close, but do not go into the realm of per field validation - only
object validation.  I've written some code to bridge this in a "usable"
fashion - but it's not perfect.

I like wickets handling of field validation - but am not sure its
appropriate at a domain/service layer level.

Handling of the validation decision really boils down to:
1/ is my app based on wicket - all interfacing with the app is via wicket.
<-- this makes it easy.
2/ or is wicket just _A_ view - and there are other means to access/write
the data. <-- this makes it harder.

Rgds

Ned


Martijn Dashorst wrote:
> 
> Why? The model is nothing more than a locator, a bridge if you like
> between your data stuff and the view layer. There is no reason why it
> shouldn't be able to work with the view component. There is absolutely
> no reason why one should get all anal about separating classes that
> live in the user interface layer. It is not like wicket components are
> bleading into your domain layer...
> 
> Martijn
> 
> On Mon, Dec 8, 2008 at 10:38 PM, James Carman
> <[EMAIL PROTECTED]> wrote:
>> Does anyone use a custom validator to implement this type of stuff?  I'm
>> not
>> crazy about a model implementing this functionality, especially during a
>> "get" operation.  Also, your model has to be aware of your view (the call
>> to
>> the form's clearInput() method).  I don't know.  Something about it just
>> doesn't seem right to me
> 

-- 
View this message in context: 
http://www.nabble.com/LoadableDetachableModel-in-Listview-tp20894115p20926367.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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

Reply via email to