1 18 package org.apache.beehive.netui.pageflow; 19 20 import org.apache.struts.action.ActionMapping; 21 import org.apache.struts.action.ActionForm; 22 import org.apache.struts.action.ActionForward; 23 import org.apache.struts.config.ModuleConfig; 24 25 import java.io.Serializable ; 26 27 36 public class PreviousPageInfo 37 extends PreviousInfo 38 implements Serializable 39 { 40 private ActionForward _forward; 41 private String _mappingPath; 42 private transient ActionMapping _mapping; 43 private Object _clientState; 44 45 46 57 public PreviousPageInfo( ActionForward forward, ActionForm form, ActionMapping mapping, String queryString ) 58 { 59 super( form, queryString ); 60 _mapping = mapping; 61 _mappingPath = mapping != null ? mapping.getPath() : null; 62 _forward = forward; 63 } 64 65 76 public ActionMapping getMapping() 77 { 78 return _mapping; 79 } 80 81 86 public void setMapping( ActionMapping mapping ) 87 { 88 _mapping = mapping; 89 } 90 91 96 public void reinitialize( PageFlowController pfc ) 97 { 98 if ( _mapping == null && _mappingPath != null ) 99 { 100 ModuleConfig mc = pfc.getModuleConfig(); 101 assert mc != null : "no ModuleConfig found for " + pfc.getClass().getName(); 102 _mapping = ( ActionMapping ) mc.findActionConfig( _mappingPath ); 103 } 104 105 if ( _forward != null && _forward instanceof Forward ) 106 { 107 ( ( Forward ) _forward ).reinitialize( pfc ); 108 } 109 } 110 111 116 public ActionForward getForward() 117 { 118 return _forward; 119 } 120 121 126 public void setForward( ActionForward forward ) 127 { 128 _forward = forward; 129 } 130 131 134 public Object getClientState() 135 { 136 return _clientState; 137 } 138 139 142 public void setClientState( Object clientState ) 143 { 144 _clientState = clientState; 145 } 146 } 147 | Popular Tags |