General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion ShowEditButtonInAttributeInspector and list of possible values in DTD

  • lekiert

    ShowEditButtonInAttributeInspector and list of possible values in DTD

    Participants 2
    Replies 3
    Last Activity 5 years, 4 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?

    Reply

    Derek Read

    Reply to: ShowEditButtonInAttributeInspector and list of possible values in DTD

    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.

    Reply

    lekiert

    Reply to: ShowEditButtonInAttributeInspector and list of possible values in DTD

    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.

    Reply

    Derek Read

    Reply to: ShowEditButtonInAttributeInspector and list of possible values in DTD

    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:

     
       
          elementname
                Modal
          Replace
          Always
       

     

    Note that the last two values are set but don't have any effect when 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.

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support