struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JOSE L MARTINEZ-AVIAL <jlm...@gmail.com>
Subject Re: Anyway to map properties to different request names?
Date Wed, 05 Nov 2014 20:47:48 GMT
You only need to set the attribute name of the field

<field name="personId" type="text"></input>

You can even use a different Id, if you want to refer to the field in
javascript.  Why does it bother you?

2014-11-05 15:39 GMT-05:00 Paul Benedict <pbenedict@apache.org>:

> Let's say I have a getter/setter for field personId. That means in my
> markup, I need to have a field named personId too. However, I am not really
> found of bleeding Java naming conventions into my web page. Shouldn't there
> be a way -- is there a way? -- of assigning another name to it?
>
> Hopeful example:
>
> @RequestParam("person")
> public final void setPersonId(String personId) { ... }
>
> Cheers,
> Paul
>

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