webwork.dispatcher
Class DynamicViewMapping

java.lang.Object
  extended bywebwork.dispatcher.DynamicViewMapping
All Implemented Interfaces:
ViewMapping

public class DynamicViewMapping
extends java.lang.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:
ViewMapping

Field Summary
protected  java.lang.String actionSuffix
           
protected  java.lang.String actionSuffixParam
           
protected  java.util.Map cache
           
protected  ViewMapping delegate
           
protected static org.apache.commons.logging.Log log
           
protected  java.lang.Object NULL_VIEW
           
 
Constructor Summary
DynamicViewMapping(ViewMapping aDelegate)
           
 
Method Summary
protected  java.lang.String checkDynamicView(java.lang.String view)
          Check if the supplied string specifies a dynamic view.
protected  int getMatchingBrace(java.lang.String view, int dynStart)
           
 java.lang.Object getView(java.lang.String anActionName, java.lang.String aViewName)
          Get view corresponding to given action and view name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

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

delegate

protected ViewMapping delegate

cache

protected java.util.Map cache

actionSuffix

protected java.lang.String actionSuffix

actionSuffixParam

protected java.lang.String actionSuffixParam

NULL_VIEW

protected final java.lang.Object NULL_VIEW
Constructor Detail

DynamicViewMapping

public DynamicViewMapping(ViewMapping aDelegate)
Method Detail

getView

public java.lang.Object getView(java.lang.String anActionName,
                                java.lang.String aViewName)
Get view corresponding to given action and view name

Specified by:
getView in interface ViewMapping

checkDynamicView

protected java.lang.String checkDynamicView(java.lang.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(java.lang.String view,
                               int dynStart)


Copyright © 2001-2003 WebWork All Rights Reserved.