SplitButton Add-on

Last week I released a new Vaadin add-on called SplitButton. SplitButton is a Vaadin component that contains a primary button and a button that opens a popup. The popup can contain any Vaadin component or component container similarly than in
PopupButton
.

SplitButton has a dependency on PopupButton 1.2.1 that is included in the add-on package.

For more information (download, demo, …) go to the
Vaadin Directory
. And remember to rate the add-in in Directory :slight_smile:

Cheers,

-Henri

Nice add-on, Henri, exactly what I was looking for.

One small remark: why not add popupbutton as a dependency in the pom of the splitbutton?

You are correct, I should add a dependency to the pom. I’ll try to add it to the next version of the component. Thank you for the tip.

-Henri

Hey! Nice addon for having container under the right side button.

If you need to have multiple buttons added just as regular buttons without need for adding any specific layouts or containers you might want to check out the MultiButton addon at:
Directory - MultiButton

I just uploaded a new version (0.9.2) of the component and now Maven resolves the dependency to PopupButton.

Just released a new version of SplitButton. SplitButton 0.9.3 contains the following changes:

  • Added support for the Chameleon theme
  • Fixes to component’s client-side size calculations
  • Enhancements to the demo application

Hi Henri!

I encountered a strange rendering FormLayout as main component in SplitButton.
This is simple code:


@SessionScoped
public class MyApplication extends Application {

    private static final long serialVersionUID = 3783156498368953866L;
 
    @Override
    public void init() {
        VerticalLayout layout = new VerticalLayout();

        layout.setSpacing(true);
        layout.setMargin(true);
        
        layout.addComponent(getFormLayout());
        
        SplitButton splitButton = new SplitButton("Button");
        splitButton.setImmediate(true);
        splitButton.addComponent(getFormLayout());
        layout.addComponent(splitButton);        
        
        
        setMainWindow(new Window("EE Test", layout));
    }
   private Component getFormLayout() {
        
        FormLayout formLayout = new FormLayout();
        formLayout.setCaption("Form");
        formLayout.setImmediate(true);
        formLayout.setSpacing(true);
        formLayout.setSizeUndefined();
                
        PopupDateField date = new PopupDateField("Date", new Date());
        date.setImmediate(true);
        date.setResolution(PopupDateField.RESOLUTION_DAY);
        formLayout.addComponent(date);
        
        TextField name = new TextField("Name");
        name.setImmediate(true);
        formLayout.addComponent(name);
        
        TextField age = new TextField("Age");
        age.setImmediate(true);
        formLayout.addComponent(age);
        
        return formLayout;
    }
}

See attached file. It looks like a bug
12559.png

It seems like the padding values of the TextField are not applied onto the fields inside the popup.

Can we have the Split button compatible for the vaadin 7?

Is there any chance to have the same for vaadin-7.x?

No forecast for Vaadin 7 ?

The last question is about 5 month old so I make a request. Are you planning to make the SplitButton compatible with Vaadin 7?

The source code available
here
doesn’t look too complicated (server side around 500 lines and client less then 200). You might be able to rewrite it for Vaadin 7 yourself because it seems like the author is too busy for it.

If you can hang on for a bit longer, this addon will shortly be vailable for Vaadin 7. My company paid to have it ported to version 7 and it has taken a bit of time to get the waiver to release it back into the community signed.
And this has now been done.

Cheers.

Hi,
I m using SplitButton its running fine normally, but when I tried to add splitbutton on PopUp window then listener added to the buttons are not working, what I means to say that SplitButton listener is working fine but the other Button’s listener of the SplitButton PopUpLayout are not working .Other Buttons are displying on the SplitButton PopUp Layout but their listener are not working ,it seems buttons are not getting their lisenters. This case arose when I added splitButton on the PopUp window.

If any one have any idea then Plz suggest .
Thank You in advance.