PDA

View Full Version : [FNR] SplitButton text missing in overflow toolbar



ionut.rachita
13 Nov 2010, 5:14 AM
Hello,

I have an issue with a SplitButton in an overflowed toolbar. The component doesn't display its text.
Apparently, in ToolBarLayout.addComponentToMenu(), the "gxt-menutext" data is not set into SplitButton.

I've noticed this issue after gxt 2.1.3, both in 2.2.0 and 2.2.1.

Here is a sample code:



import com.extjs.gxt.ui.client.widget.Window;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.button.SplitButton;
import com.extjs.gxt.ui.client.widget.menu.Menu;
import com.extjs.gxt.ui.client.widget.menu.MenuItem;
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;

public class SplitButtonTest extends TestEntryPoint {

public void onModuleLoad() {
final Window window = new Window();

window.setHeading("Overflow Example");
window.setSize(200, 200);
window.setMinWidth(50);
window.setFrame(true);

final ToolBar toolBar = new ToolBar();

Button btn = new Button("Dummy");
toolBar.add(btn);
btn = new Button("Dummy");
toolBar.add(btn);
btn = new Button("Dummy");
toolBar.add(btn);

final SplitButton splitItem = new SplitButton("Split Button");

Menu menu = new Menu();
menu.add(new MenuItem("<b>Bold</b>"));
menu.add(new MenuItem("<i>Italic</i>"));
menu.add(new MenuItem("<u>Underline</u>"));
splitItem.setMenu(menu);

toolBar.add(splitItem);
btn = new Button("Dummy");
toolBar.add(btn);

window.setTopComponent(toolBar);
window.show();

}
}

sven
13 Nov 2010, 5:20 AM
Fixedin SVN as of revesion 2332