private Component buildMyFavorite() { VerticalLayout layout = new VerticalLayout(); layout.setWidth("100%"); layout.setHeight(null); layout.setSpacing(true); vfMyFavorite = new ViewerForm("", false); vfMyFavorite.getFieldset().addStyleName("fieldset-3-5"); vfMyFavorite.getFieldset().addStyleName("fieldset-0"); vfMyFavorite.addComboBox(termResource.getTerm("Create In"), "createIn", false); vfMyFavorite.addTextField(termResource.getTerm("New Folder"), "newFolder", false); layout.addComponent(vfMyFavorite); HorizontalLayout hl = new HorizontalLayout(); hl.setWidth("100%"); hl.setHeight(null); Commandbar commandbar = new Commandbar(); commandbar.setSizeUndefined(); Button btnSave = new Button(termResource.getTerm("Save")); btnSave.setIcon(FontAwesome.SAVE); Button btnClose = new Button(termResource.getTerm("Close")); btnClose.setIcon(FontAwesome.TIMES); commandbar.addCommand(btnSave, COMMAND.SAVE_MY_FAVORITE); commandbar.addCommand(btnClose, COMMAND.CLOSE_MY_FAVORITE); commandbar.addCommandExecuteListener( new CommandEvent.ExecuteListener() { @Override public void execute(ExecuteEvent event) { perform(event.getInstruction()); } }); hl.addComponent(commandbar); hl.setComponentAlignment(commandbar, Alignment.MIDDLE_CENTER); layout.addComponent(hl); return layout; }