jQuery UI Widgets Forums Navigation Menu, Context Menu contextmenu with submenu from xml

This topic contains 2 replies, has 2 voices, and was last updated by  Hristo 6 years, 12 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • contextmenu with submenu from xml #96009

    Robert_1
    Participant

    Hi,
    how can i create a dataadapter for a contextmenü to show this menu:

    -Contractinfo
    -Changes
    -Edit Party
    -Edit Address

    my xml looks like this:
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <visviewmenu>
    <contextmenu >
    <menu label=”STANDARD” visible=”true” enabled=”true”>
    <menuitem label=”Contractinfo” visible=”true” enabled=”true” action=”javascript:doCtxAction();”/>
    <menu label=”Changes” visible=”true” enabled=”true”>
    <menuitem label=”Edit Party” visible=”true” enabled=”true” action=”javascript.doCtxAction();”/>
    <menuitem label=”Edit Address” visible=”true” enabled=”true” action=”javascript:doCtxAction();”/>
    </menu>
    </menu>
    </contextmenu>
    </visviewmenu>

    My dataadatper don’t work:
    var source =
    {
    datatype: “xml”,
    datafields: [
    { name: ‘label’ },
    { name: ‘action’ }
    ],
    id: ‘id’,
    url: contextMenuUrl,
    // localdata: data
    hierarchy:
    {
    // defines the root and record of each hiearchy level.
    root: ‘menu’,
    record: ‘menuitem’
    },
    root: ‘menu’,
    record: ‘menuitem’,
    async: false
    };

    Attention: Menu and submenu have both the same name “menu”.

    contextmenu with submenu from xml #96029

    Robert_1
    Participant

    Unforunately the formatting is lost. the menu should look like this:

    >Contractinfo
    >Changes
    >>>Edit Party
    >>>Edit Address


    <menu label=”Changes” visible=”true” enabled=”true”> <— this is the submenu
    ….

    contextmenu with submenu from xml #96086

    Hristo
    Participant

    Hello Robert_1,

    I would like to suggest you look at these demos:
    https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxmenu/menubindingxml.htm?light
    https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxmenu/contextmenu.htm?light
    After that, if the above does not help I would like to ask you check is there any error messages in the console.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.