Package org.apache.myfaces.trinidad.bean

Examples of org.apache.myfaces.trinidad.bean.PropertyKey


    return uixBean;
  }

  protected PropertyKey getPropertyKey(String name)
  {
    PropertyKey key = getBeanType().findKey(name);
    if (key == null)
      key = PropertyKey.createPropertyKey(name);

    return key;
  }
View Full Code Here


  public ValueExpression getValueExpression(String name)
  {
    if (name == null)
      throw new NullPointerException();

    PropertyKey key = getPropertyKey(name);

    // Support standard RI behavior where getValueBinding()
    // doesn't complain about being asked for a ValueBinding -
    // but continue supporting strict behavior at FacesBean layer.
    if (!key.getSupportsBinding())
      return null;

    return getFacesBean().getValueExpression(key);
  }
View Full Code Here

          FacesContext.getCurrentInstance().getELContext();
      getAttributes().put(name, expression.getValue(context));
    }
    else
    {
      PropertyKey key = getPropertyKey(name);
      getFacesBean().setValueExpression(key, expression);
    }
  }
View Full Code Here

  public ValueBinding getValueBinding(String name)
  {
    if (name == null)
      throw new NullPointerException();

    PropertyKey key = getPropertyKey(name);

    // Support standard RI behavior where getValueBinding()
    // doesn't complain about being asked for a ValueBinding -
    // but continue supporting strict behavior at FacesBean layer.
    if (!key.getSupportsBinding())
      return null;

    return getFacesBean().getValueBinding(key);
  }
View Full Code Here

  public void setValueBinding(String name, ValueBinding binding)
  {
    if (name == null)
      throw new NullPointerException();

    PropertyKey key = getPropertyKey(name);
    getFacesBean().setValueBinding(key, binding);
  }
View Full Code Here

  /**
   * Restores a persisted PropertyKey.
   */
  static public PropertyKey restoreKey(FacesBean.Type type, Object value)
  {
    PropertyKey key;
    if (value instanceof Number)
    {
      key = type.findKey(((Number) value).intValue());
      if (key == null)
        throw new IllegalStateException(_LOG.getMessage(
View Full Code Here

    Object[] values = new Object[2 * size];
    int i = 0;
    for(Map.Entry<PropertyKey, Object> entry : map.entrySet())
    {
      PropertyKey key = entry.getKey();
      if (key.isTransient())
      {
        // TRINIDAD-1956: due to the view root caching functionality, the transient properties
        // may be retained too long. By removing the value here we can ensure that the next
        // request will not have the transient values.
        entry.setValue(null);
        continue;
      }

      Object value = entry.getValue();

      values[i] = saveKey(key);
      if (_LOG.isFinest())
      {
        _LOG.finest("SAVE {" + key + "=" + value + "}");
      }

      Object saveValue;

      if (useStateHolder)
        saveValue = saveStateHolder(context, value);
      else
        saveValue = key.saveValue(context, value);

      // aggressively check the serializability of the value
      if (_checkPropertyStateSerialization())
      {
        try
View Full Code Here

      Object savedKey = values[i * 2];
      if (savedKey == null)
        continue;

      Object savedValue = values[i * 2 + 1];
      PropertyKey key = restoreKey(type, savedKey);
      Object value;

      if (useStateHolder)
        value = restoreStateHolder(context, savedValue);
      else
        value = key.restoreValue(context, savedValue);

      if (_LOG.isFinest())
      {
        _LOG.finest("RESTORE {" + key + "=" + value + "}");
      }
View Full Code Here

   return bean;
}
  static void setValueBinding(FacesBean bean, String name, ValueBinding binding)
  {  
    PropertyKey key = _getPropertyKey(bean, name, true);
    bean.setValueBinding(key, binding);
  }
View Full Code Here

    bean.setValueBinding(key, binding);
  }
  static ValueBinding getValueBinding(FacesBean bean, String name)
  {
    PropertyKey key = _getPropertyKey(bean, name, true);
    return bean.getValueBinding(key);
  }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidad.bean.PropertyKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.