/** * Creates an exception indicating the binding value is null. * * @since 3.0 */ public static BindingException createNullBindingException(IBinding binding) { return new BindingException(getMessage("null-value-for-binding"), binding); }
/** * Creates an exception indicating the binding value is null. * * @since 3.0 */ public static BindingException createNullBindingException(IBinding binding) { return new BindingException(getMessage("null-value-for-binding"), binding); }
/** @since 3.0 */ protected BindingException createReadOnlyBindingException(IBinding binding) { return new BindingException(BindingMessages.readOnlyBinding(binding), binding); }
/** @since 3.0 */ protected BindingException createReadOnlyBindingException(IBinding binding) { return new BindingException(BindingMessages.readOnlyBinding(binding), binding); }
/** * Sets up the helper object, but also optimizes the property path and determines if the binding * is invarant. */ private void initialize() { if (_initialized) return; _initialized = true; try { _parsedExpression = (Node)_cache.getCompiledExpression(_description); _invariant = _evaluator.isConstant(_description); } catch (Exception ex) { throw new BindingException(ex.getMessage(), this, ex); } }
/** * Sets up the helper object, but also optimizes the property path and determines if the binding * is invarant. */ private void initialize() { if (_initialized) return; _initialized = true; try { _parsedExpression = (Node)_cache.getCompiledExpression(_description); _invariant = _evaluator.isConstant(_description); } catch (Exception ex) { throw new BindingException(ex.getMessage(), this, ex); } }
/** @since 3.0 * */ public static BindingException createRequiredParameterException(IComponent component, String parameterName) { return new BindingException(format("required-parameter", parameterName, component.getExtendedId()), component, null, component.getBinding(parameterName), null); }
public Object getObject() { IAsset result = _component.getAsset(_description); if (result == null) throw new BindingException(BindingMessages.missingAsset(_component, _description), _component, getLocation(), this, null); return result; }
public Object getObject() { IAsset result = _component.getAsset(_description); if (result == null) throw new BindingException(BindingMessages.missingAsset(_component, _description), _component, getLocation(), this, null); return result; }
/** @since 3.0 * */ public static BindingException createRequiredParameterException(IComponent component, String parameterName) { return new BindingException(format("required-parameter", parameterName, component.getExtendedId()), component, null, component.getBinding(parameterName), null); }
private Object resolveExpression() { try { if (_accessor == null && !_writeFailed) { _parsedExpression = (Node)_cache.getCompiledExpression(_root, _description); _accessor = _parsedExpression.getAccessor(); } if (_accessor != null) return _evaluator.read(_root, _accessor); return _evaluator.readCompiled(_root, _parsedExpression); } catch (Throwable t) { throw new BindingException(t.getMessage(), this, t); } }
private Object resolveExpression() { try { if (_accessor == null && !_writeFailed) { _parsedExpression = (Node)_cache.getCompiledExpression(_root, _description); _accessor = _parsedExpression.getAccessor(); } if (_accessor != null) return _evaluator.read(_root, _accessor); return _evaluator.readCompiled(_root, _parsedExpression); } catch (Throwable t) { throw new BindingException(t.getMessage(), this, t); } }
public Object getObject() { IAsset asset = component.getAsset(_description); if (asset == null) throw new BindingException("Component " + component.getExtendedId() + " does not contain an asset named ''" + _description + "''.", component, getLocation(), this, null); return new AbsoluteAsset(asset, absoluteURLBuilder); }
public Object getObject(Class type) { Defense.notNull(type, "type"); Object raw = getObject(); try { return _valueConverter.coerceValue(raw, type); } catch (Exception ex) { String message = BindingMessages.convertObjectError(this, ex); throw new BindingException(message, getComponent(), _location, this, ex); } }
public Object getObject(Class type) { Defense.notNull(type, "type"); Object raw = getObject(); try { return _valueConverter.coerceValue(raw, type); } catch (Exception ex) { String message = BindingMessages.convertObjectError(this, ex); throw new BindingException(message, getComponent(), _location, this, ex); } }
public void actionTriggered(IComponent component, IRequestCycle cycle) { try { if (_listener == null) _listener = _component.getListeners().getListener(_methodName); _listener.actionTriggered(component, cycle); } catch (PageRedirectException ex) { throw ex; } catch (RedirectException ex) { throw ex; } catch (RenderRewoundException ex) { throw ex; } catch (RuntimeException ex) { throw new BindingException(BindingMessages.listenerMethodFailure( _component, _methodName, ex), _component, getLocation(), this, ex); } }
throw new BindingException(ex.getMessage(), this, ex);
public void actionTriggered(IComponent component, IRequestCycle cycle) { try { if (_listener == null) _listener = _component.getListeners().getListener(_methodName); _listener.actionTriggered(component, cycle); } catch (PageRedirectException ex) { throw ex; } catch (RedirectException ex) { throw ex; } catch (RenderRewoundException ex) { throw ex; } catch (RuntimeException ex) { throw new BindingException(BindingMessages.listenerMethodFailure( _component, _methodName, ex), _component, getLocation(), this, ex); } }
throw new BindingException(ValidMessages.noDisplayName(this,field), this, null, getBinding("field"), null);
throw new BindingException(ValidMessages.noDisplayName(this,field), this, null, getBinding("field"), null);