struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Matthieu.M...@ensam.eu>
Subject Multiple field and modelDriven
Date Thu, 17 Feb 2011 08:06:34 GMT
Hi everybody,

I have a class named User which contain some information about user .

I have made a form in my JSP and an action which is modelDriven with my User class.

Public class User implements modelDriven<User>{}...

My question is about multiple field with same id in my JSP. My User class have a field named
streetaddresses (which is linked with an active directory field of the same name). In my form,
I want to put 3 input field for streetaddresses (streetaddresses line 1, streetaddresses line2
and streetaddresses line3).
If I do this, the three field will be concatenated using comma (line1, line2, line3)

Is there a way to change the separator comma with another thing (like \r\n) ? (line1\r\nline2\r\nline3)

And will it will prepopulate the three field splitting the getStreetAddresses field using
the separator when I will want to  make a form to modify informations ?

Streetaddresses = line1\r\nline2\r\nline3\r\n -> streetaddresses line1 = line1  -> streetaddresses
line2 = line2....

Thanks

Matthieu MARC

------
Matthieu.marc@ensam.eu<mailto:Matthieu.marc@ensam.eu>
Responsable du Service Informatique
Arts et M├ętiers ParisTech - Angers


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message