[ 
http://www.stripesframework.org/jira/browse/STS-815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12306#comment-12306
 ] 

Clemens Fuchslocher commented on STS-815:
-----------------------------------------

The inner class TestActionBean.Test is the problem.

If you set the log level to DEBUG, then you would see exceptions like this:

{noformat}
DEBUG   net.sourceforge.stripes.controller.DefaultActionBeanPropertyBinder      
Could not bind property with name [testList[0].bar] to bean of type: TestAction
net.sourceforge.stripes.util.bean.EvaluationException: Encountered an exception 
while trying to create  a default instance for property '0' in expression 
'testList[0].bar'.
        at 
net.sourceforge.stripes.util.bean.PropertyExpressionEvaluation.getDefaultValue(PropertyExpressionEvaluation.java:655)
        at 
net.sourceforge.stripes.util.bean.PropertyExpressionEvaluation.setValue(PropertyExpressionEvaluation.java:618)
        at 
net.sourceforge.stripes.controller.DefaultActionBeanPropertyBinder.bindNonNullValue(DefaultActionBeanPropertyBinder.java:390)
        at 
net.sourceforge.stripes.controller.DefaultActionBeanPropertyBinder.bind(DefaultActionBeanPropertyBinder.java:191)
        at 
net.sourceforge.stripes.controller.DispatcherHelper$3.intercept(DispatcherHelper.java:218)
        at 
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:158)
        at 
net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:113)
        at 
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)
        at 
net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:74)
        at 
net.sourceforge.stripes.controller.DispatcherHelper.doBindingAndValidation(DispatcherHelper.java:214)
        at 
net.sourceforge.stripes.controller.DispatcherServlet.doBindingAndValidation(DispatcherServlet.java:254)
        at 
net.sourceforge.stripes.controller.DispatcherServlet.service(DispatcherServlet.java:148)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at 
net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:247)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
        at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.InstantiationException: action.TestAction$Test
        at java.lang.Class.newInstance0(Class.java:340)
        at java.lang.Class.newInstance(Class.java:308)
        at 
net.sourceforge.stripes.util.bean.PropertyExpressionEvaluation.getDefaultValue(PropertyExpressionEvaluation.java:651)
        ... 27 more
{noformat}

Move this inner class into its own file and the problem should be solved.


> Indexed properties checkbox comes back checked on a validation error
> --------------------------------------------------------------------
>
>                 Key: STS-815
>                 URL: http://www.stripesframework.org/jira/browse/STS-815
>             Project: Stripes
>          Issue Type: Bug
>          Components: Validation
>    Affects Versions: Release 1.5.6
>            Reporter: Matthew Kilpatrick
>         Attachments: Checkbox-test.zip
>
>
> This may be related to STS-781
> When using indexed properties with two required fields and a non-required 
> checkbox, if the fields were previously saved but now the user decides to 
> remove one of the required fields, upon validation failure the checkbox is 
> returned as checked when is should remain unchecked. This only occurs in the 
> case where two objects are used: one that will contain a list of all 
> populated rows to work with, and one that contains the rows of previously 
> saved data. An example input field using the two objects looks like this:
> <stripes:checkbox name="testList[${loop.index}].bool" 
> checked="${actionBean.dbTestList[loop.index].bool}"/>
> All other fields return as empty when displayed on validation error, but 
> checkboxes remain checked. 
> In the attached test case uncheck Bool and clear out Bar and hit Save. The 
> checkbox will get rechecked on validation failure but it should remain 
> unchecked.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to