Apologies in advance if this somehow gets posted twice - I sent the
first message from another account, which is not subscribed to the list.
I don't suppose it should go through, but it hasn't bounced either...

Anyway, I have a requirement that reads, "parameter names shall not be
case sensitive, but parameter values shall be."  Which of course is a
problem for binding request parameters to my action/model properties
(e.g., foo=bar, Foo=bar FOO=bar) unless I want to provide setters for
every permutation...  :-|

I'm pretty new to Struts2, but it seems like I could either make sure
that all of my getters use uppercase property names [e.g., getFOO()] and
convert the inbound parameter name before the ParameterInterceptor is
applied...  

Or maybe I could replace the ParametersInterceptor with one that used
reflection to figure out which property to set, ignoring case.  Do
either of those options seem right to anyone else?  Something like

//for each request parameter

        //for each getter method on the requested action

                //if beanPropertyName.equalsIgnoreCase(parameterName)

                        //valueStack.setValue(propertyName,
parameterValue)


Though I suppose this breaks down pretty fast for complex properties (I
won't have any, AFAIK)...  I'd appreciate a better idea.


Many TIA,

Bill Bruyn


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

Reply via email to