Ticket T519224
Visible to All Users

ActionContainerHolder/ ASPxMenu Category ID

created 8 years ago (modified 8 years ago)

Hello,

In our XAF web application we display actions in the UI (in vertical template). This is the part where i add action container holder in template's markup

<td class="lastAutoSize">
<cc3:XafUpdatePanel ID="UPSAC" runat="server" style="align-content:flex-end">
<cc2:ActionContainerHolder runat="server" ID="SAC" CssClass="Security" Categories="Security"
ContainerStyle="Links" SeparatorHeight="23px" ShowSeparators="False" />
</cc3:XafUpdatePanel>
</td>

When I look at page source, i see that action id is something like 'Vertical_SAC_Menu_DXI1_T'. (I've also attached an image). As far as i understand this id was generated by XAF.
What i want is,can i change this id to something more meaningful like 'Vertical_SAC_Menu_LogOff'.

Comments (1)
DevExpress Support Team 8 years ago

    Hello Korhan,

    Thank you for your question. I am afraid that we do not have an immediate answer. Please give us additional time to discuss your question with our developers.

    Answers approved by DevExpress Support

    created 8 years ago (modified 8 years ago)

    >>What i want is,can i change this id to something more meaningful like 'Vertical_SAC_Menu_LogOff'.
    Korhan,

    I am afraid there is no easy way to change this and, frankly speaking, this does not look like a typical customization.
    Would you please elaborate more on why you ever need to change these identifiers? How will these identifiers be used further by you? Are you using some external functional testing system or what? Knowing your ultimate goal precisely will likely help us provide you with alternative technical solutions. Thanks in advance.

      Show previous comments (5)
      Dennis Garavsky (DevExpress) 7 years ago

        Hello Korhan,

        We do not have news from the ASP.NET Team on their ASPxMenu component for this task. For now, I can only recommend you consider using EasyTest. If that is not possible, you can try to train your external testing system to use another HTML attribute. For instance, we made an experiment with assigning a custom attribute to the WebPropertyEditor's control on the ControlCreated event: control.Attributes["MyTest"] = "Test";
        As a result, this custom attribute was added to the markup. You can try this approach for other controls too. I must note that we have not tested it in other scenarios, so you will need to research this on your own.

          Hello Dennis,

          Adding a custom attribute is what we need but we need a generic way to implement this solution, could you provide a simple example for your suggestion(adding an attribute in ControlCreated event), for example how can i do this in a detailview. Also, as far as i understand, this solution is for Property editors, is it possible to use a similar solution for actions,tabs etc. ?

          Regards.

          Dennis Garavsky (DevExpress) 7 years ago

            Korhan,

            We do not have generic solutions or exact guidelines for this task. You will have to research solutions for each case based either on your exact requirements or elements for which you want to provide these custom attributes. Below, you can find links to the XAF documentation showing how to access controls of property editors, layout items (e.g., tabs) and Actions:Extend Functionality > Access Editor Settings
            How to access a tab control in a Detail View layout
            How to: Customize Action Controls

            In addition to this, you will also need to research documentation for each involved ASP.NET control, e.g.:
            DevExpress.Web > ASPxMenu
            DevExpress.Web > ASPxPageControl
            Good general ASP.NET WebForms, HTML, CSS, JavaScript knowledge is also required for this advanced task, so, if required, be sure to consult with required public community resources. It is also possible that certain tasks will require researching the DevExpress source code.

            At the same time, it is possible that this approach will not be applicable to other UI elements which are not server side controls. For instance, MenuItem is not a control itself and as we discussed, ASPxMenu does not provide ways to intercept ID generation for its items.

            I wanted to emphasize that all that we have and can suggest for now is EasyTest. If you want to accomplish this task differently, this will imply research and experimental work. We will not be able to help you much with ready solutions. For us, accomplishing this task is like implementing a new unplanned and custom feature of an unknown size from scratch, which is outside the scope of our support service and behind available resources. Thanks for your understanding.

            Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

            Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.