dropdown menu not working as in bootstrap

382 views
Skip to first unread message

Radoslaw Pujan

unread,
Oct 8, 2012, 6:48:12 PM10/8/12
to gwt-bo...@googlegroups.com
Hello.
I got following code:
<b:Nav alignment="RIGHT" addStyleNames="{style.panel}">
<b:DropdownButton  ui:field="myBtn" text="test" >
<h:MyPopupPanel ui:field="myPopup"/>
</b:DropdownButton>
</b:Nav>

Now on my panel I have few controls... like input boxes. No matter what I click in this dropdownbutton menu... panel disappears (closes). And that is not good. How can I prevent it?

I tried the same with following code:
                        <b:Nav alignment="RIGHT" addStyleNames="{style.panel}">
<b:DropdownButton rightDropdown="true" icon="USER" ui:field="loginBtn" text="{cc.loginLoginWidget}" >
<g:VerticalPanel verticalAlignment="ALIGN_MIDDLE" >
     <b:Label  ui:text="{cc.email}:" styleName='text'/>
<b:TextBox alternateSize="LARGE"/>
<b:Label  ui:text="{cc.password}:" styleName='text' />   
     <b:PasswordTextBox/>
     <b:Button  ui:text="{cc.loginLoginWidget}" />
   </g:VerticalPanel>
</b:DropdownButton>
</b:Nav>

and no difference. Always closing on click ... no matter where.

Ohashi, Keisuke

unread,
Oct 8, 2012, 10:41:38 PM10/8/12
to gwt-bo...@googlegroups.com
Hi Radslaw.

umm..
The Dropdown's can not add any panels directly.
If you need add any panels, you may be able to add panel with ListItem tag.

ex


<b:Nav alignment="RIGHT" addStyleNames="{style.panel}">
<b:DropdownButton ui:field="myBtn" text="test" >
<b2:ListItem>
<h:MyPopupPanel ui:field="myPopup"/>
</b2:ListItem>
</b:DropdownButton>
</b:Nav>

But I've not tried it.

Radoslaw Pujan

unread,
Oct 9, 2012, 3:45:59 AM10/9/12
to gwt-bo...@googlegroups.com
Hello. Thanks.
So it means I cannot add now as it is not yet developed or it will never be?
In bootstrap I can do this like that

<li
class="dropdown">
<a class="dropdown-toggle" href="#" data-toggle="dropdown">Sign In <strong class="caret"></strong></a>
<div
class="dropdown-menu" >
   <input type="text" id="username">
</div>

</li>

and even if it does not exists now it would be useful to implement in future as this would be quite useful in many situations, like Login/Sign up panel, or send a link (like in google maps), etc.

Indeed it is even working now as it is showing this panel with all controls, the only thing that is not working is that when I click on any control, then panel is automaticaly closed. So feature exists but not properly working. If someone knows how can I fix it I would do this by myself.

Radoslaw Pujan

unread,
Oct 9, 2012, 3:47:14 AM10/9/12
to gwt-bo...@googlegroups.com
Anyway I will check this solution with ListItem you have proposed. That may be solution.


On Tuesday, October 9, 2012 4:41:59 AM UTC+2, keisuke oohashi wrote:

Ohashi, Keisuke

unread,
Oct 9, 2012, 4:01:09 AM10/9/12
to gwt-bo...@googlegroups.com
Right now, same tag structure can not implement.
because our dropdown-menu of Dropdown classes(Dropdown ,
DropdownButton , etc) is implemented by UnorderedList (ul tag).

BTW
Maybe in your case , that use dropdown in nav, you should use the
Dropdown instead of the DropdownButton.

Akash Gupta

unread,
Oct 21, 2013, 3:30:54 PM10/21/13
to gwt-bo...@googlegroups.com
Widgets are getting added directly under UL tag, and not under LI. Wrong implementation, can not over rider also. :-/
Reply all
Reply to author
Forward
0 new messages