File |
Line |
org/apache/myfaces/trinidad/model/ChildPropertyMenuModel.java |
177 |
org/apache/myfaces/trinidad/model/ChildPropertyTreeModel.java |
188 |
enterContainer();
}
_setRowKey(path.get(lastIndex));
}
@SuppressWarnings("unchecked")
@Override
public Object getContainerRowKey(Object childKey)
{
List<Object> path = (List<Object>) childKey;
if ((path == null) || (path.size() <= 1))
return null;
// wrap sublist in a Serializable copy, since sublist usually returns non-Serializable
// instances
return CollectionUtils.newSerializableList(path.subList(0, path.size() - 1));
}
@Override
public int getRowCount()
{
return _getModel().getRowCount();
}
@Override
public Object getRowData()
{
return _getModel().getRowData();
}
@Override
public boolean isRowAvailable()
{
return _getModel().isRowAvailable();
}
@Override
public boolean isContainer()
{
Object rowData = getRowData();
Object value = getChildData(rowData);
if (value != null)
{
if (value instanceof Collection<?>)
{
return !((Collection<?>)value).isEmpty();
}
else if (value.getClass().isArray())
{
return Array.getLength(value) > 0;
}
else if (value instanceof DataModel)
{
return ((DataModel)value).getRowCount() > 0;
}
}
return value != null;
}
@Override
public void enterContainer()
{
Object rowData = getRowData();
if (rowData == null)
throw new IllegalStateException(_LOG.getMessage(
"NULL_ROWDATA"));
Node node = new Node(rowData);
_path.add(node);
}
@Override
public void exitContainer()
{
int sz = _path.size();
if (sz > 1)
_path.remove(sz - 1);
else
throw new IllegalStateException(_LOG.getMessage(
"CANNOT_EXIT_ROOT_CONTAINER"));
}
/**
* Gets the instance being wrapped by this TreeModel.
*/
@Override
public Object getWrappedData()
{
return _wrappedData;
}
/**
* Sets the instance being wrapped by this TreeModel.
* Calling this method sets the path to empty.
*/
@Override
public void setWrappedData(Object data)
{
Node root = _getNode(0);
root.childModel = ModelUtils.toCollectionModel(data);
setRowKey(null);
_wrappedData = data;
}
/**
* Gets the property name used to fetch the children.
*/
public final String getChildProperty()
{
return _childProperty;
}
/**
* Sets the property name used to fetch the children.
*/
public final void setChildProperty(String childProperty)
{
_childProperty = childProperty;
}
@Override
public int getRowIndex()
{
return _getModel().getRowIndex();
}
@Override
public void setRowIndex(int rowIndex)
{
_getModel().setRowIndex(rowIndex);
}
@Override
public boolean isSortable(String property)
{
return _getModel().isSortable(property);
}
@Override
public List<SortCriterion> getSortCriteria()
{
return _getModel().getSortCriteria();
}
@Override
public void setSortCriteria(List<SortCriterion> criteria)
{
_getModel().setSortCriteria(criteria);
}
/**
* Gets the child data for a node. This child data will be
* converted into a CollectionModel by calling
* {@link #createChildModel}.
* @param parentData the node to get the child data from
* @return the List or array that is the child data.
* must return null for a leaf node.
*/
protected Object getChildData(Object parentData)
{
String prop = getChildProperty();
if (prop == null)
return null;
return SortableModel.__resolveProperty(parentData, prop);
}
/**
* Converts childData into a CollectionModel.
* This method calls {@link ModelUtils#toCollectionModel}
* @param childData the data to convert. This can be a List or array.
*/
protected CollectionModel createChildModel(Object childData)
{
CollectionModel model = ModelUtils.toCollectionModel(childData);
model.setRowIndex(-1);
return model;
}
private Object _getRowKey()
{
return _getModel().getRowKey();
}
private void _setRowKey(Object key)
{
_getModel().setRowKey(key);
}
private Node _getCurrentNode()
{
return _getNode(_path.size() - 1);
}
private Node _getNode(int index)
{
return _path.get(index);
}
private CollectionModel _getModel()
{
Node node = _getCurrentNode();
CollectionModel model = node.childModel;
if (model == null)
{
Object value = getChildData(node.parentData);
model = createChildModel(value);
node.childModel = model;
}
return model;
} |
File |
Line |
org/apache/myfaces/trinidad/menu/ImmutableGroupNode.java |
153 |
org/apache/myfaces/trinidad/menu/ImmutableItemNode.java |
196 |
}
public final String getLabel()
{
if (_bundleKey != null && _bundleName != null)
{
// Load the resource bundle based on the locale of the
// current request. If the locale has not changed, this
// method just returns.
MenuUtils.loadBundle(_bundleName, _bundleKey + getHandlerId());
}
if (_label != null && ContainerUtils.isValueReference(_label))
{
// do not set _label to the evaluated EL.
// It may change at times in the EL.
return _evalElStr(_label);
}
if (_label == null && _labelAndAccessKey != null)
{
int ampIdx = 0;
String labelAndAccessKeyEval = null;
String labelAndAccessKey = _labelAndAccessKey;
String label;
if (ContainerUtils.isValueReference(labelAndAccessKey))
{
labelAndAccessKeyEval = _evalElStr(labelAndAccessKey);
} else
{
labelAndAccessKeyEval = labelAndAccessKey;
}
String accessKey;
if (labelAndAccessKeyEval == null ||
(ampIdx = labelAndAccessKeyEval.indexOf('&')) == -1)
{
// String is null or a label w/o an accesskey
label = labelAndAccessKeyEval;
} else if (ampIdx == (labelAndAccessKeyEval.length() - 1))
{
// & is last character, strip it.
label = labelAndAccessKeyEval.substring(0, ampIdx);
} else
{
// We have a string with an accessKey somewhere
char[] keyArray = labelAndAccessKeyEval.toCharArray();
int len = labelAndAccessKeyEval.length();
char[] keyArray2 = new char[len];
int i, j = 0;
boolean accessKeyFound = false;
for (i = 0, j = 0; i < len; i++, j++)
{
if (keyArray[i] == '&')
{
i++;
if (!accessKeyFound && keyArray[i] != '&')
{
// We have our accessKey
accessKey = labelAndAccessKeyEval.substring(i, i + 1);
accessKeyFound = true;
}
}
keyArray2[j] = keyArray[i];
}
String label1 = new String(keyArray2, 0, j);
label = label1;
}
return label;
}
return _label;
}
public final String getIcon()
{
return MenuUtils.evalString(_icon);
}
public final List<MenuNode> getChildren()
{
return _children;
}
public void setChildren(List<MenuNode> children)
{
_children = children;
}
public final String getFocusViewId()
{
return _focusViewId;
}
public final boolean getRendered()
{
boolean rendered = MenuUtils.evalBoolean(_renderedStr, true);
return rendered;
}
public final boolean getDisabled()
{
boolean disabled = MenuUtils.evalBoolean(_disabledStr, false);
return disabled;
}
public final boolean getVisible()
{
boolean visible = MenuUtils.evalBoolean(_visibleStr, true);
return visible;
}
public final boolean getReadOnly()
{
boolean readOnly = MenuUtils.evalBoolean(_readOnlyStr, false);
return readOnly;
}
protected final String getHandlerId()
{
return _handlerId;
}
public final String getBundleKey()
{
return _bundleKey;
}
public final String getBundleName()
{
return _bundleName;
}
public void actionListener(ActionEvent event) |
File |
Line |
org/apache/myfaces/trinidad/bean/util/PropertyArrayMap.java |
55 |
org/apache/myfaces/trinidad/bean/util/PropertyHashMap.java |
59 |
super();
}
@Override
public Object put(
PropertyKey key,
Object value)
{
Object retValue = super.put(key, value);
if (_createDeltas())
{
if ( key.getMutable().isAtLeastSometimesMutable() || !_equals(value, retValue))
_deltas.put(key, value);
}
else if (key.getMutable().isAtLeastSometimesMutable() && !(value instanceof ValueExpression))
{
_getMutableTracker(true).addProperty(key);
}
if (key.isPartialStateHolder())
{
_getPartialStateHolderTracker(true).addProperty(key);
}
return retValue;
}
@Override
public Object remove(
Object key)
{
boolean useDeltas = _createDeltas();
if (useDeltas)
{
if (!super.containsKey(key))
return null;
// If this key is contained, it certainly must be a PropertyKey!
assert(key instanceof PropertyKey);
_deltas.put((PropertyKey) key, null);
}
if (key instanceof PropertyKey)
{
PropertyKey propKey = (PropertyKey)key;
if (propKey.isPartialStateHolder())
{
_getPartialStateHolderTracker(true).removeProperty(propKey);
}
if (!useDeltas && propKey.getMutable().isAtLeastSometimesMutable())
{
PropertyTracker mutableTracker = _getMutableTracker(false);
if (mutableTracker != null)
mutableTracker.removeProperty(propKey);
}
}
return super.remove(key);
}
@Override
public void putAll(Map<? extends PropertyKey, ? extends Object> t)
{
boolean useDeltas =_createDeltas();
if (useDeltas)
_deltas.putAll(t);
Set<? extends PropertyKey> keys = t.keySet();
for (PropertyKey key: keys)
{
if (key.isPartialStateHolder())
{
_getPartialStateHolderTracker(true).addProperty(key);
}
if (!useDeltas && key.getMutable().isAtLeastSometimesMutable())
{
Object value = t.get(key);
if (!(value instanceof ValueExpression))
{
_getMutableTracker(true).addProperty(key);
}
}
}
super.putAll(t);
}
public Object saveState(FacesContext context)
{
if (_initialStateMarked)
{
if (_deltas == null) |
File |
Line |
org/apache/myfaces/trinidad/bean/util/PropertyArrayMap.java |
195 |
org/apache/myfaces/trinidad/bean/util/PropertyHashMap.java |
244 |
}
public boolean getUseStateHolder()
{
return _useStateHolder;
}
public void setUseStateHolder(boolean useStateHolder)
{
_useStateHolder = useStateHolder;
}
// =-=AEW CLEAR?
public void markInitialState()
{
_initialStateMarked = true;
// PropertyTracker uses a bitmask to track properties
// We are tracking all properties that have CA_PARTIAL_STATE_HOLDER capability,
// so that we do not have to check every property here
PropertyTracker tracker = _getPartialStateHolderTracker(false);
if (tracker != null)
{
for (PropertyKey key: tracker)
{
Object val = get(key);
if (val != null)
{
((PartialStateHolder)val).markInitialState();
}
}
}
}
public void clearInitialState()
{
_initialStateMarked = false;
_deltas = null;
// PropertyTracker uses a bitmask to track properties
// We are tracking all properties that have CA_PARTIAL_STATE_HOLDER capability,
// so that we do not have to check every property here
PropertyTracker tracker = _getPartialStateHolderTracker(false);
if (tracker != null)
{
for (PropertyKey key: tracker)
{
Object val = get(key);
if (val != null)
{
((PartialStateHolder)val).clearInitialState();
}
}
}
}
public boolean initialStateMarked()
{
return _initialStateMarked;
}
/**
* Sets the the FacesBean type used by this map's owner bean
* @param type FacesBean type
*/
public void setType(FacesBean.Type type)
{
_type = type;
}
private boolean _createDeltas()
{
if (_initialStateMarked)
{
if (_deltas == null)
{
_deltas = createDeltaPropertyMap();
}
return true;
}
return false;
}
static private boolean _equals(Object a, Object b)
{
if (a == b)
return true;
if (a == null)
return false;
return a.equals(b);
}
private PropertyTracker _getPartialStateHolderTracker(boolean create)
{
if (_tracker == null && create)
{
if (_type == null)
{
throw new IllegalStateException("FacesBean.TYPE is required to track properties");
}
_tracker = new PropertyTracker(_type);
}
return _tracker;
}
private PropertyTracker _getMutableTracker(boolean create)
{
if (_mutableTracker == null && create)
{
if (_type == null)
{
throw new IllegalStateException("FacesBean.TYPE is required to track properties");
}
_mutableTracker = new PropertyTracker(_type);
}
return _mutableTracker;
}
private transient boolean _initialStateMarked;
private transient PropertyMap _deltas;
private boolean _useStateHolder;
private transient FacesBean.Type _type; |
File |
Line |
org/apache/myfaces/trinidad/menu/ImmutableGroupNode.java |
444 |
org/apache/myfaces/trinidad/menu/ImmutableItemNode.java |
529 |
}
public final boolean getDefaultFocusPath()
{
boolean defaultFocusPath =
MenuUtils.evalBoolean(_defaultFocusPathStr, false);
return defaultFocusPath;
}
public final String getRootModelKey()
{
return _rootModelKey;
}
public final int getRootId()
{
return _rootId;
}
private String _evalElStr(String str)
{
if (str == null)
return null;
String keystr =
MenuUtils.stringReplaceFirst(str.trim(), _bundleKey, _bundleKey +
getHandlerId());
String elVal = MenuUtils.getBoundValue(keystr, String.class);
return elVal;
}
private String _joinLabelAndAccessKey(String label, String accessKey)
{
char[] keyArray = label.toCharArray();
int len = label.length();
int lentimes2 = len * 2;
char[] keyArray2 = new char[lentimes2];
int i, j = 0;
boolean accessKeyFound = false;
// find the first occurrence of a single Ampersand
for (i = 0, j = 0; i < len; i++, j++)
{
// AccessKey
if (keyArray[i] == accessKey.charAt(0) && !accessKeyFound)
{
keyArray2[j] = '&';
j++;
accessKeyFound = true;
}
keyArray2[j] = keyArray[i];
// Ampersand as regular character
// double it up.
if (keyArray[i] == '&')
{
j++;
keyArray2[j] = keyArray[i];
}
}
String combinedLabel = new String(keyArray2, 0, j);
return combinedLabel;
}
private final String _icon;
private List<MenuNode> _children = null;
private final String _focusViewId;
private final String _renderedStr;
private final String _disabledStr;
private final String _visibleStr;
private final String _readOnlyStr;
private final String _handlerId;
private final String _bundleKey;
private final String _bundleName;
private final String _accessKey;
private final String _id;
private final String _modelId;
private final String _labelAndAccessKey;
private final String _defaultFocusPathStr;
private final String _uniqueId;
// Root Menu model's Request Map Key
private final String _rootModelKey;
private final int _rootId;
private final Map<String, String> _customPropList; |
File |
Line |
org/apache/myfaces/trinidad/menu/ImmutableGroupNode.java |
287 |
org/apache/myfaces/trinidad/menu/ImmutableItemNode.java |
373 |
}
public final char getAccessKey()
{
if (_accessKey == null && _labelAndAccessKey != null)
{
int ampIdx = 0;
String labelAndAccessKeyEval = null;
String labelAndAccessKey = _labelAndAccessKey;
String label;
if (ContainerUtils.isValueReference(labelAndAccessKey))
{
labelAndAccessKeyEval = _evalElStr(labelAndAccessKey);
}
else
{
labelAndAccessKeyEval = labelAndAccessKey;
}
String accessKey = null;
if (labelAndAccessKeyEval == null ||
(ampIdx = labelAndAccessKeyEval.indexOf('&')) == -1)
{
// String is null or a label w/o an accesskey
label = labelAndAccessKeyEval;
} else if (ampIdx == (labelAndAccessKeyEval.length() - 1))
{
// & is last character, strip it.
label = labelAndAccessKeyEval.substring(0, ampIdx);
} else
{
// We have a string with an accessKey somewhere
char[] keyArray = labelAndAccessKeyEval.toCharArray();
int len = labelAndAccessKeyEval.length();
char[] keyArray2 = new char[len];
int i, j = 0;
boolean accessKeyFound = false;
for (i = 0, j = 0; i < len; i++, j++)
{
if (keyArray[i] == '&')
{
i++;
if (!accessKeyFound && keyArray[i] != '&')
{
// We have our accessKey
accessKey = labelAndAccessKeyEval.substring(i, i + 1);
accessKeyFound = true;
}
}
keyArray2[j] = keyArray[i];
}
String label1 = new String(keyArray2, 0, j);
label = label1;
}
return (accessKey != null)? accessKey.charAt(0):'\0';
}
else
{
String accessKeyStr = MenuUtils.evalString(_accessKey);
if (accessKeyStr == null || accessKeyStr.length() > 1)
return '\0';
return accessKeyStr.charAt(0);
}
}
public final String getId() |
File |
Line |
org/apache/myfaces/trinidad/validator/DoubleRangeValidator.java |
569 |
org/apache/myfaces/trinidad/validator/LongRangeValidator.java |
573 |
return Long.parseLong(value.toString());
}
}
private FacesMessage _getNotInRangeMessage(
FacesContext context,
UIComponent component,
Object value,
Object min,
Object max)
{
Object msg = _getRawNotInRangeMessageDetail();
Object label = ValidatorUtils.getComponentLabel(component);
Object[] params = {label, value, min, max};
return MessageFactory.getMessage(context, NOT_IN_RANGE_MESSAGE_ID,
msg, params, component);
}
private Object _getRawNotInRangeMessageDetail()
{
return _facesBean.getRawProperty(_NOT_IN_RANGE_MESSAGE_DETAIL_KEY);
}
private FacesMessage _getMaximumMessage(
FacesContext context,
UIComponent component,
Object value,
Object max)
{
Object msg = _getRawMaximumMessageDetail();
Object label = ValidatorUtils.getComponentLabel(component);
Object[] params = {label, value, max};
return MessageFactory.getMessage(context,
MAXIMUM_MESSAGE_ID,
msg,
params,
component);
}
private Object _getRawMaximumMessageDetail()
{
return _facesBean.getRawProperty(_MAXIMUM_MESSAGE_DETAIL_KEY);
}
private FacesMessage _getMinimumMessage(
FacesContext context,
UIComponent component,
Object value,
Object min)
{
Object msg = _getRawMinimumMessageDetail();
Object label = ValidatorUtils.getComponentLabel(component);
Object[] params = {label, value, min};
return MessageFactory.getMessage(context, MINIMUM_MESSAGE_ID,
msg, params, component);
}
private Object _getRawMinimumMessageDetail()
{
return _facesBean.getRawProperty(_MINIMUM_MESSAGE_DETAIL_KEY);
}
private static final FacesBean.Type _TYPE = new FacesBean.Type();
private static final PropertyKey _MINIMUM_KEY =
_TYPE.registerKey("minimum", Long.class, |
File |
Line |
org/apache/myfaces/trinidad/menu/ImmutableGroupNode.java |
364 |
org/apache/myfaces/trinidad/menu/ImmutableItemNode.java |
462 |
if (_labelAndAccessKey != null)
{
int ampIdx = 0;
String labelAndAccessKeyEval = null;
String labelAndAccessKey = _labelAndAccessKey;
String label;
if (_bundleKey != null && _bundleName != null)
{
// Load the resource bundle based on the locale of the
// current request. If the locale has not changed, this
// method just returns.
MenuUtils.loadBundle(_bundleName, _bundleKey + getHandlerId());
}
if (ContainerUtils.isValueReference(labelAndAccessKey))
{
labelAndAccessKeyEval = _evalElStr(labelAndAccessKey);
} else
{
labelAndAccessKeyEval = labelAndAccessKey;
}
String accessKey = null;
if (labelAndAccessKeyEval == null ||
(ampIdx = labelAndAccessKeyEval.indexOf('&')) == -1)
{
// String is null or a label w/o an accesskey
label = labelAndAccessKeyEval;
} else if (ampIdx == (labelAndAccessKeyEval.length() - 1))
{
// & is last character, strip it.
label = labelAndAccessKeyEval.substring(0, ampIdx);
} else
{
// We have a string with an accessKey somewhere
char[] keyArray = labelAndAccessKeyEval.toCharArray();
int len = labelAndAccessKeyEval.length();
char[] keyArray2 = new char[len];
int i, j = 0;
boolean accessKeyFound = false;
for (i = 0, j = 0; i < len; i++, j++)
{
if (keyArray[i] == '&')
{
i++;
if (!accessKeyFound && keyArray[i] != '&')
{
// We have our accessKey
accessKey = labelAndAccessKeyEval.substring(i, i + 1);
accessKeyFound = true;
}
}
keyArray2[j] = keyArray[i];
}
String label1 = new String(keyArray2, 0, j);
label = label1;
}
// https://issues.apache.org/jira/browse/TRINIDAD-1588
if (accessKey == null) { |
File |
Line |
org/apache/myfaces/trinidad/validator/DateTimeRangeValidator.java |
205 |
org/apache/myfaces/trinidad/validator/LongRangeValidator.java |
176 |
_facesBean.setProperty(_MINIMUM_KEY, Long.valueOf(minimum));
}
/**
* <p>Custom error message to be used, for creating detail part of the
* {@link FacesMessage}, when input value exceeds the maximum value set.</p>
* Overrides detail message identified by message id {@link #MAXIMUM_MESSAGE_ID}
* @param maximumMessageDetail Custom error message.
*/
public void setMessageDetailMaximum(String maximumMessageDetail)
{
_facesBean.setProperty(_MAXIMUM_MESSAGE_DETAIL_KEY, maximumMessageDetail);
}
/**
* <p>Return custom detail error message that was set for creating {@link FacesMessage},
* for cases where input value exceeds the <code>maximum</code> value set.</p>
* @return Custom error message.
* @see #setMessageDetailMaximum(String)
*/
@JSFProperty
public String getMessageDetailMaximum()
{
Object maxMsgDet = _facesBean.getProperty(_MAXIMUM_MESSAGE_DETAIL_KEY);
return ComponentUtils.resolveString(maxMsgDet);
}
/**
* <p>Custom error message to be used, for creating detail part of the
* {@link FacesMessage}, when input value is less the set
* <code>minimum</code> value.</p>
* Overrides detail message identified by message id {@link #MINIMUM_MESSAGE_ID}
* @param minimumMessageDetail Custom error message.
*/
public void setMessageDetailMinimum(String minimumMessageDetail)
{
_facesBean.setProperty(_MINIMUM_MESSAGE_DETAIL_KEY, minimumMessageDetail);
}
/**
* <p>Return custom detail error message that was set for creating {@link FacesMessage},
* for cases where, input value is less than the <code>minimum</code> value set.</p>
* @return Custom error message.
* @see #setMessageDetailMinimum(String)
*/
@JSFProperty
public String getMessageDetailMinimum()
{
Object minMsgDet = _facesBean.getProperty(_MINIMUM_MESSAGE_DETAIL_KEY);
return ComponentUtils.resolveString(minMsgDet);
}
/**
* <p>Custom error message to be used, for creating detail part of the
* {@link FacesMessage}, when input value is not with in the range,
* when <code>minimum</code> and <code>maximum</code> is set.</p>
* Overrides detail message identified by message id {@link #NOT_IN_RANGE_MESSAGE_ID}
* @param notInRangeMessageDetail Custom error message.
*/
public void setMessageDetailNotInRange(String notInRangeMessageDetail)
{
_facesBean.setProperty(_NOT_IN_RANGE_MESSAGE_DETAIL_KEY, notInRangeMessageDetail);
}
/**
* <p>Return custom detail error message that was set for creating {@link FacesMessage},
* for cases where, input value exceeds the <code>maximum</code> value and is
* less than the <code>minimum</code> value set.</p>
* @return Custom error message.
* @see #setMessageDetailNotInRange(String)
*/
@JSFProperty
public String getMessageDetailNotInRange()
{
Object notInRngMsg = _facesBean.getProperty(_NOT_IN_RANGE_MESSAGE_DETAIL_KEY);
return ComponentUtils.resolveString(notInRngMsg);
}
/**
* <p>Custom hint maximum message.</p>
* Overrides default hint message
* @param hintMaximum Custom hint message.
*/
public void setHintMaximum(String hintMaximum)
{
_facesBean.setProperty(_HINT_MAXIMUM_KEY, hintMaximum);
}
/**
* <p>Return custom hint maximum message.</p>
* @return Custom hint message.
* @see #setHintMaximum(String)
*/
@JSFProperty(tagExcluded=true)
public String getHintMaximum()
{
Object obj = _facesBean.getProperty(_HINT_MAXIMUM_KEY);
return ComponentUtils.resolveString(obj);
}
/**
* <p>Custom hint minimum message.</p>
* Overrides default hint message
* @param hintMinimum Custom hint message.
*/
public void setHintMinimum(String hintMinimum)
{
_facesBean.setProperty(_HINT_MINIMUM_KEY, hintMinimum);
}
/**
* <p>Return custom hint minimum message.</p>
* @return Custom hint message.
* @see #setHintMinimum(String)
*/
@JSFProperty(tagExcluded=true)
public String getHintMinimum()
{
Object obj = _facesBean.getProperty(_HINT_MINIMUM_KEY);
return ComponentUtils.resolveString(obj);
}
/**
* <p>Custom hint notInRange message.</p>
* Overrides default hint message
* @param hintNotInRange Custom hint message.
*/
public void setHintNotInRange(String hintNotInRange)
{
_facesBean.setProperty(_HINT_NOT_IN_RANGE, hintNotInRange);
} |
File |
Line |
org/apache/myfaces/trinidad/model/ChildPropertyMenuModel.java |
120 |
org/apache/myfaces/trinidad/model/ChildPropertyTreeModel.java |
121 |
public ChildPropertyTreeModel()
{
Node root = new Node(null);
_path.add(root);
}
/**
* Gets the rowKey of the current row.
*/
@Override
public Object getRowKey()
{
final int sz = _path.size() - 1;
Object lastRowkey = _getRowKey();
if ((sz == 0) && (lastRowkey == null))
return null; // root collection
// have to clone the path here. otherwise, we have to say that
// this tree model cannot be mutated while accessing the path
// returned by this method.
List<Object> path = new ArrayList<Object>(sz+1);
if (sz > 0)
{
for(int i=0; i<sz; i++)
{
Node node = _getNode(i);
path.add(node.childModel.getRowKey());
}
}
path.add(lastRowkey);
return path;
}
/**
* Selects a new current row. The row that matches the given rowKey
* is made current.
* @param rowKey use null to access the root collection
*/
@SuppressWarnings("unchecked")
@Override
public void setRowKey(Object rowKey)
{
Node root = _getNode(0);
_path.clear();
_path.add(root);
List<Object> path = (List<Object>) rowKey;
if ((path == null) || (path.size() == 0))
{
setRowIndex(-1);
return;
}
int lastIndex = path.size() - 1;
for(int i=0; i<lastIndex; i++)
{
Object pathKey = path.get(i);
_setRowKey(pathKey); |
File |
Line |
org/apache/myfaces/trinidad/menu/ImmutableGroupNode.java |
301 |
org/apache/myfaces/trinidad/menu/ImmutableItemNode.java |
475 |
if (ContainerUtils.isValueReference(labelAndAccessKey))
{
labelAndAccessKeyEval = _evalElStr(labelAndAccessKey);
} else
{
labelAndAccessKeyEval = labelAndAccessKey;
}
String accessKey = null;
if (labelAndAccessKeyEval == null ||
(ampIdx = labelAndAccessKeyEval.indexOf('&')) == -1)
{
// String is null or a label w/o an accesskey
label = labelAndAccessKeyEval;
} else if (ampIdx == (labelAndAccessKeyEval.length() - 1))
{
// & is last character, strip it.
label = labelAndAccessKeyEval.substring(0, ampIdx);
} else
{
// We have a string with an accessKey somewhere
char[] keyArray = labelAndAccessKeyEval.toCharArray();
int len = labelAndAccessKeyEval.length();
char[] keyArray2 = new char[len];
int i, j = 0;
boolean accessKeyFound = false;
for (i = 0, j = 0; i < len; i++, j++)
{
if (keyArray[i] == '&')
{
i++;
if (!accessKeyFound && keyArray[i] != '&')
{
// We have our accessKey
accessKey = labelAndAccessKeyEval.substring(i, i + 1);
accessKeyFound = true;
}
}
keyArray2[j] = keyArray[i];
}
String label1 = new String(keyArray2, 0, j);
label = label1;
} |
File |
Line |
org/apache/myfaces/trinidad/validator/DoubleRangeValidator.java |
366 |
org/apache/myfaces/trinidad/validator/LongRangeValidator.java |
368 |
_getMinimumMessage(context, component, value, IntegerUtils.getString(min)));
}
}
}
catch (NumberFormatException nfe)
{
FacesMessage msg = _getNotCorrectType(context);
throw new ValidatorException(msg);
}
}
// StateHolder Methods
@Override
public Object saveState(FacesContext context)
{
return _facesBean.saveState(context);
}
@Override
public void restoreState(FacesContext context, Object state)
{
_facesBean.restoreState(context, state);
}
/**
* <p>Set the {@link ValueExpression} used to calculate the value for the
* specified attribute if any.</p>
*
* @param name Name of the attribute for which to set a {@link ValueExpression}
* @param expression The {@link ValueExpression} to set, or <code>null</code>
* to remove any currently set {@link ValueExpression}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this converter
*/
public void setValueExpression(String name, ValueExpression expression)
{
ValidatorUtils.setValueExpression(_facesBean, name, expression) ;
}
/**
* <p>Return the {@link ValueExpression} used to calculate the value for the
* specified attribute name, if any.</p>
*
* @param name Name of the attribute or property for which to retrieve a
* {@link ValueExpression}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this converter
*/
public ValueExpression getValueExpression(String name)
{
return ValidatorUtils.getValueExpression(_facesBean, name);
}
/**
* <p>Set the {@link ValueBinding} used to calculate the value for the
* specified attribute if any.</p>
*
* @param name Name of the attribute for which to set a {@link ValueBinding}
* @param binding The {@link ValueBinding} to set, or <code>null</code>
* to remove any currently set {@link ValueBinding}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this validator
* @deprecated
*/
public void setValueBinding(String name, ValueBinding binding)
{
ValidatorUtils.setValueBinding(_facesBean, name, binding) ;
}
/**
* <p>Return the {@link ValueBinding} used to calculate the value for the
* specified attribute name, if any.</p>
*
* @param name Name of the attribute or property for which to retrieve a
* {@link ValueBinding}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this validator
* @deprecated
*/
public ValueBinding getValueBinding(String name)
{
return ValidatorUtils.getValueBinding(_facesBean, name);
}
@JSFProperty(istransient=true, tagExcluded=true)
@Override
public boolean isTransient()
{
return (_transientValue);
}
@Override
public void setTransient(boolean transientValue)
{
_transientValue = transientValue;
}
@Override
public boolean equals(Object otherObj)
{
if (!(otherObj instanceof LongRangeValidator)) |
File |
Line |
org/apache/myfaces/trinidad/validator/DoubleRangeValidator.java |
173 |
org/apache/myfaces/trinidad/validator/LongRangeValidator.java |
176 |
_facesBean.setProperty(_MINIMUM_KEY, Long.valueOf(minimum));
}
/**
* <p>Custom error message to be used, for creating detail part of the
* {@link FacesMessage}, when input value exceeds the maximum value set.</p>
* Overrides detail message identified by message id {@link #MAXIMUM_MESSAGE_ID}
* @param maximumMessageDetail Custom error message.
*/
public void setMessageDetailMaximum(String maximumMessageDetail)
{
_facesBean.setProperty(_MAXIMUM_MESSAGE_DETAIL_KEY, maximumMessageDetail);
}
/**
* <p>Return custom detail error message that was set for creating {@link FacesMessage},
* for cases where input value exceeds the <code>maximum</code> value set.</p>
* @return Custom error message.
* @see #setMessageDetailMaximum(String)
*/
@JSFProperty
public String getMessageDetailMaximum()
{
Object maxMsgDet = _facesBean.getProperty(_MAXIMUM_MESSAGE_DETAIL_KEY);
return ComponentUtils.resolveString(maxMsgDet);
}
/**
* <p>Custom error message to be used, for creating detail part of the
* {@link FacesMessage}, when input value is less the set
* <code>minimum</code> value.</p>
* Overrides detail message identified by message id {@link #MINIMUM_MESSAGE_ID}
* @param minimumMessageDetail Custom error message.
*/
public void setMessageDetailMinimum(String minimumMessageDetail)
{
_facesBean.setProperty(_MINIMUM_MESSAGE_DETAIL_KEY, minimumMessageDetail);
}
/**
* <p>Return custom detail error message that was set for creating {@link FacesMessage},
* for cases where, input value is less than the <code>minimum</code> value set.</p>
* @return Custom error message.
* @see #setMessageDetailMinimum(String)
*/
@JSFProperty
public String getMessageDetailMinimum()
{
Object minMsgDet = _facesBean.getProperty(_MINIMUM_MESSAGE_DETAIL_KEY);
return ComponentUtils.resolveString(minMsgDet);
}
/**
* <p>Custom error message to be used, for creating detail part of the
* {@link FacesMessage}, when input value is not with in the range,
* when <code>minimum</code> and <code>maximum</code> is set.</p>
* Overrides detail message identified by message id {@link #NOT_IN_RANGE_MESSAGE_ID}
* @param notInRangeMessageDetail Custom error message.
*/
public void setMessageDetailNotInRange(String notInRangeMessageDetail)
{
_facesBean.setProperty(_NOT_IN_RANGE_MESSAGE_DETAIL_KEY, notInRangeMessageDetail);
}
/**
* <p>Return custom detail error message that was set for creating {@link FacesMessage},
* for cases where, input value exceeds the <code>maximum</code> value and is
* less than the <code>minimum</code> value set.</p>
* @return Custom error message.
* @see #setMessageDetailNotInRange(String)
*/
@JSFProperty
public String getMessageDetailNotInRange()
{
Object notInRngMsg = _facesBean.getProperty(_NOT_IN_RANGE_MESSAGE_DETAIL_KEY);
return ComponentUtils.resolveString(notInRngMsg);
}
/**
* <p>Custom hint maximum message.</p>
* Overrides default hint message
* @param hintMaximum Custom hint message.
*/
public void setHintMaximum(String hintMaximum)
{
_facesBean.setProperty(_HINT_MAXIMUM_KEY, hintMaximum);
}
/**
* <p>Return custom hint maximum message.</p>
* @return Custom hint message.
* @see #setHintMaximum(String)
*/
@JSFProperty(tagExcluded=true)
public String getHintMaximum()
{
Object obj = _facesBean.getProperty(_HINT_MAXIMUM_KEY);
return ComponentUtils.resolveString(obj);
} |
File |
Line |
org/apache/myfaces/trinidad/menu/ImmutableGroupNode.java |
186 |
org/apache/myfaces/trinidad/menu/ImmutableGroupNode.java |
311 |
if (labelAndAccessKeyEval == null ||
(ampIdx = labelAndAccessKeyEval.indexOf('&')) == -1)
{
// String is null or a label w/o an accesskey
label = labelAndAccessKeyEval;
} else if (ampIdx == (labelAndAccessKeyEval.length() - 1))
{
// & is last character, strip it.
label = labelAndAccessKeyEval.substring(0, ampIdx);
} else
{
// We have a string with an accessKey somewhere
char[] keyArray = labelAndAccessKeyEval.toCharArray();
int len = labelAndAccessKeyEval.length();
char[] keyArray2 = new char[len];
int i, j = 0;
boolean accessKeyFound = false;
for (i = 0, j = 0; i < len; i++, j++)
{
if (keyArray[i] == '&')
{
i++;
if (!accessKeyFound && keyArray[i] != '&')
{
// We have our accessKey
accessKey = labelAndAccessKeyEval.substring(i, i + 1);
accessKeyFound = true;
}
}
keyArray2[j] = keyArray[i];
}
String label1 = new String(keyArray2, 0, j);
label = label1;
}
return (accessKey != null)? accessKey.charAt(0):'\0'; |
File |
Line |
org/apache/myfaces/trinidad/menu/ImmutableGroupNode.java |
386 |
org/apache/myfaces/trinidad/menu/ImmutableItemNode.java |
229 |
if (labelAndAccessKeyEval == null ||
(ampIdx = labelAndAccessKeyEval.indexOf('&')) == -1)
{
// String is null or a label w/o an accesskey
label = labelAndAccessKeyEval;
} else if (ampIdx == (labelAndAccessKeyEval.length() - 1))
{
// & is last character, strip it.
label = labelAndAccessKeyEval.substring(0, ampIdx);
} else
{
// We have a string with an accessKey somewhere
char[] keyArray = labelAndAccessKeyEval.toCharArray();
int len = labelAndAccessKeyEval.length();
char[] keyArray2 = new char[len];
int i, j = 0;
boolean accessKeyFound = false;
for (i = 0, j = 0; i < len; i++, j++)
{
if (keyArray[i] == '&')
{
i++;
if (!accessKeyFound && keyArray[i] != '&')
{
// We have our accessKey
accessKey = labelAndAccessKeyEval.substring(i, i + 1);
accessKeyFound = true;
}
}
keyArray2[j] = keyArray[i];
}
String label1 = new String(keyArray2, 0, j);
label = label1;
} |
File |
Line |
org/apache/myfaces/trinidad/validator/DoubleRangeValidator.java |
374 |
org/apache/myfaces/trinidad/validator/LengthValidator.java |
429 |
}
}
// StateHolder Methods
@Override
public Object saveState(FacesContext context)
{
return _facesBean.saveState(context);
}
@Override
public void restoreState(FacesContext context, Object state)
{
_facesBean.restoreState(context, state);
}
/**
* <p>Set the {@link ValueExpression} used to calculate the value for the
* specified attribute if any.</p>
*
* @param name Name of the attribute for which to set a {@link ValueExpression}
* @param expression The {@link ValueExpression} to set, or <code>null</code>
* to remove any currently set {@link ValueExpression}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this converter
*/
public void setValueExpression(String name, ValueExpression expression)
{
ValidatorUtils.setValueExpression(_facesBean, name, expression) ;
}
/**
* <p>Return the {@link ValueExpression} used to calculate the value for the
* specified attribute name, if any.</p>
*
* @param name Name of the attribute or property for which to retrieve a
* {@link ValueExpression}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this converter
*/
public ValueExpression getValueExpression(String name)
{
return ValidatorUtils.getValueExpression(_facesBean, name);
}
/**
* <p>Set the {@link ValueBinding} used to calculate the value for the
* specified attribute if any.</p>
*
* @param name Name of the attribute for which to set a {@link ValueBinding}
* @param binding The {@link ValueBinding} to set, or <code>null</code>
* to remove any currently set {@link ValueBinding}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this validator
* @deprecated
*/
public void setValueBinding(String name, ValueBinding binding)
{
ValidatorUtils.setValueBinding(_facesBean, name, binding) ;
}
/**
* <p>Return the {@link ValueBinding} used to calculate the value for the
* specified attribute name, if any.</p>
*
* @param name Name of the attribute or property for which to retrieve a
* {@link ValueBinding}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this validator
* @deprecated
*/
public ValueBinding getValueBinding(String name)
{
return ValidatorUtils.getValueBinding(_facesBean, name);
}
@JSFProperty(istransient=true, tagExcluded=true)
@Override
public boolean isTransient()
{
return (_transientValue);
}
@Override
public void setTransient(boolean transientValue)
{
_transientValue = transientValue;
}
@Override
public boolean equals(Object otherObj)
{
if (!(otherObj instanceof LengthValidator)) |
File |
Line |
org/apache/myfaces/trinidad/validator/DateTimeRangeValidator.java |
205 |
org/apache/myfaces/trinidad/validator/DoubleRangeValidator.java |
173 |
_facesBean.setProperty(_MINIMUM_KEY, Double.valueOf(minimum));
}
/**
* <p>Custom error message to be used, for creating detail part of the
* {@link FacesMessage}, when input value exceeds the maximum value set.</p>
* Overrides detail message identified by message id {@link #MAXIMUM_MESSAGE_ID}
* @param maximumMessageDetail Custom error message.
*/
public void setMessageDetailMaximum(String maximumMessageDetail)
{
_facesBean.setProperty(_MAXIMUM_MESSAGE_DETAIL_KEY, maximumMessageDetail);
}
/**
* <p>Return custom detail error message that was set for creating {@link FacesMessage},
* for cases where input value exceeds the <code>maximum</code> value set.</p>
* @return Custom error message.
* @see #setMessageDetailMaximum(String)
*/
@JSFProperty
public String getMessageDetailMaximum()
{
Object maxMsgDet = _facesBean.getProperty(_MAXIMUM_MESSAGE_DETAIL_KEY);
return ComponentUtils.resolveString(maxMsgDet);
}
/**
* <p>Custom error message to be used, for creating detail part of the
* {@link FacesMessage}, when input value is less the set
* <code>minimum</code> value.</p>
* Overrides detail message identified by message id {@link #MINIMUM_MESSAGE_ID}
* @param minimumMessageDetail Custom error message.
*/
public void setMessageDetailMinimum(String minimumMessageDetail)
{
_facesBean.setProperty(_MINIMUM_MESSAGE_DETAIL_KEY, minimumMessageDetail);
}
/**
* <p>Return custom detail error message that was set for creating {@link FacesMessage},
* for cases where, input value is less than the <code>minimum</code> value set.</p>
* @return Custom error message.
* @see #setMessageDetailMinimum(String)
*/
@JSFProperty
public String getMessageDetailMinimum()
{
Object minMsgDet = _facesBean.getProperty(_MINIMUM_MESSAGE_DETAIL_KEY);
return ComponentUtils.resolveString(minMsgDet);
}
/**
* <p>Custom error message to be used, for creating detail part of the
* {@link FacesMessage}, when input value is not with in the range,
* when <code>minimum</code> and <code>maximum</code> is set.</p>
* Overrides detail message identified by message id {@link #NOT_IN_RANGE_MESSAGE_ID}
* @param notInRangeMessageDetail Custom error message.
*/
public void setMessageDetailNotInRange(String notInRangeMessageDetail)
{
_facesBean.setProperty(_NOT_IN_RANGE_MESSAGE_DETAIL_KEY, notInRangeMessageDetail);
}
/**
* <p>Return custom detail error message that was set for creating {@link FacesMessage},
* for cases where, input value exceeds the <code>maximum</code> value and is
* less than the <code>minimum</code> value set.</p>
* @return Custom error message.
* @see #setMessageDetailNotInRange(String)
*/
@JSFProperty
public String getMessageDetailNotInRange()
{
Object notInRngMsg = _facesBean.getProperty(_NOT_IN_RANGE_MESSAGE_DETAIL_KEY);
return ComponentUtils.resolveString(notInRngMsg);
}
/**
* <p>Custom hint maximum message.</p>
* Overrides default hint message
* @param hintMaximum Custom hint message.
*/
public void setHintMaximum(String hintMaximum)
{
_facesBean.setProperty(_HINT_MAXIMUM_KEY, hintMaximum);
}
/**
* <p>Return custom hint maximum message.</p>
* @return Custom hint message.
* @see #setHintMaximum(String)
*/
@JSFProperty(tagExcluded=true)
public String getHintMaximum()
{
Object obj = _facesBean.getProperty(_HINT_MAXIMUM_KEY);
return ComponentUtils.resolveString(obj);
} |
File |
Line |
org/apache/myfaces/trinidad/validator/DoubleRangeValidator.java |
593 |
org/apache/myfaces/trinidad/validator/LengthValidator.java |
649 |
return _facesBean.getRawProperty(_EXACT_MESSAGE_DETAIL_KEY);
}
private FacesMessage _getMaximumMessage(
FacesContext context,
UIComponent component,
Object value,
Object max)
{
Object msg = _getRawMaximumMessageDetail();
Object label = ValidatorUtils.getComponentLabel(component);
Object[] params = {label, value, max};
return MessageFactory.getMessage(context,
MAXIMUM_MESSAGE_ID,
msg,
params,
component);
}
private Object _getRawMaximumMessageDetail()
{
return _facesBean.getRawProperty(_MAXIMUM_MESSAGE_DETAIL_KEY);
}
private FacesMessage _getMinimumMessage(
FacesContext context,
UIComponent component,
Object value,
Object min)
{
Object msg = _getRawMinimumMessageDetail();
Object label = ValidatorUtils.getComponentLabel(component);
Object[] params = {label, value, min};
return MessageFactory.getMessage(context, MINIMUM_MESSAGE_ID,
msg, params, component);
}
private Object _getRawMinimumMessageDetail()
{
return _facesBean.getRawProperty(_MINIMUM_MESSAGE_DETAIL_KEY);
}
private static final FacesBean.Type _TYPE = new FacesBean.Type();
// Default is false
private static final PropertyKey _DISABLED_KEY = |
File |
Line |
org/apache/myfaces/trinidad/convert/ConverterUtils.java |
48 |
org/apache/myfaces/trinidad/validator/ValidatorUtils.java |
63 |
}
static FacesBean getFacesBean(final FacesBean.Type type)
{
FacesBeanImpl bean = new FacesBeanImpl()
{
@Override
public FacesBean.Type getType()
{
return type;
}
};
return bean;
}
static void setValueExpression(FacesBean bean, String name, ValueExpression expression)
{
PropertyKey key = _getPropertyKey(bean, name, true);
bean.setValueExpression(key, expression);
}
static ValueExpression getValueExpression(FacesBean bean, String name)
{
PropertyKey key = _getPropertyKey(bean, name, true);
return bean.getValueExpression(key);
}
static void setValueBinding(FacesBean bean, String name, ValueBinding binding)
{
PropertyKey key = _getPropertyKey(bean, name, true);
bean.setValueBinding(key, binding);
}
static ValueBinding getValueBinding(FacesBean bean, String name)
{
PropertyKey key = _getPropertyKey(bean, name, true);
return bean.getValueBinding(key);
} |
File |
Line |
org/apache/myfaces/trinidad/menu/GroupNode.java |
114 |
org/apache/myfaces/trinidad/menu/ImmutableGroupNode.java |
87 |
List<MenuNode> children = getChildren();
// Traverse the list. Do the following:
// o get Node from Model's hashMap of nodes and ids
// o check attributes (rendered, disabled, readOnly)
// o if they are ok, return the node
for (int i=0; i < Array.getLength(idrefList); i++)
{
Iterator<MenuNode> childIter = children.iterator();
// All node "id" attribute values had the node's
// system hashcode id appended to the id when
// placed in the model's idNodeMap.
//
// Each id in the idreflist of a group node does
// NOT have this node sys id appended it to it
// and needs to or we won't find the group's
// ref node.
//
// Since group nodes can only point to one of
// its children, we iterate through them, get
// their sys id and append it to idref until
// we find a match (or not).
while (childIter.hasNext())
{
MenuNode childNode = childIter.next();
String modelId = childNode.getModelId();
// Need to append mode's sys id here to create a
// unique id.
String refNodeId = idrefList[i] + modelId;
refNode = (MenuNode) getRootModel().getNode(refNodeId);
// if nothing found, move on to the next child
if (refNode != null)
break;
}
if (refNode == null)
continue;
// Check the attributes of the found node
if ( !refNode.getRendered()
|| refNode.getDisabled()
|| refNode.getReadOnly()
|| !refNode.getVisible()
)
{
refNode = null;
continue;
}
// Ok, we have a valid RefNode
break;
}
// If no valid node is found,
// log an error
if (refNode == null)
{
_LOG.severe("GroupNode " + getLabel() + " refers to no valid node.\n");
return null;
}
return refNode;
}
public final String getLabel() |
File |
Line |
org/apache/myfaces/trinidad/menu/ImmutableGroupNode.java |
491 |
org/apache/myfaces/trinidad/menu/MenuNode.java |
778 |
}
/**
* _joinLabelAndAccessKey - takes a string label and string accessKey
* and combines them into a single labelAndAccessKey string.
*
* @param label - String with node's label.
* @param accessKey - One character String which is the label's accessKey.
* @return
*/
private String _joinLabelAndAccessKey(String label, String accessKey)
{
char[] keyArray = label.toCharArray();
int len = label.length();
int lentimes2 = len*2;
char[] keyArray2 = new char[lentimes2];
int i, j = 0;
boolean accessKeyFound = false;
// find the first occurrence of a single Ampersand
for (i=0, j=0; i < len; i++, j++)
{
// AccessKey
if ( keyArray[i] == accessKey.charAt(0)
&& !accessKeyFound
)
{
keyArray2[j] = '&';
j++;
accessKeyFound = true;
}
keyArray2[j] = keyArray[i];
// Ampersand as regular character
// double it up.
if (keyArray[i] == '&')
{
j++;
keyArray2[j] = keyArray[i];
}
}
String combinedLabel = new String(keyArray2, 0, j);
return combinedLabel;
}
/**
* _splitLabelAndAccessKey - takes a string containing a label
* and an accessKey and breaks separates it and sets the label
* and the accessKey separately.
*
* @param labelAndAccessKey - String holding both a label and
* accessKey.
*/
private void _splitLabelAndAccessKey(String labelAndAccessKey) |
File |
Line |
org/apache/myfaces/trinidad/validator/LengthValidator.java |
567 |
org/apache/myfaces/trinidad/validator/LongRangeValidator.java |
511 |
result = 37 * result + Long.valueOf(getMaximum()).hashCode();
result = 37 * result + ( maxMsgDet == null ? 0 : maxMsgDet.hashCode());
result = 37 * result + ( minMsgDet == null ? 0 : minMsgDet.hashCode());
result = 37 * result + ( notInRangeMsgDet == null ? 0 : notInRangeMsgDet.hashCode());
return result;
}
/**
* Return whether it is disabled.
* @return true if it's disabled and false if it's enabled.
*/
public void setDisabled(boolean isDisabled)
{
_facesBean.setProperty(_DISABLED_KEY, Boolean.valueOf(isDisabled));
}
/**
* Return whether it is disabled.
* @return true if it's disabled and false if it's enabled.
*/
public boolean isDisabled()
{
Boolean disabled = (Boolean) _facesBean.getProperty(_DISABLED_KEY);
return (disabled != null) ? disabled.booleanValue() : false;
}
protected boolean isMaximumSet()
{
return _facesBean.getProperty(_MAXIMUM_KEY) != null;
}
protected boolean isMinimumSet()
{
return _facesBean.getProperty(_MINIMUM_KEY) != null;
}
private FacesMessage _getNotCorrectType( |
File |
Line |
org/apache/myfaces/trinidad/validator/DateTimeRangeValidator.java |
280 |
org/apache/myfaces/trinidad/validator/LengthValidator.java |
279 |
return ComponentUtils.resolveString(msg);
}
/**
* <p>Custom hint maximum message.</p>
* Overrides default hint message
* @param hintMaximum Custom hint message.
*/
public void setHintMaximum(String hintMaximum)
{
_facesBean.setProperty(_HINT_MAXIMUM_KEY, hintMaximum);
}
/**
* <p>Return custom hint maximum message.</p>
* @return Custom hint message.
* @see #setHintMaximum(String)
*/
@JSFProperty(tagExcluded=true)
public String getHintMaximum()
{
Object obj = _facesBean.getProperty(_HINT_MAXIMUM_KEY);
return ComponentUtils.resolveString(obj);
}
/**
* <p>Custom hint minimum message.</p>
* Overrides default hint message
* @param hintMinimum Custom hint message.
*/
public void setHintMinimum(String hintMinimum)
{
_facesBean.setProperty(_HINT_MINIMUM_KEY, hintMinimum);
}
/**
* <p>Return custom hint minimum message.</p>
* @return Custom hint message.
* @see #setHintMinimum(String)
*/
@JSFProperty(tagExcluded=true)
public String getHintMinimum()
{
Object obj = _facesBean.getProperty(_HINT_MINIMUM_KEY);
return ComponentUtils.resolveString(obj);
}
/**
* <p>Custom hint notInRange message.</p>
* Overrides default hint message
* @param hintNotInRange Custom hint message.
*/
public void setHintNotInRange(String hintNotInRange)
{
_facesBean.setProperty(_HINT_NOT_IN_RANGE, hintNotInRange);
}
/**
* <p>Return custom hint notInRange message.</p>
* @return Custom hint message.
* @see #setHintNotInRange
*/
@JSFProperty(tagExcluded=true)
public String getHintNotInRange()
{
Object obj = _facesBean.getProperty(_HINT_NOT_IN_RANGE);
return ComponentUtils.resolveString(obj);
}
/**
* <p>Custom hint exact message.</p>
* Overrides default hint message
* @param hintExact Custom hint message.
*/
public void setHintExact(String hintExact) |
File |
Line |
org/apache/myfaces/trinidad/component/UIXCollection.java |
1832 |
org/apache/myfaces/trinidad/model/CollectionModelDecorator.java |
123 |
return getCollectionModel().isRowLocallyAvailable(rowKey);
}
public int getEstimatedRowCount()
{
return getCollectionModel().getEstimatedRowCount();
}
public LocalRowKeyIndex.Confidence getEstimatedRowCountConfidence()
{
return getCollectionModel().getEstimatedRowCountConfidence();
}
/**
* clear all rows from the local cache
*/
public void clearLocalCache()
{
getCollectionModel().clearLocalCache();
}
/**
* Clear the requested range of rows from the local cache
* @param startingIndex starting row index for the range to clear
* @param rowsToClear number of rows to clear from the cache
*/
public void clearCachedRows(int startingIndex, int rowsToClear)
{
getCollectionModel().clearCachedRows(startingIndex, rowsToClear);
}
/**
* Clear the requested range of rows from the local cache
* @param startingRowKey starting row key for the range to clear
* @param rowsToClear number of rows to clear from the cache
*/
public void clearCachedRows(Object startingRowKey, int rowsToClear)
{
getCollectionModel().clearCachedRows(startingRowKey, rowsToClear);
}
/**
* Clear a row from the local cache by row index
* @param index row index for the row to clear from the cache
*/
public void clearCachedRow(int index)
{
getCollectionModel().clearCachedRow(index);
}
/**
* Clear a row from the local cache by row key
* @param rowKey row key for the row to clear from the cache
*/
public void clearCachedRow(Object rowKey)
{
getCollectionModel().clearCachedRow(rowKey);
}
/**
* Indicates the caching strategy supported by the model
* @see LocalCachingStrategy
* @return caching strategy supported by the model
*/
public LocalRowKeyIndex.LocalCachingStrategy getCachingStrategy()
{
return getCollectionModel().getCachingStrategy();
}
//
// below are the DataModel public APIs
//
public boolean isRowAvailable() |
File |
Line |
org/apache/myfaces/trinidad/validator/DoubleRangeValidator.java |
651 |
org/apache/myfaces/trinidad/validator/LongRangeValidator.java |
655 |
Long.valueOf(Long.MAX_VALUE));
private static final PropertyKey _MAXIMUM_MESSAGE_DETAIL_KEY =
_TYPE.registerKey("messageDetailMaximum", String.class);
private static final PropertyKey _MINIMUM_MESSAGE_DETAIL_KEY =
_TYPE.registerKey("messageDetailMinimum", String.class);
private static final PropertyKey _NOT_IN_RANGE_MESSAGE_DETAIL_KEY =
_TYPE.registerKey("messageDetailNotInRange", String.class);
private static final PropertyKey _HINT_MAXIMUM_KEY =
_TYPE.registerKey("hintMaximum", String.class);
private static final PropertyKey _HINT_MINIMUM_KEY =
_TYPE.registerKey("hintMinimum", String.class);
private static final PropertyKey _HINT_NOT_IN_RANGE =
_TYPE.registerKey("hintNotInRange", String.class);
// Default is false
private static final PropertyKey _DISABLED_KEY =
_TYPE.registerKey("disabled", Boolean.class, Boolean.FALSE);
private FacesBean _facesBean = ValidatorUtils.getFacesBean(_TYPE);
private boolean _transientValue = false;
} |
File |
Line |
org/apache/myfaces/trinidad/validator/DoubleRangeValidator.java |
173 |
org/apache/myfaces/trinidad/validator/LengthValidator.java |
176 |
_facesBean.setProperty(_MINIMUM_KEY, Integer.valueOf(minimum));
}
/**
* <p>Custom error message to be used, for creating detail part of the
* {@link FacesMessage}, when input length exceeds the maximum length set.</p>
* Overrides detail message identified by message id {@link #MAXIMUM_MESSAGE_ID}
* @param maximumMessageDetail Custom error message.
*/
public void setMessageDetailMaximum(String maximumMessageDetail)
{
_facesBean.setProperty(_MAXIMUM_MESSAGE_DETAIL_KEY, maximumMessageDetail);
}
/**
* <p>Return custom detail error message that was set for creating {@link FacesMessage},
* for cases where input length exceeds the <code>maximum</code> length set.</p>
* @return Custom error message.
* @see #setMessageDetailMaximum(String)
*/
@JSFProperty
public String getMessageDetailMaximum()
{
Object maxMsgDet = _facesBean.getProperty(_MAXIMUM_MESSAGE_DETAIL_KEY);
return ComponentUtils.resolveString(maxMsgDet);
}
/**
* <p>Custom error message to be used, for creating detail part of the
* {@link FacesMessage}, when input length is less the set
* <code>minimum</code> length.</p>
* Overrides detail message identified by message id {@link #MINIMUM_MESSAGE_ID}
* @param minimumMessageDetail Custom error message.
*/
public void setMessageDetailMinimum(String minimumMessageDetail)
{
_facesBean.setProperty(_MINIMUM_MESSAGE_DETAIL_KEY, minimumMessageDetail);
}
/**
* <p>Return custom detail error message that was set for creating {@link FacesMessage},
* for cases where, input length is less than the <code>minimum</code> length set.</p>
* @return Custom error message.
* @see #setMessageDetailMinimum(String)
*/
@JSFProperty
public String getMessageDetailMinimum()
{
Object minMsgDet = _facesBean.getProperty(_MINIMUM_MESSAGE_DETAIL_KEY);
return ComponentUtils.resolveString(minMsgDet);
}
/**
* <p>Custom error message to be used, for creating detail part of the
* {@link FacesMessage}, when input length is not with in the range,
* when <code>minimum</code> and <code>maximum</code> is set.</p>
* Overrides detail message identified by message id {@link #NOT_IN_RANGE_MESSAGE_ID}
* @param notInRangeMessageDetail Custom error message.
*/
public void setMessageDetailNotInRange(String notInRangeMessageDetail)
{
_facesBean.setProperty(_NOT_IN_RANGE_MESSAGE_DETAIL_KEY, notInRangeMessageDetail);
}
/**
* <p>Return custom detail error message that was set for creating {@link FacesMessage},
* for cases where, input length exceeds the <code>maximum</code> length and is
* less than the <code>minimum</code> length set.</p>
* @return Custom error message.
* @see #setMessageDetailNotInRange(String)
*/
@JSFProperty
public String getMessageDetailNotInRange()
{
Object notInRngMsg = _facesBean.getProperty(_NOT_IN_RANGE_MESSAGE_DETAIL_KEY);
return ComponentUtils.resolveString(notInRngMsg);
}
/**
* <p>Custom error message to be used, for creating detail part of the
* {@link FacesMessage},
* for cases where the maximum and minimum lengths are the same, and
* the input length does not match.
* Overrides detail message identified by message id {@link #EXACT_MESSAGE_ID}
* @param exactMessageDetail Custom error message.
*/
public void setMessageDetailExact(String exactMessageDetail) |
File |
Line |
org/apache/myfaces/trinidad/validator/DateTimeRangeValidator.java |
707 |
org/apache/myfaces/trinidad/validator/DoubleRangeValidator.java |
651 |
Double.valueOf(Double.MAX_VALUE));
private static final PropertyKey _MAXIMUM_MESSAGE_DETAIL_KEY =
_TYPE.registerKey("messageDetailMaximum", String.class);
private static final PropertyKey _MINIMUM_MESSAGE_DETAIL_KEY =
_TYPE.registerKey("messageDetailMinimum", String.class);
private static final PropertyKey _NOT_IN_RANGE_MESSAGE_DETAIL_KEY =
_TYPE.registerKey("messageDetailNotInRange", String.class);
private static final PropertyKey _HINT_MAXIMUM_KEY =
_TYPE.registerKey("hintMaximum", String.class);
private static final PropertyKey _HINT_MINIMUM_KEY =
_TYPE.registerKey("hintMinimum", String.class);
private static final PropertyKey _HINT_NOT_IN_RANGE =
_TYPE.registerKey("hintNotInRange", String.class);
// Default is false
private static final PropertyKey _DISABLED_KEY =
_TYPE.registerKey("disabled", Boolean.class, Boolean.FALSE);
private FacesBean _facesBean = ValidatorUtils.getFacesBean(_TYPE);
private boolean _transientValue = false; |
File |
Line |
org/apache/myfaces/trinidad/validator/DateTimeRangeValidator.java |
205 |
org/apache/myfaces/trinidad/validator/LengthValidator.java |
176 |
_facesBean.setProperty(_MINIMUM_KEY, Integer.valueOf(minimum));
}
/**
* <p>Custom error message to be used, for creating detail part of the
* {@link FacesMessage}, when input length exceeds the maximum length set.</p>
* Overrides detail message identified by message id {@link #MAXIMUM_MESSAGE_ID}
* @param maximumMessageDetail Custom error message.
*/
public void setMessageDetailMaximum(String maximumMessageDetail)
{
_facesBean.setProperty(_MAXIMUM_MESSAGE_DETAIL_KEY, maximumMessageDetail);
}
/**
* <p>Return custom detail error message that was set for creating {@link FacesMessage},
* for cases where input length exceeds the <code>maximum</code> length set.</p>
* @return Custom error message.
* @see #setMessageDetailMaximum(String)
*/
@JSFProperty
public String getMessageDetailMaximum()
{
Object maxMsgDet = _facesBean.getProperty(_MAXIMUM_MESSAGE_DETAIL_KEY);
return ComponentUtils.resolveString(maxMsgDet);
}
/**
* <p>Custom error message to be used, for creating detail part of the
* {@link FacesMessage}, when input length is less the set
* <code>minimum</code> length.</p>
* Overrides detail message identified by message id {@link #MINIMUM_MESSAGE_ID}
* @param minimumMessageDetail Custom error message.
*/
public void setMessageDetailMinimum(String minimumMessageDetail)
{
_facesBean.setProperty(_MINIMUM_MESSAGE_DETAIL_KEY, minimumMessageDetail);
}
/**
* <p>Return custom detail error message that was set for creating {@link FacesMessage},
* for cases where, input length is less than the <code>minimum</code> length set.</p>
* @return Custom error message.
* @see #setMessageDetailMinimum(String)
*/
@JSFProperty
public String getMessageDetailMinimum()
{
Object minMsgDet = _facesBean.getProperty(_MINIMUM_MESSAGE_DETAIL_KEY);
return ComponentUtils.resolveString(minMsgDet);
}
/**
* <p>Custom error message to be used, for creating detail part of the
* {@link FacesMessage}, when input length is not with in the range,
* when <code>minimum</code> and <code>maximum</code> is set.</p>
* Overrides detail message identified by message id {@link #NOT_IN_RANGE_MESSAGE_ID}
* @param notInRangeMessageDetail Custom error message.
*/
public void setMessageDetailNotInRange(String notInRangeMessageDetail)
{
_facesBean.setProperty(_NOT_IN_RANGE_MESSAGE_DETAIL_KEY, notInRangeMessageDetail);
}
/**
* <p>Return custom detail error message that was set for creating {@link FacesMessage},
* for cases where, input length exceeds the <code>maximum</code> length and is
* less than the <code>minimum</code> length set.</p>
* @return Custom error message.
* @see #setMessageDetailNotInRange(String)
*/
@JSFProperty
public String getMessageDetailNotInRange()
{
Object notInRngMsg = _facesBean.getProperty(_NOT_IN_RANGE_MESSAGE_DETAIL_KEY);
return ComponentUtils.resolveString(notInRngMsg);
}
/**
* <p>Custom error message to be used, for creating detail part of the
* {@link FacesMessage},
* for cases where the maximum and minimum lengths are the same, and
* the input length does not match.
* Overrides detail message identified by message id {@link #EXACT_MESSAGE_ID}
* @param exactMessageDetail Custom error message.
*/
public void setMessageDetailExact(String exactMessageDetail) |
File |
Line |
org/apache/myfaces/trinidad/validator/DateTimeRangeValidator.java |
403 |
org/apache/myfaces/trinidad/validator/RegExpValidator.java |
171 |
}
public Object saveState(FacesContext context)
{
return _facesBean.saveState(context);
}
public void restoreState(FacesContext context, Object state)
{
_facesBean.restoreState(context, state);
}
/**
* <p>Set the {@link ValueExpression} used to calculate the value for the
* specified attribute if any.</p>
*
* @param name Name of the attribute for which to set a {@link ValueExpression}
* @param expression The {@link ValueExpression} to set, or <code>null</code>
* to remove any currently set {@link ValueExpression}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this converter
*/
public void setValueExpression(String name, ValueExpression expression)
{
ValidatorUtils.setValueExpression(_facesBean, name, expression) ;
}
/**
* <p>Return the {@link ValueExpression} used to calculate the value for the
* specified attribute name, if any.</p>
*
* @param name Name of the attribute or property for which to retrieve a
* {@link ValueExpression}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this converter
*/
public ValueExpression getValueExpression(String name)
{
return ValidatorUtils.getValueExpression(_facesBean, name);
}
/**
* <p>Set the {@link ValueBinding} used to calculate the value for the
* specified attribute if any.</p>
*
* @param name Name of the attribute for which to set a {@link ValueBinding}
* @param binding The {@link ValueBinding} to set, or <code>null</code>
* to remove any currently set {@link ValueBinding}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this validator
* @deprecated
*/
public void setValueBinding(String name, ValueBinding binding)
{
ValidatorUtils.setValueBinding(_facesBean, name, binding) ;
}
/**
* <p>Return the {@link ValueBinding} used to calculate the value for the
* specified attribute name, if any.</p>
*
* @param name Name of the attribute or property for which to retrieve a
* {@link ValueBinding}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this validator
* @deprecated
*/
public ValueBinding getValueBinding(String name)
{
return ValidatorUtils.getValueBinding(_facesBean, name);
}
/**
* <p>Compares this PatternValidator with the specified Object for
* equality.</p>
* @param object Object to which this PatternValidator is to be compared.
* @return true if and only if the specified Object is a PatternValidator
* and if the values pattern and transient are equal.
*/
@Override
public boolean equals(Object object) |
File |
Line |
org/apache/myfaces/trinidad/validator/DoubleRangeValidator.java |
510 |
org/apache/myfaces/trinidad/validator/LongRangeValidator.java |
514 |
result = 37 * result + ( notInRangeMsgDet == null ? 0 : notInRangeMsgDet.hashCode());
return result;
}
/**
* Return whether it is disabled.
* @return true if it's disabled and false if it's enabled.
*/
public void setDisabled(boolean isDisabled)
{
_facesBean.setProperty(_DISABLED_KEY, Boolean.valueOf(isDisabled));
}
/**
* Return whether it is disabled.
* @return true if it's disabled and false if it's enabled.
*/
public boolean isDisabled()
{
Boolean disabled = (Boolean) _facesBean.getProperty(_DISABLED_KEY);
return (disabled != null) ? disabled.booleanValue() : false;
}
protected boolean isMaximumSet()
{
return _facesBean.getProperty(_MAXIMUM_KEY) != null;
}
protected boolean isMinimumSet()
{
return _facesBean.getProperty(_MINIMUM_KEY) != null;
}
private FacesMessage _getNotCorrectType(
FacesContext context)
{
return MessageFactory.getMessage(context, CONVERT_MESSAGE_ID);
}
/**
* Try to call longValue() from java.lang.Number. Since not all
* "number" implement java.lang.Number, we try to call string
* and parse the String representation of the "number". If that fails
* we aren't working with a number so we throw a NumberFormatException
*
* @param value the number value
* @return parsed number value
* @throws NumberFormatException if the value is not a number
*/
private long _convertValueToLong(Object value) throws NumberFormatException |
File |
Line |
org/apache/myfaces/trinidad/menu/ImmutableGroupNode.java |
45 |
org/apache/myfaces/trinidad/menu/ImmutableItemNode.java |
49 |
public ImmutableItemNode(ItemNode node)
{
_icon = node.getIconProperty();
_focusViewId = node.getFocusViewIdProperty();
_renderedStr = node.getRenderedProperty();
_disabledStr = node.getDisabledProperty();
_visibleStr = node.getVisibleProperty();
_readOnlyStr = node.getReadOnlyProperty();
_handlerId = node.getHandlerIdProperty();
_bundleKey = node.getBundleKeyProperty();
_bundleName = node.getBundleNameProperty();
_accessKey = node.getAccessKeyProperty();
_id = node.getIdProperty();
_modelId = node.getModelIdProperty();
_uniqueId = node.getUniqueIdProperty();
_labelAndAccessKey = node.getLabelAndAccessKeyProperty();
_defaultFocusPathStr = node.getDefaultFocusPathProperty();
// Root Menu model's Request Map Key
_rootModelKey = node.getRootModelKeyProperty();
_rootId = node.getRootIdProperty(); |
File |
Line |
org/apache/myfaces/trinidad/validator/DoubleRangeValidator.java |
485 |
org/apache/myfaces/trinidad/validator/LongRangeValidator.java |
488 |
LongRangeValidator other = (LongRangeValidator) otherObj;
return ((this.getMaximum() == other.getMaximum())
&& (this.getMinimum() == other.getMinimum())
&& (this.isMaximumSet() == other.isMaximumSet())
&& (this.isMinimumSet() == other.isMinimumSet())
&& (this.isDisabled() == other.isDisabled())
&& (this.isTransient() == other.isTransient()));
}
@Override
public int hashCode()
{
int result = 17;
Object maxMsgDet = getMessageDetailMaximum();
Object minMsgDet = getMessageDetailMinimum();
Object notInRangeMsgDet = getMessageDetailNotInRange();
result = 37 * result + (isDisabled() ? 1 : 0); |
File |
Line |
org/apache/myfaces/trinidad/convert/ConverterUtils.java |
85 |
org/apache/myfaces/trinidad/validator/ValidatorUtils.java |
104 |
return ( o1 == o2 || (o1 != null && o1.equals(o2)));
}
private static PropertyKey _getPropertyKey(
FacesBean bean,
String name,
boolean isStrict)
{
_assertNotNull(name, "attribute cannot be null");
FacesBean.Type type = bean.getType();
PropertyKey key = type.findKey(name);
if (isStrict && key == null)
throw new IllegalArgumentException(_LOG.getMessage(
"INVALID_ATTRIBUTE_NAME", name));
else
return key;
}
private static void _assertNotNull(Object object, String message)
{
if (object == null)
{
if (message == null)
throw new NullPointerException();
else
throw new NullPointerException(message);
}
}
private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger( |
File |
Line |
org/apache/myfaces/trinidad/validator/DoubleRangeValidator.java |
510 |
org/apache/myfaces/trinidad/validator/LengthValidator.java |
570 |
result = 37 * result + ( notInRangeMsgDet == null ? 0 : notInRangeMsgDet.hashCode());
return result;
}
/**
* Return whether it is disabled.
* @return true if it's disabled and false if it's enabled.
*/
public void setDisabled(boolean isDisabled)
{
_facesBean.setProperty(_DISABLED_KEY, Boolean.valueOf(isDisabled));
}
/**
* Return whether it is disabled.
* @return true if it's disabled and false if it's enabled.
*/
public boolean isDisabled()
{
Boolean disabled = (Boolean) _facesBean.getProperty(_DISABLED_KEY);
return (disabled != null) ? disabled.booleanValue() : false;
}
protected boolean isMaximumSet()
{
return _facesBean.getProperty(_MAXIMUM_KEY) != null;
}
protected boolean isMinimumSet()
{
return _facesBean.getProperty(_MINIMUM_KEY) != null;
}
private FacesMessage _getNotInRangeMessage( |
File |
Line |
org/apache/myfaces/trinidad/validator/ByteLengthValidator.java |
280 |
org/apache/myfaces/trinidad/validator/RegExpValidator.java |
181 |
}
/**
* <p>Set the {@link ValueExpression} used to calculate the value for the
* specified attribute if any.</p>
*
* @param name Name of the attribute for which to set a {@link ValueExpression}
* @param expression The {@link ValueExpression} to set, or <code>null</code>
* to remove any currently set {@link ValueExpression}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this converter
*/
public void setValueExpression(String name, ValueExpression expression)
{
ValidatorUtils.setValueExpression(_facesBean, name, expression) ;
}
/**
* <p>Return the {@link ValueExpression} used to calculate the value for the
* specified attribute name, if any.</p>
*
* @param name Name of the attribute or property for which to retrieve a
* {@link ValueExpression}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this converter
*/
public ValueExpression getValueExpression(String name)
{
return ValidatorUtils.getValueExpression(_facesBean, name);
}
/**
* <p>Set the {@link ValueBinding} used to calculate the value for the
* specified attribute if any.</p>
*
* @param name Name of the attribute for which to set a {@link ValueBinding}
* @param binding The {@link ValueBinding} to set, or <code>null</code>
* to remove any currently set {@link ValueBinding}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this validator
* @deprecated
*/
public void setValueBinding(String name, ValueBinding binding)
{
ValidatorUtils.setValueBinding(_facesBean, name, binding) ;
}
/**
* <p>Return the {@link ValueBinding} used to calculate the value for the
* specified attribute name, if any.</p>
*
* @param name Name of the attribute or property for which to retrieve a
* {@link ValueBinding}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this validator
* @deprecated
*/
public ValueBinding getValueBinding(String name)
{
return ValidatorUtils.getValueBinding(_facesBean, name);
}
/**
* <p>Compares this PatternValidator with the specified Object for
* equality.</p>
* @param object Object to which this PatternValidator is to be compared.
* @return true if and only if the specified Object is a PatternValidator
* and if the values pattern and transient are equal.
*/
@Override
public boolean equals(Object object)
{
if (this == object)
return true;
if ( object instanceof RegExpValidator ) |
File |
Line |
org/apache/myfaces/trinidad/validator/DateTimeRangeValidator.java |
415 |
org/apache/myfaces/trinidad/validator/LengthValidator.java |
441 |
public void restoreState(FacesContext context, Object state)
{
_facesBean.restoreState(context, state);
}
/**
* <p>Set the {@link ValueExpression} used to calculate the value for the
* specified attribute if any.</p>
*
* @param name Name of the attribute for which to set a {@link ValueExpression}
* @param expression The {@link ValueExpression} to set, or <code>null</code>
* to remove any currently set {@link ValueExpression}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this converter
*/
public void setValueExpression(String name, ValueExpression expression)
{
ValidatorUtils.setValueExpression(_facesBean, name, expression) ;
}
/**
* <p>Return the {@link ValueExpression} used to calculate the value for the
* specified attribute name, if any.</p>
*
* @param name Name of the attribute or property for which to retrieve a
* {@link ValueExpression}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this converter
*/
public ValueExpression getValueExpression(String name)
{
return ValidatorUtils.getValueExpression(_facesBean, name);
}
/**
* <p>Set the {@link ValueBinding} used to calculate the value for the
* specified attribute if any.</p>
*
* @param name Name of the attribute for which to set a {@link ValueBinding}
* @param binding The {@link ValueBinding} to set, or <code>null</code>
* to remove any currently set {@link ValueBinding}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this validator
* @deprecated
*/
public void setValueBinding(String name, ValueBinding binding)
{
ValidatorUtils.setValueBinding(_facesBean, name, binding) ;
}
/**
* <p>Return the {@link ValueBinding} used to calculate the value for the
* specified attribute name, if any.</p>
*
* @param name Name of the attribute or property for which to retrieve a
* {@link ValueBinding}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this validator
* @deprecated
*/
public ValueBinding getValueBinding(String name)
{
return ValidatorUtils.getValueBinding(_facesBean, name);
}
@JSFProperty(istransient=true, tagExcluded=true) |
File |
Line |
org/apache/myfaces/trinidad/convert/ColorConverter.java |
424 |
org/apache/myfaces/trinidad/convert/DateTimeConverter.java |
1010 |
public void restoreState(FacesContext context, Object state)
{
_facesBean.restoreState(context, state);
}
/**
* <p>Set the {@link ValueExpression} used to calculate the value for the
* specified attribute if any.</p>
*
* @param name Name of the attribute for which to set a {@link ValueExpression}
* @param expression The {@link ValueExpression} to set, or <code>null</code>
* to remove any currently set {@link ValueExpression}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this converter
*/
public void setValueExpression(String name, ValueExpression expression)
{
ConverterUtils.setValueExpression(_facesBean, name, expression) ;
}
/**
* <p>Return the {@link ValueExpression} used to calculate the value for the
* specified attribute name, if any.</p>
*
* @param name Name of the attribute or property for which to retrieve a
* {@link ValueExpression}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this converter
*/
public ValueExpression getValueExpression(String name)
{
return ConverterUtils.getValueExpression(_facesBean, name);
}
/**
* <p>Set the {@link ValueBinding} used to calculate the value for the
* specified attribute if any.</p>
*
* @param name Name of the attribute for which to set a {@link ValueBinding}
* @param binding The {@link ValueBinding} to set, or <code>null</code>
* to remove any currently set {@link ValueBinding}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this converter
* @deprecated
*/
public void setValueBinding(String name, ValueBinding binding)
{
ConverterUtils.setValueBinding(_facesBean, name, binding) ;
}
/**
* <p>Return the {@link ValueBinding} used to calculate the value for the
* specified attribute name, if any.</p>
*
* @param name Name of the attribute or property for which to retrieve a
* {@link ValueBinding}
*
* @exception NullPointerException if <code>name</code>
* is <code>null</code>
* @exception IllegalArgumentException if <code>name</code> is not a valid
* attribute of this converter
* @deprecated
*/
public ValueBinding getValueBinding(String name)
{
return ConverterUtils.getValueBinding(_facesBean, name);
} |