instead of "java.lang.String[]" can you try "[Ljava.lang.String;"

-Matthias

On 6/6/06, DFenS <[EMAIL PROTECTED]> wrote:

I have an ArrayList for a selectManyCheckbox component which is mapped to a
String array. I want to have a item of the checkbox to be selected by
default. I tried the following "not working" part with java.lang.String[]
and got a cast exception. How do I do this???

    <managed-bean>
        <managed-bean-name>licenseKeyBean</managed-bean-name>
        <managed-bean-class>LicenseKeyBeanImpl</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
        <!-- not working -->
        <!--managed-property>
            <property-name>features</property-name>
            <property-class>java.lang.String[]</property-class>
            <list-entries>
                <value-class>java.lang.String</value-class>
                <value>1</value>
            </list-entries>
        </managed-property-->
        <managed-property>
            <property-name>featureList</property-name>
            <property-class>java.util.ArrayList</property-class>
            <list-entries>
                <value-class>javax.faces.model.SelectItem</value-class>
                <value>#{feature1}</value>
            </list-entries>
        </managed-property>
    </managed-bean>

    <!-- set features -->
    <managed-bean>
        <managed-bean-name>feature1</managed-bean-name>

<managed-bean-class>javax.faces.model.SelectItem</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
        <managed-property>
            <property-name>label</property-name>
            <value>dummy</value>
        </managed-property>
        <managed-property>
            <property-name>value</property-name>
            <value>1</value>
        </managed-property>
    </managed-bean>

--
View this message in context: 
http://www.nabble.com/managed-bean-presets-for-String---t1746093.html#a4746336
Sent from the MyFaces - Users forum at Nabble.com.




--
Matthias Wessendorf
Aechterhoek 18
48282 Emsdetten
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Reply via email to