Not sure how you have things set up but here is a possible solution:

Implement the Menu/Nav using VerticalPanel (or an element that can
insert elements based on index)

Let's say you have Button1 (the button dependent on the startup
checks), Button2, Button3

When you build the menu just go ahead and add Button2 and Button3.
After the checks you can then add Button1 at the correct index

Now you can notify your menu widget directly (for the checking) or
through event (just register a new event and handler)

But the most important thing for you is: VerticalPanel.insert(button,
0)


---------
VerticalPanel panel = new VerticalPanel();

    Anchor button2 = new Anchor("button2");
    Anchor button3 = new Anchor("button3");

    panel.add(button2);
    panel.add(button3);
-----
then something like:
panel.insert(new Anchor("button1"), 0)

Except you can replace Anchor with your button widget or whatever


I have an AppEventLink which just takes in a callback which is called
onClick. So I can easily separate general appLinks and the styling
from the code that is executed


On Jun 10, 12:03 pm, SciencePiggy <[email protected]> wrote:
> I have a MenuBar with two MenuItems. On creation the first MenuItem is
> hidden via setVisible(false). Once various checks (during onload) have
> been passed then the MenuItem is made visible again. If those checks
> pass then the MenuBar behaves as expected; the user can tab into the
> MenuBar where the first MenuItem will receive focus and the arrow keys
> can be used to navigate the menu. However when those checks don't pass
> and the user tabs into the MenuBar the focus is again on the first
> MenuItem as opposed to the first visible MenuItem.
>
> Just to clarify, in the latter case the hidden MenuItem stays hidden
> but to the user it appears as if they have tabbed into an invisible
> element. I can prevent the user from executing the hidden MenuItem
> command (via enter key) by setting the command to null during
> setVisible() but I'd rather have a solution that effectively removes
> the MenuItem from the MenuBar in this scenario.
>
> Any suggestions?
>
> Tested on...
>
> GWT 2.1.1
> Firefox 3.6.17
> IE7

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to