Search in sources :

Example 1 with ModalFooterOKCancelButtons

use of org.uberfire.ext.widgets.common.client.common.popups.footers.ModalFooterOKCancelButtons in project drools-wb by kiegroup.

the class AddFieldClickHandler method onClick.

@Override
public void onClick(final ClickEvent event) {
    final FormStylePopup pop = new FormStylePopup(TestScenarioConstants.INSTANCE.ChooseAFieldToAdd());
    final FactFieldSelector selector = createAddNewField(pop);
    pop.addAttribute(TestScenarioConstants.INSTANCE.ChooseAFieldToAdd(), selector);
    pop.add(new ModalFooterOKCancelButtons(new Command() {

        @Override
        public void execute() {
            SelectionEvent.fire(selector, selector.getSelectedText());
        }
    }, new Command() {

        @Override
        public void execute() {
            pop.hide();
        }
    }));
    pop.show();
}
Also used : Command(com.google.gwt.user.client.Command) ModalFooterOKCancelButtons(org.uberfire.ext.widgets.common.client.common.popups.footers.ModalFooterOKCancelButtons) FormStylePopup(org.uberfire.ext.widgets.common.client.common.popups.FormStylePopup)

Aggregations

Command (com.google.gwt.user.client.Command)1 FormStylePopup (org.uberfire.ext.widgets.common.client.common.popups.FormStylePopup)1 ModalFooterOKCancelButtons (org.uberfire.ext.widgets.common.client.common.popups.footers.ModalFooterOKCancelButtons)1