Removed old FieldGroup implementation - web legacy module #PL-2306

This commit is contained in:
Yuriy Artamonov 2013-10-28 09:49:10 +00:00
parent e4a87aa18d
commit 6943289dda
3 changed files with 11 additions and 13 deletions

View File

@ -11,7 +11,7 @@ import com.vaadin.terminal.gwt.client.UIDL;
* @author artamonov * @author artamonov
* @version $Id$ * @version $Id$
*/ */
public class VFieldGroupComposition extends VGroupBox { public class VFieldGroup extends VGroupBox {
public static final String FIELDGROUP_CLASSNAME = "fieldgroup"; public static final String FIELDGROUP_CLASSNAME = "fieldgroup";

View File

@ -14,9 +14,7 @@ import com.haulmont.cuba.gui.data.CollectionDatasource;
import com.haulmont.cuba.gui.data.Datasource; import com.haulmont.cuba.gui.data.Datasource;
import com.haulmont.cuba.gui.data.DsContext; import com.haulmont.cuba.gui.data.DsContext;
import com.haulmont.cuba.web.gui.WebWindow; import com.haulmont.cuba.web.gui.WebWindow;
import com.haulmont.cuba.web.toolkit.ui.FieldGroupComposition; import com.haulmont.cuba.web.toolkit.ui.*;
import com.haulmont.cuba.web.toolkit.ui.FieldGroupLayout;
import com.haulmont.cuba.web.toolkit.ui.FieldWrapper;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.dom4j.Element; import org.dom4j.Element;
@ -29,7 +27,7 @@ import java.util.*;
*/ */
public class WebFieldGroup public class WebFieldGroup
extends extends
WebAbstractComponent<FieldGroupComposition> WebAbstractComponent<com.haulmont.cuba.web.toolkit.ui.FieldGroup>
implements implements
com.haulmont.cuba.gui.components.FieldGroup { com.haulmont.cuba.gui.components.FieldGroup {
@ -53,7 +51,7 @@ public class WebFieldGroup
protected Messages messages = AppBeans.get(Messages.class); protected Messages messages = AppBeans.get(Messages.class);
public WebFieldGroup() { public WebFieldGroup() {
component = new FieldGroupComposition() { component = new com.haulmont.cuba.web.toolkit.ui.FieldGroup() {
@Override @Override
public void addField(Object propertyId, com.vaadin.ui.Field field) { public void addField(Object propertyId, com.vaadin.ui.Field field) {
FieldConfig fieldConf = WebFieldGroup.this.getField(propertyId.toString()); FieldConfig fieldConf = WebFieldGroup.this.getField(propertyId.toString());
@ -172,9 +170,9 @@ public class WebFieldGroup
if (!fieldConfig.isCustom()) { if (!fieldConfig.isCustom()) {
throw new IllegalStateException(String.format("Field '%s' must be defined as custom", fieldConfig.getId())); throw new IllegalStateException(String.format("Field '%s' must be defined as custom", fieldConfig.getId()));
} }
component.addCustomField(fieldConfig.getId(), new FieldGroupComposition.CustomFieldGenerator() { component.addCustomField(fieldConfig.getId(), new com.haulmont.cuba.web.toolkit.ui.FieldGroup.CustomFieldGenerator() {
@Override @Override
public com.vaadin.ui.Field generateField(Object propertyId, FieldGroupComposition component) { public com.vaadin.ui.Field generateField(Object propertyId, com.haulmont.cuba.web.toolkit.ui.FieldGroup component) {
Datasource fieldDatasource; Datasource fieldDatasource;
if (fieldConfig.getDatasource() != null) { if (fieldConfig.getDatasource() != null) {
fieldDatasource = fieldConfig.getDatasource(); fieldDatasource = fieldConfig.getDatasource();

View File

@ -5,7 +5,7 @@
package com.haulmont.cuba.web.toolkit.ui; package com.haulmont.cuba.web.toolkit.ui;
import com.haulmont.cuba.toolkit.gwt.client.ui.VFieldGroupComposition; import com.haulmont.cuba.toolkit.gwt.client.ui.VFieldGroup;
import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.PaintTarget; import com.vaadin.terminal.PaintTarget;
import com.vaadin.ui.*; import com.vaadin.ui.*;
@ -18,8 +18,8 @@ import java.util.Map;
* @author artamonov * @author artamonov
* @version $Id$ * @version $Id$
*/ */
@ClientWidget(VFieldGroupComposition.class) @ClientWidget(VFieldGroup.class)
public class FieldGroupComposition extends GroupBox { public class FieldGroup extends GroupBox {
protected int currentX = 0; protected int currentX = 0;
protected int currentY = 0; protected int currentY = 0;
@ -28,7 +28,7 @@ public class FieldGroupComposition extends GroupBox {
protected Map<Object, Field> fields = new HashMap<>(); protected Map<Object, Field> fields = new HashMap<>();
public FieldGroupComposition() { public FieldGroup() {
super(new FieldGroupLayout()); super(new FieldGroupLayout());
setSizeUndefined(); setSizeUndefined();
@ -164,6 +164,6 @@ public class FieldGroupComposition extends GroupBox {
} }
public interface CustomFieldGenerator extends Serializable { public interface CustomFieldGenerator extends Serializable {
com.vaadin.ui.Field generateField(Object propertyId, FieldGroupComposition component); com.vaadin.ui.Field generateField(Object propertyId, FieldGroup component);
} }
} }