Moves FocusDelegate to AbstractFieldState.
This change is done to revert backwards compatibiity breaking API
change in 7.7.4 when CustomFieldState was introduced.
Change-Id: I76212a8700463140520d5482b740fe0edbfb082c
import com.vaadin.client.ui.AbstractFieldConnector;
import com.vaadin.client.ui.VCustomField;
import com.vaadin.shared.ui.Connect;
-import com.vaadin.shared.ui.customfield.CustomFieldState;
import com.vaadin.ui.CustomField;
@Connect(value = CustomField.class)
addConnectorHierarchyChangeHandler(this);
}
- @Override
- public CustomFieldState getState() {
- return (CustomFieldState) super.getState();
- }
-
@Override
public VCustomField getWidget() {
return (VCustomField) super.getWidget();
import java.util.Iterator;
import com.vaadin.data.Property;
-import com.vaadin.shared.ui.customfield.CustomFieldState;
/**
* A {@link Field} whose UI content can be constructed by the user, enabling the
private class ComponentIterator
implements Iterator<Component>, Serializable {
- boolean first = (root != null);
+ boolean first = root != null;
@Override
public boolean hasNext() {
return new ComponentIterator();
}
- @Override
- protected CustomFieldState getState() {
- return (CustomFieldState) super.getState();
- }
-
- @Override
- protected CustomFieldState getState(boolean markAsDirty) {
- return (CustomFieldState) super.getState(markAsDirty);
- }
-
/**
* Sets the component to which all methods from the {@link Focusable}
* interface should be delegated.
* <p>
* By default, {@link Focusable} events are handled by the super class and
* ultimately ignored.
- *
+ *
* @param focusDelegate
* the focusable component to which focus events are redirected
*/
public boolean hideErrors = false;
public boolean required = false;
public boolean modified = false;
+
+ /**
+ * The component which should receive focus events instead of the custom
+ * field wrapper.
+ * <p>
+ * This is not used in all fields, but needs to be here for the time being
+ * (#20468).
+ */
+ public Connector focusDelegate;
}
+++ /dev/null
-/*
- * Copyright 2000-2014 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.shared.ui.customfield;
-
-import com.vaadin.shared.AbstractFieldState;
-import com.vaadin.shared.Connector;
-
-public class CustomFieldState extends AbstractFieldState {
-
- /**
- * The component which should receive focus events instead of the custom
- * field wrapper.
- */
- public Connector focusDelegate;
-
-}