Class ReadOnlyValueExpression

java.lang.Object
jakarta.el.Expression
jakarta.el.ValueExpression
org.omnifaces.el.ReadOnlyValueExpression
All Implemented Interfaces:
Serializable

public class ReadOnlyValueExpression extends ValueExpression
Implementation of a read only value expression that can be used when the value is not yet available at construction time, or when the value would be too expensive to create and it's not yet clear if the expression will actually be evaluated.

A callback (lambda in Java 8) that obtains the value can be provided, or the getValue() method can be overridden.

Since:
2.0
Author:
Arjan Tijms
See Also:
  • Constructor Details

    • ReadOnlyValueExpression

      public ReadOnlyValueExpression(Class<?> expectedType, FunctionalInterfaces.SerializableSupplier<Object> callback)
      Construct a read only value expression.
      Parameters:
      expectedType - The type the result of the expression will be coerced to after evaluation.
      callback - The functional interface that will be called when the value expression is resolved.
    • ReadOnlyValueExpression

      public ReadOnlyValueExpression(Class<?> expectedType)
      Construct a read only value expression.
      Parameters:
      expectedType - The type the result of the expression will be coerced to after evaluation.
    • ReadOnlyValueExpression

      public ReadOnlyValueExpression()
      Construct a read only value expression.
  • Method Details