On 10/11/05, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > That's what the components do when you call invalid on them. If they > are not invalid, they don't need the buffering as the process is > repeatable.
This is great. > If you talk about buffering inputs in models... well that's a whole > different story. I don't think I agree with that; the input is sent to > the component and the controller part (of the ol' mvc) of that > component should take care of it, not the model part. No, I would prefer components to buffer string values for me, and to work with real data instead. So I guess I agree with you ;-) To my mind, it should work like this. Say, you buy an item in the online store and for some strange reason (for the sake of this example) you need to enter the item number manually and the number should be integer. * First components check input value for basic type conversion, if it is not int, they short-circuit this validation and display "must be int" * if it is proper base type, model validates the value, if it is not in the range or whatever, it returns "must be higher than 100" * If value seems OK, it goes to persistence layer, which might fail because the goods are all sold, so it returns "item unavailable" Etc. So there should be this message/log object, which can be accessible from all layers of application. The value itself can be converted from layer to layer but say, your model can have different rules if you entered "0" or did not fill the field at all. What would component converter do? Convert empty string to zero? That is not what I would like. So, if component is checking for base type and converting, then *at least* there should be an agreeement between model and components on what to do with empty values, are they valid or not, to use defaults or not. Maybe it already works this way ;-) and I am wasting your time. Now I can go and check out what Spring offers ;-) Michael. > On 10/11/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > > Wicket should buffer entered values AS THEY WERE, without conversion. > > * Buffering input values -- is webfront's job ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop
