コード例 #1
0
ファイル: ActionLink.java プロジェクト: popeye0523/t3_rebuild
  /**
   * Returns true if the stateful parameter is bound to a true value. If stateful is not bound, also
   * returns the default, true.
   *
   * <p>Note that this method can be called when the component is not rendering, therefore it must
   * directly access the {@link IBinding} for the stateful parameter.
   */
  public boolean getRequiresSession() {
    IBinding statefulBinding = getStatefulBinding();

    if (statefulBinding == null) return true;

    return statefulBinding.getBoolean();
  }
コード例 #2
0
  /**
   * Gets the value of the binding.
   *
   * @param requiredType if not null, the expected type of the value object.
   * @see IBinding#getObject()
   * @see IBinding#getObject(String, Class)
   */
  protected Object getBindingValue(Class requiredType) {
    Object result;

    if (requiredType == null) result = _binding.getObject();
    else result = _binding.getObject(_parameterName, requiredType);

    return result;
  }
コード例 #3
0
 public Object getObject(@SuppressWarnings("rawtypes") Class type) {
   try {
     return binding.getObject(type);
   } catch (Exception ex) {
     handle(ex);
     return null;
   }
 }
コード例 #4
0
 public Object getObject() {
   try {
     return binding.getObject();
   } catch (Exception ex) {
     handle(ex);
     return null;
   }
 }
コード例 #5
0
  /**
   * Restores the property to its default value. For {@link Direction#FORM} parameters, extracts the
   * property value and sets the binding form it (when appropriate).
   */
  public void resetParameter(IRequestCycle cycle) {
    if (_direction == Direction.FORM && cycle.isRewinding()) {
      IFormComponent component = (IFormComponent) _component;

      if (!component.isDisabled()) {
        IForm form = Form.get(cycle);

        if (form != null && form.isRewinding()) {
          Object value = readCurrentPropertyValue();

          _binding.setObject(value);
        }
      }
    }

    // Either way, clear the value.

    setPropertyValue(_clearValue);
  }
コード例 #6
0
 public boolean isInvariant() {
   return binding.isInvariant();
 }
コード例 #7
0
 public Location getLocation() {
   return binding.getLocation();
 }
コード例 #8
0
 public String getDescription() {
   return binding.getDescription();
 }
コード例 #9
0
 public void setObject(Object value) {
   binding.setObject(value);
 }