/** * Calls {@link ValueBoxBase#getValueOrThrow()}. If a {@link ParseException} * is thrown, it will be available through * {@link com.google.gwt.editor.client.EditorError#getUserData() * EditorError.getUserData()}. * * @return a value of type T * @see #setValue(Object) */ @Override public T getValue() { try { value = peer.getValueOrThrow(); } catch (ParseException e) { // TODO i18n getDelegate().recordError("Bad value (" + peer.getText() + ")", peer.getText(), e); } return value; }
@Override public void setDelegate(final EditorDelegate<D> pdelegate) { pdelegate.subscribe(); }
@Override public T getValue() { T value = null; if (takesValues instanceof ValueBoxBase<?>) { try { value = ((ValueBoxBase<T>) takesValues).getValueOrThrow(); } catch (final ParseException e) { final String entryAsText = ((ValueBoxBase<T>) takesValues).getText(); final String localizedMessage = messages.parseExceptionMessage(entryAsText); if (delegate != null) { delegate.recordError(localizedMessage, entryAsText, e); } } } else { value = takesValues.getValue(); } return value; }
@Override public void setDelegate(final EditorDelegate<D> pdelegate) { pdelegate.subscribe(); }
/** * Calls {@link ValueBoxBase#getValueOrThrow()}. If a {@link ParseException} * is thrown, it will be available through * {@link com.google.gwt.editor.client.EditorError#getUserData() * EditorError.getUserData()}. * * @return a value of type T * @see #setValue(Object) */ @Override public T getValue() { try { value = peer.getValueOrThrow(); } catch (ParseException e) { // TODO i18n getDelegate().recordError("Bad value (" + peer.getText() + ")", peer.getText(), e); } return value; }
/** * Calls {@link ValueBoxBase#getValueOrThrow()}. If a {@link ParseException} * is thrown, it will be available through * {@link com.google.gwt.editor.client.EditorError#getUserData() * EditorError.getUserData()}. * * @return a value of type T * @see #setValue(Object) */ @Override public T getValue() { try { value = peer.getValueOrThrow(); } catch (ParseException e) { // TODO i18n getDelegate().recordError("Bad value (" + peer.getText() + ")", peer.getText(), e); } return value; }
/** * Calls {@link ValueBoxBase#getValueOrThrow()}. If a {@link ParseException} * is thrown, it will be available through * {@link com.google.gwt.editor.client.EditorError#getUserData() * EditorError.getUserData()}. * * @return a value of type T * @see #setValue(Object) */ @Override public T getValue() { try { value = peer.getValueOrThrow(); } catch (ParseException e) { // TODO i18n getDelegate().recordError("Bad value (" + peer.getText() + ")", peer.getText(), e); } return value; }
/** * Calls {@link ValueBoxBase#getValueOrThrow()}. If a {@link ParseException} * is thrown, it will be available through * {@link com.google.gwt.editor.client.EditorError#getUserData() * EditorError.getUserData()}. * * @return a value of type T * @see #setValue(Object) */ @Override public T getValue() { try { value = peer.getValueOrThrow(); } catch (ParseException e) { // TODO i18n getDelegate().recordError( "Bad value (" + peer.getUnparsedText() + ")", peer.getUnparsedText(), e); } return value; }
@Override public T getValue() { if (editor instanceof EditorInput) { EditorInput<T> input = (EditorInput<T>) editor; T result = input.flush(); if (delegate != null && input.hasErrors()) { for (fr.putnami.pwt.core.editor.client.Error error : input.getErrors()) { delegate.recordError(error.getMessageKey(), error.getValue(), error.getParameters()); } } return result; } return editor.getValue(); }
@Override public T getValue() { if (editor instanceof EditorInput) { EditorInput<T> input = (EditorInput<T>) editor; T result = input.flush(); if (delegate != null && input.hasErrors()) { for (fr.putnami.pwt.core.editor.client.Error error : input.getErrors()) { delegate.recordError(error.getMessageKey(), error.getValue(), error.getParameters()); } } return result; } return editor.getValue(); }