[html-formfu] ExtJS::REST

Mario Minati mario.minati at googlemail.com
Sun May 10 23:24:35 GMT 2009


Am Sonntag 10 Mai 2009 18:57:08 schrieb Moritz Onken:
> >> respond_with_model_values is unnecessary because the -
> >> validation_response method returns the form data in the "data" key.
> >> Do you have any other reasons why we need this?
> >
> > The difference between calling the validation_response or form_data
> > method is
> > in the call to '$self->model->default_values($data);'. By forcing a
> > reread of
> > values from model I get the values that are set by automatic
> > processing in
> > DBIC classes, like IDs and UUIDs.
>
> OK I see. I think we can make this the default behaviour. This will
> cause a
> database roundtrip but I think it's the best way to make sure that the
> data
> we give back is the same as the data the user will get when he requests
> that item.

You are right, but FF itself doesn't take db changes into account by default.
And the db processing for more complex forms with repeatables and so one takes 
quite some time.
I could accept to copy FF's default behaviour. 

> >> I changed the behaviour of 'default_rs_method' to call a default rs
> >> method if present. It's name is derived from the class name.
> >
> > If 'if($object->can($rs)) {' (122) fails we should warn instead of
> > debug.
>
> But the intention was that default_rs_method is optional. In many cases
> the user will not have such a result set method implemented. A warn will
> also be displayed in non debug mode. That could become anoying :-)

You were right, I realised that after my mail ;-)

> >> And it would be great if you could add tests for all the features you
> >> add :-)
> >
> > I'm working on that.
>
> Thanks for your thoughts on this project!

You're welcome :-D

Mario Minati



More information about the HTML-FormFu mailing list