No Result is only returned during change operations, i.e. saving a User. For
list operations I just return the query, because there can be no validation
failures for simply *getting* something. Hopefully that makes sense.
On Wed, Jul 16, 2008 at 3:37 PM, Ronan Lucio <[EMAIL PROTECTED]> wrote:
>
> Hi Brian,
>
> Brian Kotek escreveu:
> > order = factory.create('Order', id);
> > result = factory.create('Result');
> > order.populate(data);
> > // gateway will call order.validate() and if all is OK, call
> > order.save() and set isSuccess to true.
> > // if validation fails, the errors are set on the result object and
> > returned
> > gateway.save(order, result);
> > if(result.isSuccess()) {
> > result.setSuccessMessage('Order was saved successfully');
> > }
> > return result;
>
> Interesting approach.
> I liked it. The view take a result object with it's logic embedded.
>
> It's intuitive, but I can't figure out the same result object being used
> widely in the application.
>
> Do you create one object per view? (I guess not)
> But, what about a situation where a view have specific data's to show?
>
> Example: How would be a result object for a active users list?
> Does it has a "result.listActiveUsers()" method?
>
> If so, there is one result component for this listing page?
> If you use a common result object, how do you inject specific methods
> into it?
>
> Thanks,
> Ronan
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---