General XMetaL Discussion
XMetaL Community Forum › General XMetaL Discussion › ShowEditButtonInAttributeInspector and list of possible values in DTD
lekiert July 17, 2017 at 2:00 pm
ShowEditButtonInAttributeInspector and list of possible values in DTDJuly 17, 2017 at 2:00 pmParticipants 2Replies 3Last Activity 5 years, 8 months ago
ActiveDocument.ShowEditButtonInAttributeInspector doesn't work if a list of possible values is specified in DTD. Instead of elipsis button the standard listbox is displayed. Is there a workaround that allows to display elipsis button without changing the DTD?Derek Read July 17, 2017 at 10:12 pm
Reply to: ShowEditButtonInAttributeInspector and list of possible values in DTDJuly 17, 2017 at 10:12 pm
What you are asking for is not currently possible with any release up to and including the current release of XMetaL Author Essential and Enterprise (12). For enumerated attributes it has been assumed there would be no need to provide an additional UI. But perhaps you have a special use case that shows it is needed.
So, with the current design you would need to change the declaration for the attribute to be something other than an enumerated list of values.
What do you need to display in a custom UI that the drop down list does not provide? If you can provide some detail perhaps I can translate that into a feature request for an upcoming release (ie: earliest possible version would be 13). The more detail the better.
If you prefer not to discuss this here (perhaps there is some corporate or other information you cannot share that would help us understand) then please submit a feature request through XMetaL Support.lekiert July 18, 2017 at 7:13 am
Reply to: ShowEditButtonInAttributeInspector and list of possible values in DTDJuly 18, 2017 at 7:13 am
I need a UI component (drop down list or elipsis button with popup) that allows to select values that are dependent on selection of other attribute. In other words, when a node in XML has 2 attributes and the user changes the value of attribute A, I want to load the possible values for attribute B and these values are the children of first attribute.Derek Read July 19, 2017 at 7:55 pm
Reply to: ShowEditButtonInAttributeInspector and list of possible values in DTDJuly 19, 2017 at 7:55 pm
You could use an XFT form and have it appear as a modal dialog when the user clicks on the element. In the XFT you could define any business rules you want that aren't necessarily definable in your schema. I guess that's basically what you are asking for, with the difference being that the trigger for opening the form is not in the Attribute Inspector.
The CTM file's
section would end up looking something like this:
Note that the last two values are set but don't have any effect when
You could do this with an embedded XFT form as well but that replaces the entire element so if users can enter PCDATA into an element that can make authoring confusing. Also, if there will be many such elements in a document you should not embed XFT forms as that will slow document editing down significantly. Launching them as modal dialogs does not have this limitation.
- You must be logged in to reply to this topic.