Deprecate cuba.web.useNativeButtons in 5.3, remove from 5.4 #PL-4918

This commit is contained in:
Yuriy Artamonov 2015-02-17 08:49:49 +00:00
parent 7e2b7ac779
commit a747b927e4
2 changed files with 2 additions and 18 deletions

View File

@ -73,13 +73,6 @@ public interface WebConfig extends Config {
@DefaultInt(7)
int getMaxTabCount();
/**
* @return Whether to use native HTML buttons
*/
@Property("cuba.web.useNativeButtons")
@DefaultBoolean(false)
boolean getUseNativeButtons();
/**
* @return Request execution time in seconds, after which a message log will be logged.
*/

View File

@ -4,13 +4,9 @@
*/
package com.haulmont.cuba.web.gui.components;
import com.haulmont.cuba.core.global.AppBeans;
import com.haulmont.cuba.core.global.Configuration;
import com.haulmont.cuba.gui.components.Action;
import com.haulmont.cuba.gui.components.Button;
import com.haulmont.cuba.web.WebConfig;
import com.haulmont.cuba.web.toolkit.ui.CubaButton;
import com.vaadin.ui.NativeButton;
import org.apache.commons.lang.StringUtils;
import java.beans.PropertyChangeEvent;
@ -20,7 +16,7 @@ import java.beans.PropertyChangeListener;
* @author abramov
* @version $Id$
*/
public class WebButton extends WebAbstractComponent<com.vaadin.ui.Button> implements Button {
public class WebButton extends WebAbstractComponent<CubaButton> implements Button {
public static final String ICON_STYLE = "icon";
@ -29,12 +25,7 @@ public class WebButton extends WebAbstractComponent<com.vaadin.ui.Button> implem
protected PropertyChangeListener actionPropertyChangeListener;
public WebButton() {
Configuration configuration = AppBeans.get(Configuration.NAME);
if (configuration.getConfig(WebConfig.class).getUseNativeButtons()) {
component = new NativeButton();
} else {
component = new CubaButton();
}
component.addClickListener(new com.vaadin.ui.Button.ClickListener() {
@Override
public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {