Results 1 to 2 of 2

Thread: Expose bean to view SWF2

  1. #1

    Question Expose bean to view SWF2

    All,
    Seems like a simple question but I can't figure this out. I would like to expose this bean (imported using bean-import) to my JSTL for data binding:
    Code:
       <bean id="myData" class="java.util.HashMap" scope="flow">
            <constructor-arg index="0" type="java.util.Map">
                <map>
                    <entry key="0" value="SELECT ONE"/>
                    <entry key="108" value="One 0 Eight"/>
                    <entry key="107" value="One 0 Seven"/>
                </map>
            </constructor-arg>
        </bean>
    I know the bean has been loaded. I can't figure out what to put in the 'on-render' action to get the bean exposed to the JSP context.

    I've tried:
    Code:
    <on-render>
                <set name="myMap" value="flowScope.myData"/>
    </on-render>
    Thanks!

  2. #2

    Default

    Ahhh..I figured it out. The following set works to expose the variable to page context:
    Code:
    <set name="viewScope.myMap" value="myData"/>
    I guess that the target scope is required and the source scope defaults to the 'search algorithm talked about in the walk through.

Posting Permissions

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