pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shahzad Bhatti <sbha...@peak6.com>
Subject Re: Dynamic menu buttons
Date Mon, 12 Apr 2010 21:27:55 GMT
 I added the dynamic menus as you suggested, but my menu items are showing up as disabled.
Also, how do I get selected menu item from the action.

On 4/9/10 12:08 PM, "Greg Brown" <gkbrown@mac.com> wrote:

Your example translates roughly to the following in Java:

MenuButton menuButton = new MenuButton();

Menu menu = new Menu();

Menu.Section menuSection = new Menu.Section();

Menu.Item menuItem = new Menu.Item();

So, you can basically duplicate the last section to dynamically add items to the menu section.

In case you are not familiar with it, you can give the <Menu.Section> element an ID
and map it into your Java code using the @WTKX annotation. That way, you don't need to create
the menu section in code - you can still declare it in your WTKX.

On Apr 9, 2010, at 2:59 PM, Shahzad Bhatti wrote:

> I need to create menu buttons that I can populate dynamically. How would I change menu
buttons from static definition such as:
>                        <MenuButton>
>                            <menu>
>                                <Menu>
>                                    <sections>
>                                        <Menu.Section>
>                                            <Menu.Item buttonData="XXXX" action="myaction"/>
>                                        </Menu.Section>
>                                    </sections>
>                                </Menu>
>                            </menu>
>                        </MenuButton>
> so that I can add start with empty Menu.Section and add Menu.Item programmatically. Thanks.
> ______________________________________________
> See  http://www.peak6.com/email_disclaimer.php
> for terms and conditions related to this email

View raw message