You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xbean-dev@geronimo.apache.org by "Paul Austin (JIRA)" <ji...@apache.org> on 2007/01/04 01:24:27 UTC

[jira] Created: (XBEAN-69) Support for maps of objects

Support for maps of objects
---------------------------

                 Key: XBEAN-69
                 URL: https://issues.apache.org/jira/browse/XBEAN-69
             Project: XBean
          Issue Type: New Feature
          Components: spring
    Affects Versions: 2.8
         Environment: Linux JDK 1.4.2
            Reporter: Paul Austin


The current syntax supports defining a map of values for a property. This only works if the value is a string.

<beans:beans
 xmlns="http://ns.com/app/1.0"
 xmlns:beans="http://www.springframework.org/schema/beans"
 xmlns:util="http://www.springframework.org/schema/util"
>
 <MyObject>
  <mapProperty>
    <property key="sideBar">hello</property>
  </mapProperty>
 </MyObject>
</beans:beans>

For my application I would like the value of the map to be another XBean

<beans:beans
 xmlns="http://ns.com/app/1.0"
 xmlns:beans="http://www.springframework.org/schema/beans"
 xmlns:util="http://www.springframework.org/schema/util"
>
 <MyObject>
  <mapProperty>
    <entry key="sideBar">
      <ChildObject>
        <name>Test</name>
      </ChildObject>
    </entry>
  </mapProperty>
 </MyObject>
</beans:beans>

I tried to use the spring map object but all this does is set an empty map.

<beans:beans
 xmlns="http://ns.com/app/1.0"
 xmlns:beans="http://www.springframework.org/schema/beans"
 xmlns:util="http://www.springframework.org/schema/util"
>
 <MyObject>
   <mapProperty>
     <util:map>
        <!-- Use the spring namespace for entry -->
        <beans:entry key="sideBar">
         <ChildObject>
            <name>Test</name>
          </ChildObject>
         </beans:entry>
     </util:map>
   </mapProperty>
 </MyObject>
</beans:beans>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (XBEAN-69) Support for maps of objects

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/XBEAN-69?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet closed XBEAN-69.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0

$ svn commit -m "XBEAN-69: Support for maps of objects"
Sending        xbean-spring/src/main/java/org/apache/xbean/spring/context/v2c/XBeanNamespaceHandler.java
Sending        xbean-spring/src/test/java/org/apache/xbean/spring/context/FavoriteUsingSpringTest.java
Sending        xbean-spring/src/test/resources/org/apache/xbean/spring/context/favorite-normal.xml
Sending        xbean-spring/src/test/resources/org/apache/xbean/spring/context/favorite-xbean.xml
Transmitting file data ....
Committed revision 517153.

> Support for maps of objects
> ---------------------------
>
>                 Key: XBEAN-69
>                 URL: https://issues.apache.org/jira/browse/XBEAN-69
>             Project: XBean
>          Issue Type: New Feature
>          Components: spring
>    Affects Versions: 2.8
>         Environment: Linux JDK 1.4.2
>            Reporter: Paul Austin
>         Assigned To: Guillaume Nodet
>             Fix For: 3.0
>
>
> The current syntax supports defining a map of values for a property. This only works if the value is a string.
> <beans:beans
>  xmlns="http://ns.com/app/1.0"
>  xmlns:beans="http://www.springframework.org/schema/beans"
>  xmlns:util="http://www.springframework.org/schema/util"
> >
>  <MyObject>
>   <mapProperty>
>     <property key="sideBar">hello</property>
>   </mapProperty>
>  </MyObject>
> </beans:beans>
> For my application I would like the value of the map to be another XBean
> <beans:beans
>  xmlns="http://ns.com/app/1.0"
>  xmlns:beans="http://www.springframework.org/schema/beans"
>  xmlns:util="http://www.springframework.org/schema/util"
> >
>  <MyObject>
>   <mapProperty>
>     <entry key="sideBar">
>       <ChildObject>
>         <name>Test</name>
>       </ChildObject>
>     </entry>
>   </mapProperty>
>  </MyObject>
> </beans:beans>
> I tried to use the spring map object but all this does is set an empty map.
> <beans:beans
>  xmlns="http://ns.com/app/1.0"
>  xmlns:beans="http://www.springframework.org/schema/beans"
>  xmlns:util="http://www.springframework.org/schema/util"
> >
>  <MyObject>
>    <mapProperty>
>      <util:map>
>         <!-- Use the spring namespace for entry -->
>         <beans:entry key="sideBar">
>          <ChildObject>
>             <name>Test</name>
>           </ChildObject>
>          </beans:entry>
>      </util:map>
>    </mapProperty>
>  </MyObject>
> </beans:beans>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (XBEAN-69) Support for maps of objects

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/XBEAN-69?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet reassigned XBEAN-69:
------------------------------------

    Assignee: Guillaume Nodet

> Support for maps of objects
> ---------------------------
>
>                 Key: XBEAN-69
>                 URL: https://issues.apache.org/jira/browse/XBEAN-69
>             Project: XBean
>          Issue Type: New Feature
>          Components: spring
>    Affects Versions: 2.8
>         Environment: Linux JDK 1.4.2
>            Reporter: Paul Austin
>         Assigned To: Guillaume Nodet
>             Fix For: 3.0
>
>
> The current syntax supports defining a map of values for a property. This only works if the value is a string.
> <beans:beans
>  xmlns="http://ns.com/app/1.0"
>  xmlns:beans="http://www.springframework.org/schema/beans"
>  xmlns:util="http://www.springframework.org/schema/util"
> >
>  <MyObject>
>   <mapProperty>
>     <property key="sideBar">hello</property>
>   </mapProperty>
>  </MyObject>
> </beans:beans>
> For my application I would like the value of the map to be another XBean
> <beans:beans
>  xmlns="http://ns.com/app/1.0"
>  xmlns:beans="http://www.springframework.org/schema/beans"
>  xmlns:util="http://www.springframework.org/schema/util"
> >
>  <MyObject>
>   <mapProperty>
>     <entry key="sideBar">
>       <ChildObject>
>         <name>Test</name>
>       </ChildObject>
>     </entry>
>   </mapProperty>
>  </MyObject>
> </beans:beans>
> I tried to use the spring map object but all this does is set an empty map.
> <beans:beans
>  xmlns="http://ns.com/app/1.0"
>  xmlns:beans="http://www.springframework.org/schema/beans"
>  xmlns:util="http://www.springframework.org/schema/util"
> >
>  <MyObject>
>    <mapProperty>
>      <util:map>
>         <!-- Use the spring namespace for entry -->
>         <beans:entry key="sideBar">
>          <ChildObject>
>             <name>Test</name>
>           </ChildObject>
>          </beans:entry>
>      </util:map>
>    </mapProperty>
>  </MyObject>
> </beans:beans>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.