1 5 6 package org.infohazard.maverick.flow; 7 8 import java.util.*; 9 import java.io.IOException ; 10 import javax.servlet.ServletException ; 11 12 16 class ViewWithParams implements View 17 { 18 20 protected View decorated; 21 protected Map params; 22 23 25 public ViewWithParams(View decorate, Map params) 26 { 27 if (params == null) 28 throw new IllegalArgumentException ("Don't use this decorator without params"); 29 30 this.decorated = decorate; 31 this.params = params; 32 } 33 34 36 public void go(ViewContext vctx) throws IOException , ServletException 37 { 38 ((MaverickContext)vctx).putAllViewParams(this.params); 39 40 this.decorated.go(vctx); 41 } 42 } | Popular Tags |