Interface ClientBehavior

    • Method Detail

      • getScript

        java.lang.String getScript​(ClientBehaviorContext behaviorContext)

        Return the script that implements this ClientBehavior's client-side logic.

        ClientBehavior.getScript() implementations are allowed to return null to indicate that no script is required for this particular getScript() call. For example, a ClientBehavior implementation may return null if the Behavior is disabled.

        behaviorContext - the ClientBehaviorContext that provides properties that might influence this getScript() call. Note that ClientBehaviorContext instances are short-lived objects that are only valid for the duration of the call to getScript(). ClientBehavior implementations must not hold onto references to ClientBehaviorContexts.
        script that provides the client-side behavior, or null if no script is required.
        java.lang.NullPointerException - if behaviorContext is null
      • getHints

        java.util.Set<ClientBehaviorHint> getHints​()

        Returns hints that describe the behavior of the ClientBehavior implementation. The hints may impact how Renderers behave in the presence of Behaviors. For example, when a Behavior that specifies ClientBehaviorHint.SUBMITTING is present, the Renderer may choose to alternate the scripts that it generates itself.

        a non-null, unmodifiable collection of ClientBehaviorHints.