Well firstly for dealing with nested forms, collections of nested forms and
the like.

One also needs to remember that the ActionForm is an object that represents
the state of the UI - and depending on what you are doing you may wish to
use it for storing information relating to ui state that doesnt map directly
to a form control value, but is used in rendering the view. (ie: things
relating to complex 'widgets' you render)

You might also have properties that are synonyms for string properties that
act as convienience methods for getting and setting the value in its final
type - but internally both reference the same String member variable.

for example:

private String _employeeSalary;
private String _ceoSalary;

setEmployeeSalary(String employeeSalary)
String getEmployeeSalary()

setEmployeeSalaryByte(Byte employeeSalary)
Byte getEmployeeSalaryByte()

setCeoSalary(String ceoSalary)
String getCeoSalary()

setCeoSalaryBigDecimal(BigDecimal ceoSalary)
BigDecimal getCeoSalary()

-----Original Message-----
From: Steve Raeburn [mailto:[EMAIL PROTECTED]
Sent: Friday, 30 May 2003 14:40
To: Struts Users Mailing List
Subject: RE: Why do ActionForms allow non-string properties?


In what way would it be restrictive? Is there any reason you would need a
non-string property (for html input) ?

Steve

> -----Original Message-----
> From: Andrew Hill [mailto:[EMAIL PROTECTED]
> Sent: May 29, 2003 11:26 PM
> To: Struts Users Mailing List
> Subject: RE: Why do ActionForms allow non-string properties?
>
>
> Well, I think it a bit restrictive to forbid non-string properties, but I
> would say that the docs really ought to make it clear that the recommended
> type for all those properties that directly relate to html controls should
> be strings.
>


---------------------------------------------------------------------
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]

Reply via email to