/** * 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(); }
/** * 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; }
public Object getObject(@SuppressWarnings("rawtypes") Class type) { try { return binding.getObject(type); } catch (Exception ex) { handle(ex); return null; } }
public Object getObject() { try { return binding.getObject(); } catch (Exception ex) { handle(ex); return null; } }
/** * 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); }
public boolean isInvariant() { return binding.isInvariant(); }
public Location getLocation() { return binding.getLocation(); }
public String getDescription() { return binding.getDescription(); }
public void setObject(Object value) { binding.setObject(value); }