public TypedValue getTypedValue(boolean deserializeValue) { if (cachedValue != null && cachedValue instanceof SerializableValue && Context.getCommandContext() != null) { SerializableValue serializableValue = (SerializableValue) cachedValue; if(deserializeValue && !serializableValue.isDeserialized()) { // clear cached value in case it is not deserialized and user requests deserialized value cachedValue = null; } } if (cachedValue == null && errorMessage == null) { try { cachedValue = getSerializer().readValue(valueFields, deserializeValue); if (notifyOnImplicitUpdates && isMutableValue(cachedValue)) { Context.getCommandContext().registerCommandContextListener(this); } } catch (RuntimeException e) { // intercept the error message this.errorMessage = e.getMessage(); throw e; } } return cachedValue; }
public TypedValue getTypedValue(boolean deserializeValue) { if (cachedValue != null && cachedValue instanceof SerializableValue && Context.getCommandContext() != null) { SerializableValue serializableValue = (SerializableValue) cachedValue; if(deserializeValue && !serializableValue.isDeserialized()) { // clear cached value in case it is not deserialized and user requests deserialized value cachedValue = null; } } if (cachedValue == null && errorMessage == null) { try { cachedValue = getSerializer().readValue(valueFields, deserializeValue); if (notifyOnImplicitUpdates && isMutableValue(cachedValue)) { Context.getCommandContext().registerCommandContextListener(this); } } catch (RuntimeException e) { // intercept the error message this.errorMessage = e.getMessage(); throw e; } } return cachedValue; }
public TypedValue getTypedValue(boolean deserializeValue) { if (cachedValue != null && cachedValue instanceof SerializableValue && Context.getCommandContext() != null) { SerializableValue serializableValue = (SerializableValue) cachedValue; if(deserializeValue && !serializableValue.isDeserialized()) { // clear cached value in case it is not deserialized and user requests deserialized value cachedValue = null; } } if (cachedValue == null && errorMessage == null) { try { cachedValue = getSerializer().readValue(valueFields, deserializeValue); if (notifyOnImplicitUpdates && isMutableValue(cachedValue)) { Context.getCommandContext().registerCommandContextListener(this); } } catch (RuntimeException e) { // intercept the error message this.errorMessage = e.getMessage(); throw e; } } return cachedValue; }