Dynamically adding navlink to Dropdown not working

158 views
Skip to first unread message

Patrick Jackson

unread,
Dec 16, 2012, 11:34:36 PM12/16/12
to gwt-bo...@googlegroups.com
I'm attempting to add a navlink to a dropdown in a navbar.  I am doing this programmatically.  So far I am not having any luck and nothing is shown except a small empty drop down.  what am I missing?  Is there an issue with doing it this way?

ui.xml:

<b:ResponsiveNavbar position="TOP" scrollspy="false" inverse="true">
<b:Brand href="#">MyApp</b:Brand>
<b:Nav alignment="RIGHT">
        <b:Dropdown ui:field="login" rightDropdown="true" icon="SIGNIN" iconSize="LARGE"></b:Dropdown>
    </b:Nav>
<b:NavCollapse>
<b:Nav ui:field="nav" />
</b:NavCollapse>
</b:ResponsiveNavbar> 

MyCode.java:

         @UiField
         Dropdown login;


                                                login.setText(userName);
NavLink signout=new NavLink();
signout.setText("Signout");
signout.setIcon(IconType.SIGNOUT);
login.add(signout);
signout.addClickHandler(new ClickHandler(){

@Override
public void onClick(ClickEvent event) {
//TODO signout implementation
}
});

Ohashi, Keisuke

unread,
Dec 18, 2012, 8:16:07 PM12/18/12
to gwt-bootstrap-ml
Hi Patrick.
Sorry , I'm late.

umm..
I'll check it. Please wait few days....




2012/12/17 Patrick Jackson <patjac...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "GWT-Bootstrap" group.
To view this discussion on the web visit https://groups.google.com/d/msg/gwt-bootstrap/-/mOWkDF7x0o4J.
To post to this group, send email to gwt-bo...@googlegroups.com.
To unsubscribe from this group, send email to gwt-bootstra...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gwt-bootstrap?hl=en.

Reply all
Reply to author
Forward
0 new messages