Jonathan Asbell wrote:
> As we are both being nightowls in the same timezone, let me continue with
> this.  We are using a Broker.  So, in my case each Action would call the
> Broker, which is our link to the enterprise layer. Also, if the business
> object rejected the data, as you said, than it would pass it to the Action
> but NOT up again to the ActionForm.  At that point the Action would choose a
> forward with errors and data.

Yes, I misspoke. The Action would insert an error and choose a forward;
the ActionForm would just tag along as part of the pending
request/response. The custom tags in the JSP  would then find the
ActionForm in the request, and redisplay what the user entered, for
correction and resubmission.


Jonathan Asbell wrote:
> Are you assuming that I keep the form data as Strings until the business
> layer? This was my collegue's complaint about the ActionForms because they
> did not contain the "types" he was expecting, but rather just Strings. 

An important thing to remember is that HTTPD doesn't allow us to send
anything but Strings. 

As Craig mentioned, you can do things like add your own accessors to
return whatever types you expect (converted from the Strings that the
client sent by HTTPD), or use some other utility within your
application. For example, someone might already have a Helper object
that accepts strings and then transforms them in different ways. The
general philosphy, I suppose, is that data conversion is outside the
scope of the framework and best left to the developer. 

In case anyone is interested, here's a nice article about Helper
classes: 

<
http://developer.java.sun.com/developer/restricted/patterns/ViewHelper.html
>

Reply via email to