Hi.

First of all: sorry if this request for feature is going to the wrong place.

Now then...

Request for Feature: type attribute in <html:text>
--------------------------------------------------
Often I find myself having

 private Integer myInt;
 public Integer getMyInt() {return myInt;}
 public void setMyInt(Integer myInt) { this.myInt = myInt; }

in my ActionForm.

The input for myInt comes from a JSP page using the <html:text> tag.
But since <html:text> is using String as the data type I've to assign the
value to

 private String myIntString;

and do the conversion in validate().

It would be great if one could specify:

 <html:text property="myInt" type="java.lang.Integer"/>

since Integer can take a String in the constructor. If a
NumberFormatException is thrown a stack-trace is ok to present to the user
IMO.

Yes, I know that one should use the validate(ActionMapping mapping,
ServletRequest request) for this kind of job -- but in simple cases this
would be a great feature to have (and no I wouldn't use this feature in
production; only for development).

Comment ? (or am I totally off here?)

Cheers,
 Jesper

P.S. I'm not on the list, so if possible Cc: me, please

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to