Hi Chris, As with most things, it depends on your app... what would be most appropriate to get from your ActionForm? If you never want to get a null out of it, you can do the check in the accessor of the ActionForm. If it's something that is a valid return, you probably will want to do the check in the Action and branch as appropriate.
As has been said many times on the list, an ActionForm is meant to serve as a DTO between the client and the Action (ultimately). Since your talking HTTP, and all HTTP knows is Strings, the canonoical "best practice" is to only have Strings in an ActionForm (subject to the exceptions to that rule of course). This is especially important when returning to a page and repopulating with the form. Chances are you won't want to see "null" in input fields, so I'd say in most cases it makes more sense to never get null from an ActionForm, only an empty string. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] On Thu, November 10, 2005 12:37 pm, Chris Pat said: > Hello > What is the best way to handle, in an Action, form > fields that are blank? If you have a simple getter > that just returns the field, how do you handle it when > the field is not in the session b/c it was not filled > in? Do I just check for fieldName==null in the getter > of the ActionForm? tia. > > > > __________________________________ > Yahoo! FareChase: Search multiple travel sites in one click. > http://farechase.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]