Results 1 to 2 of 2

Thread: SpEL error in bean config

  1. #1
    Join Date
    Dec 2010
    Posts
    2

    Default SpEL error in bean config

    Hi,

    I am trying to use the new spring EL feature of version 3 for the first time and am receiving this exception:

    Invalid property 'size' of bean class [org.kuali.rice.kns.ui.control.SelectControl]: Bean property 'size' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

    Here is the bean def:

    <bean parent="AttributeLabelFieldPair" p:name="field4" p:label="Field 4">
    <property name="control">
    <bean parent="SelectControl" >
    <property name="size" value="#{10 + 20}"/>
    </bean>
    </property>
    </bean>

    The 'size' property is of type int and has a valid getter/setter. Just setting the value to 30 (value="30") works, and I would expect the EL #{10+20} would accomplish the same thing. I have tried different expressions with different property types and keep getting this error. It seems like the EL is not being recognized.

    Any tips would be greatly appreciated!!!

    thanks,
    Jerry

  2. #2

    Default

    I would make sure you have all the correct jar dependencies. Are you using maven?

Posting Permissions

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