Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    MenuButton/menu

    I'm having an issue getting a hierarchical menu to be displayed correctly.

    The following is the datasource that is generated:

    Code:
    <DataSource ID="categories1275636497532ds" tableName="categories">
            <fields>
                    <field name="description" type="text" hidden="false" primaryKey="false" length = "100" />
                    <field name="id" type="sequence" hidden="true" primaryKey="true" canEdit="false"/>
                    <field name="fkParentCategoryId" type="integer" hidden="true" foreignKey="id" rootValue = "null" primaryKey="false" />
            </fields>
    </DataSource>
    I can see that a server OP_FETCH with correct criteria is being executed and data returned correctly for each sub menu so the appropriate items are displayed and parented correctly, but I have just two problems:

    i) Instead of the field 'description' being displayed I can see that 'id' is displayed;
    ii) Even though I have specified the canSelectParentItems against the menu as true, when I select a parent menu by clicking it still shows the submenu and the recordClick method is not invoked.

    To address the first issue, I have tried overriding Menu.formatCellValue but this is only ever invoked with a record value which is the root item displayed within the menu. It doesn't appear to be invoked for child items.

    Is there something obvious that I am missing or doing wrong?

    Any pointers would be much appreciated.
Working...
X