pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "aappddeevv" <aappdde...@verizon.net>
Subject RE: [jira] Commented: (PIVOT-514) create an annotation to specify the default "child" property of a component used by the serializer to attach children objects
Date Thu, 10 Jun 2010 04:12:52 GMT
I tried but could not figure out how to reinstate the original file. There
were only actually 5-6 six lines that were added (in addition to some static
methods). I added @Inherited on the annotation as pointed out in another
post to DefaultProperty. 

The serializer patch (3-4 lines) are exclusive of the other patch I
submitted to create some small protected factory methods for subclassing the
serializer.

I also included the patch for the Window, Viewport and Border classes to set
the default property. I have since noticed that there are other components
that could have a default property but I have not tested those. If we can
get the patch in for the basics, then we can add the default property to the
other classes once we write some tests.

I have attached the updated zip file to the original issue in jira.




-----Original Message-----
From: Greg Brown (JIRA) [mailto:jira@apache.org] 
Sent: Wednesday, June 09, 2010 3:58 PM
To: dev@pivot.apache.org
Subject: [jira] Commented: (PIVOT-514) create an annotation to specify the
default "child" property of a component used by the serializer to attach
children objects


    [
https://issues.apache.org/jira/browse/PIVOT-514?page=com.atlassian.jira.plug
in.system.issuetabpanels:comment-tabpanel&focusedCommentId=12877180#action_1
2877180 ] 

Greg Brown commented on PIVOT-514:
----------------------------------

Any chance you could try to regenerate this patch? It is tough to see what
actually changed because so many lines are flagged.

It is possible that you changed the line endings, such that every line looks
like it changed?



> create an annotation to specify the default "child" property of a
component used by the serializer to attach children objects
>
----------------------------------------------------------------------------
-------------------------------------------------
>
>                 Key: PIVOT-514
>                 URL: https://issues.apache.org/jira/browse/PIVOT-514
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>            Reporter: Appddevvv
>            Priority: Minor
>             Fix For: 1.6
>
>         Attachments: defaultpropertypatch.zip
>
>
> Add an annotation called @ContentProperty that specifies the default
property to attach children to in the serializer. I found that I was making
mistakes when creating WTKX that this annotation and a default "child
attachment" approach could help. Benefits include:
> a) The client does not need to know which property to attach the children
to. 
> b) To add objects to a collection the parent object does not need to
extend from sequence. The sequence can be contained in the object instead of
implementing the interface. Containment can be another approach to getting
content into the parent objects versus inheritance.
> c) You can change some of the properties in the class where attachment
occurs and your WTKX files do not have to change.
> The default mechanism would be similar to what exists today. It's a simple
extension of it. The "attach child" search would be:
> a) If the content property is specified, use that property to add the
child to. If the content property is a collection, add it to the collection.
> b) If the content property is not specified,
> b.1) If the parent object is a collection (this is how it is handled
today) then add it to the collection using the List.add(Object) method.
> b.2) Add it to the property specified in the XML. This is also how it is
handled today.
> I wrote this for a small modeled framework similar to pivot and could work
up a couple of patches for this. This is very similar to how wpf handles
child content specifications in XML. Thoughts?

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


Mime
View raw message