Pages: 1
Print
Author Topic: ShowEditButtonInAttributeInspector and list of possible values in DTD  (Read 359 times)
lekiert
Member

Posts: 3


« on: July 17, 2017, 08:00:27 AM »

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?
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2507



WWW
« Reply #1 on: July 17, 2017, 04:12:13 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.
Logged
lekiert
Member

Posts: 3


« Reply #2 on: July 18, 2017, 01:13:32 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.
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2507



WWW
« Reply #3 on: July 19, 2017, 01:55:09 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 <XFTReplacements> section would end up looking something like this:

  <XFTReplacements>
    <XFTReplacement>
      <SelectorName>elementname</SelectorName>
      <FormFileName><![CDATA[myform.xft]]></FormFileName>
      <RunMode>Modal</RunMode>
      <DisplayStyle>Replace</DisplayStyle>
      <OverrideRule>Always</OverrideRule>
    </XFTReplacement>
  </XFTReplacements>


Note that the last two values are set but don't have any effect when <RunMode> is modal.

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.
Logged
Pages: 1
Print
Jump to:  

email us