Announcement Announcement Module
Collapse
No announcement yet.
decision-state problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • decision-state problem

    I have a decision-sate that looks like this;

    Code:
    	<decision-state id="newAuthor">
    		<if test="$&#123;flowScope.authorList.list&#91;0&#93; == 0&#125;" then="createAuthorAction.setupForm" else="addAuthorAction.doExecute"/>
    	</decision-state>
    flowScope.authorList is of type ListHolderBean.java

    Code:
    package test;
    
    import java.util.ArrayList;
    import java.util.List;
    
    public class ListHolderBean &#123;
    
        private List list = new ArrayList&#40;&#41;;
    
        public List getList&#40;&#41; &#123;
            return list;
        &#125;
    
        public void setList&#40;List list&#41; &#123;
            this.list = list;
        &#125;
    &#125;
    The error I'm getting is

    Code:
    org.springframework.beans.NotReadablePropertyException&#58; Invalid property 'flowScope.authorList' of bean class &#91;org.springframework.web.flow.execution.impl.StateContextImpl&#93;&#58; Bean property 'flowScope.authorList' is not readable or has an invalid getter method&#58; Does the return type of the getter match the parameter type of the setter?
    Is my test statement in the if condition possible or just plain wrong?

    Thanks.

  • #2
    You need OGNL for that -- right now it's trying to use Spring's BeanWrapper which doesn't support map access like that. Putting ognl.jar in your classpath should do the trick.

    We'll make that error message better for PR4.

    Comment


    • #3
      Thanks Keith, that did the trick.

      Comment

      Working...
      X