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.

Reply via email to