struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Brown <aa...@thebrownproject.com>
Subject Re: Submit image button sends coordinates
Date Tue, 26 Jul 2011 10:29:24 GMT
You may be able to write an interceptor that strips X and Y from your cgi
parameters. You would need to set the interceptor prior to the default
interceptor that assigns params to your action set methods.
 On Jul 26, 2011 5:50 AM, "Maurizio Cucchiara" <maurizio.cucchiara@gmail.com>
wrote:
> Hi Christian,
> unfortunately IIRC there is no way to avoid that OGNL tries to find the
> property accessor.
>
> Adding this row in your log4j.xml (properties) should mute this log
message
> (which it should not be a warning message)
>
> <category name="com.opensymphony.xwork2.ognl.OgnlValueStack">
> <priority value="error"/>
> </category>
>
>
> On 26 July 2011 11:27, Christian Grobmeier <grobmeier@gmail.com> wrote:
>
>> Hi,
>>
>> using:
>> <s:submit type="image" src="images/icons/app/32x32/sign-in.png"
>> name="submit" />
>>
>> Sends the following to my action:
>> submit => [ Submit ] submit.x => [ 40 ] submit.y => [ 7 ]
>>
>> x / y are coordinates of my click, defined by w3c. Now they are sent
>> to my action, and OGNL tries to set it. Which leads to:
>>
>> > Error setting expression 'submit.x' with value
>> '[Ljava.lang.String;@a53ed8f'
>> > ognl.NoSuchPropertyException: java.lang.String.x
>>
>> Of course, ognl, sets a string "submit", then tries to find the getX
>> method on my string which does not exist.
>>
>> How can I deal with that?
>>
>> Cheers
>> Christian
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
> --
> Maurizio Cucchiara

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