It's easy enough for standard property editors to show a property, allow the user to edit, and to shuttle the text back into the XML. But what happens when you have a chunk of XML you want to simplify for the user some truly ugly XML and only show bits and pieces while generating the rest of the ugly XML under the covers?
In this case, let's say that really the only things I want the user to edit are the two name properties in <mbean name="x,y">...
It appears that I should be able to use child properties, but I suspect the output would look something like...
jboss.esb.quickstart.destination:service : _Queue_________
name : _quickstart_Aggregator_Blue_Alert______
Suggestions? Examples? Pointers? Should I simply offer a child properties list and allow both name and value to be edited? I'm still ferreting out the meaning behind these variables (not much written about them), just exploring options.
Thanks in advance oh wise and wonderful Sapphire community.
If I understand your question correctly, you are asking how to implement binding to structured content inside XML attribute value...
You have two options.
1. Present the attribute value as a list of key-values. See XmlDelimitedListBindingImpl class. There is a usage example in contacts sample. You will need to override createListEntryResource() to return a custom resource that knows how read/write individual components of a key-value pair. If you read through the code in XmlDelimitedListBindingImpl and DelimitedListBindingImpl, you should get a pretty good understanding of how this works.
2. Present the attributes that you know about as distinct value properties. To do this, you will need to use @CustomXmlValueBinding/XmlValueBindingImpl for each of these properties.
Which one of these you choose depends on your configuration file semantics.