Class DynamicViewMapping

java.lang.Object
webwork.dispatcher.DynamicViewMapping
All Implemented Interfaces:
ViewMapping

public class DynamicViewMapping extends Object implements ViewMapping
This view mapping allows for dynamic values to be used in the view specification. The dynamic expressions are specified as: ${someWWExpression} The expression will be looked up on the value stack. When all dynamic expressions have been looked up the DynamicViewMapping also checks if the view is an action, and wraps the view it in a ViewActionWrapper in that case. If the view did not contain dynamic data then it is cached, otherwise it is not.
Version:
$Revision: 1.2 $
Author:
Dick Zetterberg (dick@transitor.se)
See Also:
  • Field Details

    • log

      protected static org.apache.commons.logging.Log log
    • delegate

      protected ViewMapping delegate
    • cache

      protected Map cache
    • actionSuffix

      protected String actionSuffix
    • actionSuffixParam

      protected String actionSuffixParam
    • NULL_VIEW

      protected final Object NULL_VIEW
  • Constructor Details

    • DynamicViewMapping

      public DynamicViewMapping(ViewMapping aDelegate)
  • Method Details

    • getView

      public Object getView(String anActionName, String aViewName)
      Get view corresponding to given action and view name
      Specified by:
      getView in interface ViewMapping
    • checkDynamicView

      protected String checkDynamicView(String view)
      Check if the supplied string specifies a dynamic view. In that case lookup the dynamic elements on the stack. If not, return null. The parameter view should not be null
    • getMatchingBrace

      protected int getMatchingBrace(String view, int dynStart)