Results 1 to 3 of 3

Thread: decision-state problem

  1. #1

    Default 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. #2
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    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.
    Keith Donald
    Core Spring Development Team

  3. #3

    Default

    Thanks Keith, that did the trick.

Similar Threads

  1. Java-based FlowBuilder Decision State
    By curtney in forum Web Flow
    Replies: 4
    Last Post: Apr 15th, 2006, 01:02 PM
  2. Problems with decision state
    By Skywalker14 in forum Web Flow
    Replies: 3
    Last Post: Sep 23rd, 2005, 02:45 AM
  3. The classic LazyInitializationException Problem :(
    By vaibhavkhattri in forum Data
    Replies: 3
    Last Post: Aug 12th, 2005, 08:42 AM
  4. problem with action state
    By khalida in forum Web Flow
    Replies: 3
    Last Post: Jun 29th, 2005, 10:44 AM
  5. Replies: 3
    Last Post: Jun 21st, 2005, 03:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •