1 23 24 package com.sun.enterprise.tools.admingui.descriptors; 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.ContainerView; 30 import com.iplanet.jato.view.View; 31 import com.iplanet.jato.view.event.ChildDisplayEvent; 32 import com.iplanet.jato.view.event.ChildContentDisplayEvent; 33 import com.iplanet.jato.view.event.DisplayEvent; 34 35 import com.sun.enterprise.tools.guiframework.exception.ChildNotRegisteredException; 36 import com.sun.enterprise.tools.guiframework.exception.FrameworkException; 37 import com.sun.enterprise.tools.guiframework.view.descriptors.ViewDescriptor; 38 import com.sun.enterprise.tools.guiframework.view.DescriptorContainerView; 39 import com.sun.enterprise.tools.guiframework.view.DescriptorViewHelper; 40 41 import com.sun.enterprise.tools.admingui.taglib.DataSheet; 42 import com.sun.enterprise.tools.admingui.taglib.DataSheetModelInterface; 43 44 45 public class DescriptorDataSheet extends DataSheet implements DescriptorContainerView { 46 47 50 public DescriptorDataSheet(RequestContext ctx, ContainerView container, 51 String pageName, ViewDescriptor desc, DataSheetModelInterface model) { 52 super(container, model, pageName); 53 setRequestContext(ctx); 54 setContainerView(this); 55 setViewDescriptor(desc); 56 registerViewDescriptorChildren(); 57 } 58 59 60 65 public ViewDescriptor getViewDescriptor() { 66 return _viewDesc; 67 } 68 69 70 73 protected void setViewDescriptor(ViewDescriptor desc) { 74 _viewDesc = desc; 75 } 76 77 78 81 public void registerViewDescriptorChildren() { 82 DescriptorViewHelper.registerViewDescriptorChildren(getViewDescriptor(), this); 83 } 84 85 86 93 public View createChild(String name) { 94 return DescriptorViewHelper.createChild(this, name); 96 110 } 111 112 113 116 public RequestContext getRequestContext() { 117 return _reqCtx; 118 } 119 120 121 124 public void setRequestContext(RequestContext context) { 125 _reqCtx = context; 126 } 127 128 129 public void forwardTo(RequestContext requestContext) throws NavigationException { 130 getParentViewBean().forwardTo(requestContext); 131 } 132 133 134 135 139 147 public void beginDisplay(DisplayEvent event) throws ModelControlException { 148 DescriptorViewHelper.beginDisplay(this, event); 149 super.beginDisplay(event); 150 } 151 152 153 public boolean beginChildDisplay(ChildDisplayEvent event) throws ModelControlException { 154 return DescriptorViewHelper.beginChildDisplay(this, event); 155 } 156 157 158 public String endChildDisplay(ChildContentDisplayEvent event) throws ModelControlException { 159 return DescriptorViewHelper.endChildDisplay(this, event); 160 } 161 162 163 public void endDisplay(DisplayEvent event) { 164 DescriptorViewHelper.endDisplay(this, event); 165 super.endDisplay(event); 166 } 167 168 169 private RequestContext _reqCtx = null; 170 private ViewDescriptor _viewDesc = null; 171 } 172 | Popular Tags |