All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javax.faces.component.ValueHolder Maven / Gradle / Ivy

There is a newer version: 4.1.1
Show newest version
/*
 * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v. 2.0, which is available at
 * http://www.eclipse.org/legal/epl-2.0.
 *
 * This Source Code may also be made available under the following Secondary
 * Licenses when the conditions for such availability set forth in the
 * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
 * version 2 with the GNU Classpath Exception, which is available at
 * https://www.gnu.org/software/classpath/license.html.
 *
 * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
 */

package javax.faces.component;


import javax.faces.convert.Converter;
import javax.el.ValueExpression;


/**
 * 

ValueHolder is an * interface that may be implemented by any concrete {@link UIComponent} * that wishes to support a local value, as well as access data in the * model tier via a value expression, and support conversion * between String and the model tier data's native data type. */ public interface ValueHolder { // -------------------------------------------------------------- Properties /** *

Return the local value of this {@link UIComponent} (if any), * without evaluating any associated {@link ValueExpression}.

* * @return the local value. */ public Object getLocalValue(); /** *

Gets the value of this {@link UIComponent}. If validation * failed, as indicated by * {@link javax.faces.context.FacesContext#isValidationFailed} * returning true, always return the local value. * Otherwise, first, consult the local value property of this * component. If non-null return it. If * null, see if we have a {@link ValueExpression} for * the value property. If so, return the result of * evaluating the property, otherwise return null. * Note that because the specification for {@link * UIComponent#setValueBinding} requires a call through to {@link * UIComponent#setValueExpression}, legacy tags will continue to * work.

* * @return the value. */ public Object getValue(); /** *

Set the value of this {@link UIComponent} (if any).

* * @param value The new local value */ public void setValue(Object value); /** *

Return the {@link Converter} (if any) * that is registered for this {@link UIComponent}.

* * @return the converter. */ public Converter getConverter(); /** *

Set the {@link Converter} (if any) that is registered for this * {@link UIComponent}.

* * @param converter New {@link Converter} (or null) */ public void setConverter(Converter converter); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy