Showing an error message when the parameter name is _eventName
--------------------------------------------------------------

                 Key: STS-767
                 URL: http://www.stripesframework.org/jira/browse/STS-767
             Project: Stripes
          Issue Type: Bug
    Affects Versions: Release 1.5.3
            Reporter: Samuel Santos


When a form is submitted via JavaScript, we need to add a hidden field with the 
name {{_eventName}} and the value equal to the name of the handler we want to 
be executed.
This causes an info message to be logged. Unfortunately this message looks like 
an error:
{quote}
Could not locate property of name [_eventName] on ActionBean. 
<add_the_ExpressionException_error_message_here>
{quote}

Depending on the population strategy you are using, this message is logged on 
line 130 of the DefaultPopulationStrategy class, or on line 65 of the 
BeanFirstPopulationStrategy class (revision 1270):
{code}
log.info("Could not locate property of name [" + tag.getName() + "] on 
ActionBean.", ee);
{code}

A quick fix would be to check the parameter name, and only log a WARNING 
message when them name is different from {{_eventName}}:
{code}
if (StripesConstants.URL_KEY_EVENT_NAME.equals(tag.getName())) {
    log.warn("Could not locate property of name [" + tag.getName() + "] on 
ActionBean.", ee);
}
{code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to