GoDiagram Web Reference
HandlesChildren Property

Gets or sets whether there are child objects of this Northwoods.GoWeb.GoGroup that should be represented as nested XML elements in the body of this transformer's element.
Syntax
'Declaration
 
Public Property HandlesChildren As Boolean
public bool HandlesChildren {get; set;}

Property Value

This defaults to false.
Remarks

If you are defining a transformer for a Northwoods.GoWeb.GoSubGraphBase-inheriting class, you'll want to set this to true.

Setting this to true also automatically sets BodyConsumesChildElements to true.

You may find that nested elements are being generated for child objects for which you do not want separate XML elements. This may happen, for example, when you define a transformer for the Northwoods.GoWeb.GoText class and for a node class that has a predefined label as well as a variable number of additional Northwoods.GoWeb.GoText children. You have at least two choices.

One choice is to replace all of those non-label Northwoods.GoWeb.GoText child objects with instances of some class that inherits from Northwoods.GoWeb.GoText. Because transformers are defined per type, this is an easy way to discriminate between the usages of text objects. Your transformer should then be defined for your custom class inheriting from Northwoods.GoWeb.GoText, instead of for Northwoods.GoWeb.GoText itself.

The other choice is to make the transformer for Northwoods.GoWeb.GoText smarter. Use a transformer inheriting from GoXmlBindingTransformer and override the GoXmlTransformer.SkipGeneration method to return true when the text object is actually a label handled as a node attribute, and to return false when the text object is supposed to be represented as a separate nested XML element.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GoXmlBindingTransformer Class
GoXmlBindingTransformer Members
ChildrenCollectionPath Property
HandlesChildAttributes Property

 

 


© 2013. Northwoods Software Corporation. All Rights Reserved.

Send Feedback