Class HtmlWidgetVar


public class HtmlWidgetVar extends SimpleVar
HTML widget variable resolver.

The format for this var is "$W{widgetName}".

Widgets are simple class that produce some sort of string based on a passed-in HTTP request.

They're registered via the following mechanisms:

See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • resolve

      public String resolve(VarResolverSession session, String key) throws Exception
      Description copied from class: Var
      The interface that needs to be implemented for subclasses of SimpleVar.
      Specified by:
      resolve in class Var
      Parameters:
      session - The session object used for a single instance of a var resolution.
      key - The inside argument of the variable.
      Returns:
      The resolved value.
      Throws:
      Exception - Any exception can be thrown.
    • canResolve

      public boolean canResolve(VarResolverSession session)
      Description copied from class: Var
      Returns true if this variable can be resolved in the specified session.

      For example, some variable cannot resolve unless specific context or session objects are available.

      Overrides:
      canResolve in class Var
      Parameters:
      session - The current session.
      Returns:
      true if this variable can be resolved in the specified session.