1 23 24 package com.sun.enterprise.tools.guiframework.view; 25 26 import com.iplanet.jato.NavigationException; 27 import com.iplanet.jato.RequestContext; 28 import com.iplanet.jato.model.ModelControlException; 29 import com.iplanet.jato.view.BasicTiledView; 30 import com.iplanet.jato.view.ContainerView; 31 import com.iplanet.jato.view.View; 32 import com.iplanet.jato.view.event.ChildDisplayEvent; 33 import com.iplanet.jato.view.event.ChildContentDisplayEvent; 34 import com.iplanet.jato.view.event.DisplayEvent; 35 36 import com.sun.enterprise.tools.guiframework.view.descriptors.ViewDescriptor; 37 38 39 public class DescriptorTiledView extends BasicTiledView implements DescriptorContainerView { 40 41 44 public DescriptorTiledView(RequestContext ctx, ContainerView container, String name, ViewDescriptor desc) { 45 super(container, name); 46 setRequestContext(ctx); 47 setViewDescriptor(desc); 48 registerViewDescriptorChildren(); 49 } 50 51 52 57 public ViewDescriptor getViewDescriptor() { 58 return _viewDesc; 59 } 60 61 62 65 protected void setViewDescriptor(ViewDescriptor desc) { 66 _viewDesc = desc; 67 } 68 69 70 73 public void registerViewDescriptorChildren() { 74 DescriptorViewHelper.registerViewDescriptorChildren(getViewDescriptor(), this); 75 } 76 77 78 85 public View createChild(String name) { 86 return DescriptorViewHelper.createChild(this, name); 88 } 89 90 91 94 public RequestContext getRequestContext() { 95 return _reqCtx; 96 } 97 98 99 102 public void setRequestContext(RequestContext context) { 103 _reqCtx = context; 104 } 105 106 107 public void forwardTo(RequestContext requestContext) throws NavigationException { 108 getParentViewBean().forwardTo(requestContext); 109 } 110 111 112 113 117 125 public void beginDisplay(DisplayEvent event) throws ModelControlException { 126 DescriptorViewHelper.beginDisplay(this, event); 127 super.beginDisplay(event); 128 } 129 130 131 public boolean beginChildDisplay(ChildDisplayEvent event) throws ModelControlException { 132 return DescriptorViewHelper.beginChildDisplay(this, event); 133 } 134 135 136 public String endChildDisplay(ChildContentDisplayEvent event) throws ModelControlException { 137 return DescriptorViewHelper.endChildDisplay(this, event); 138 } 139 140 141 public void endDisplay(DisplayEvent event) { 142 DescriptorViewHelper.endDisplay(this, event); 143 super.endDisplay(event); 144 } 145 146 147 private RequestContext _reqCtx = null; 148 private ViewDescriptor _viewDesc = null; 149 } 150 | Popular Tags |