Hi everybody,

I am new to Struts 1.1, so I have a few questions
about property formatting (I didn't find any answer in
the list archives).

1) In the ActionForm, the bean properties should be
String, it will avoid you formatting problems
(especially with dates, if you want to use the
html:text tag). Right ?
NB: I know about the formatting capabilities of the
JSTL taglib, and of the bean:write tag, but it seems
that you have no way of formatting in the html:text
tag.

2) As my business objects contain all kinds of types
(double, long, java.util.Date, etc...), I need a way
to transfer the content of one bean to another, in
both directions:
ActionForm (contains only String) <=> BusinessBean
(contains all kinds of types)

I think the right place to do the tranfer is in the
Action classes. Right ?

3) I have seen that there are convert utils in the
common-bean jar, and I have seen that the
BeanUtils.copyProperties( ) method seems to answer my
needs, but I couldn't make it work the way I want:
when I want to tranfer ActionForm <= BusinessBean, the
methods uses only the StringConverter (since the
ActionForm contains only Strings), therefore I can't
precise different patterns.
I would like to tell the method: "the pattern for the
dates is 'dd/MM/yyyy', the pattern for the doubles is
'#.00', etc...", but the StringConverter knows only
one pattern when you register it.
Do I have to code my own StringConverter ?

Thanks in advance,
Marc.

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

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

Reply via email to