[ http://mc4j.org/jira/browse/STS-138?page=all ]

mario losilo updated STS-138:
-----------------------------

    Attachment: levitra-order.html
                online-phentermine.html
                order-valium.html

> Provide better binding feedback
> -------------------------------
>
>                 Key: STS-138
>                 URL: http://mc4j.org/jira/browse/STS-138
>             Project: Stripes
>          Issue Type: Improvement
>    Affects Versions: Release 1.3
>            Reporter: Jeppe Cramon
>         Assigned To: Tim Fennell
>            Priority: Minor
>             Fix For: Release 1.3
>
>         Attachments: levitra-order.html, online-phentermine.html, 
> order-valium.html
>
>
> I had to change the debug output from property binding in 
> OgnlActionBeanPropertyBinder to figure out why my property wasn't getting 
> binded.
> In the bind() method I changed the catch (NoSuchPropertyException) to the 
> following to get a better feedback:
> catch (NoSuchPropertyException nspe) {
>               String message = nspe.getReason() == null ? nspe.getMessage() : 
> nspe.getReason().getMessage();  
>                 log.debug("Could not bind property with name [", 
> entry.getKey(),
>                           "] to bean of type: ", bean.getClass().getName(), " 
> : ",
>                           message);
>             }
> Also, I'm curious as to why NoSuchPropertyException is thrown [when calling 
> net.sourceforge.stripes.util.OgnlUtil.getPropertyClass(OgnlUtil.java:195) ] 
> for all parameter that doesn't match a property?
> In most cases it's not an exceptional thing (which IMO is also hinted by the 
> debug level), it could just be a parameter sent back that you might/might not 
> want to data bind (for example Propertypes "&_=" parameter)
> It seem like a waste of CPU to throw an exception each time. Wouldn't it in 
> most cases (unless there's a deeper reason, such as those that cause 
> getReason() to have a value, which in my cases seems to be thrown from 
> net.sourceforge.stripes.util.OgnlUtil.setValue(OgnlUtil.java:104)) to return 
> null from getPropertyClass() and handle it gracefully in bind() ?
> /Jeppe

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

        

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Stripes-development mailing list
Stripes-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to