You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Appddevvv (JIRA)" <ji...@apache.org> on 2010/07/21 15:48:51 UTC

[jira] Created: (PIVOT-576) allow the key for an object that will be placed into a dictionary to specified bxml:key or use the bxml:id if one is specified.

allow the key for an object that will be placed into a dictionary to specified bxml:key or use the bxml:id if one is specified.
-------------------------------------------------------------------------------------------------------------------------------

                 Key: PIVOT-576
                 URL: https://issues.apache.org/jira/browse/PIVOT-576
             Project: Pivot
          Issue Type: Improvement
          Components: core-beans
            Reporter: Appddevvv


When adding data to the user data (or any dictionary) it would help declutter BXML code and reduce duplication if the key for the dictionary entry could be specified directly on the object.

Proposal:

a) Use bxml:key as the attribute that specifies the key.
b) Use bxml:id if a key is not specified.

Example:

Instead of this:
<aDictLikeUserData>
  <myKey>
     <MyObject ... />
  </myKey>
<aDictLikeUserData>

you can use:

<aDictLikeUserData>
  <MyObject bxml:key="myKey" .../>
</aDictLikeUserData>

or as a backup if key is not defined by id is:

<aDictLikeUserData>
  <MyObject bxml:id="myKeyAndId" ... />
</aDictLikeUserData>


I have a BXMLSerializer patch.  It's about a dozen lines including braces.


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


[jira] Resolved: (PIVOT-576) allow the key for an object that will be placed into a dictionary to specified bxml:key or use the bxml:id if one is specified.

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

Greg Brown resolved PIVOT-576.
------------------------------

    Resolution: Won't Fix

This would just add unnecessary complexity. Attributes are used to specify simple properties (or references) and elements are used to specify complex properties. That's just how BXML is designed to work.


> allow the key for an object that will be placed into a dictionary to specified bxml:key or use the bxml:id if one is specified.
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-576
>                 URL: https://issues.apache.org/jira/browse/PIVOT-576
>             Project: Pivot
>          Issue Type: Improvement
>          Components: core-beans
>            Reporter: Appddevvv
>
> When adding data to the user data (or any dictionary) it would help declutter BXML code and reduce duplication if the key for the dictionary entry could be specified directly on the object.
> Proposal:
> a) Use bxml:key as the attribute that specifies the key.
> b) Use bxml:id if a key is not specified.
> Example:
> Instead of this:
> <aDictLikeUserData>
>   <myKey>
>      <MyObject ... />
>   </myKey>
> <aDictLikeUserData>
> you can use:
> <aDictLikeUserData>
>   <MyObject bxml:key="myKey" .../>
> </aDictLikeUserData>
> or as a backup if key is not defined by id is:
> <aDictLikeUserData>
>   <MyObject bxml:id="myKeyAndId" ... />
> </aDictLikeUserData>
> I have a BXMLSerializer patch.  It's about a dozen lines including braces.

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