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.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 39 import com.sun.web.ui.model.CCPropertySheetModelInterface; 40 import com.sun.web.ui.view.propertysheet.CCPropertySheet; 41 42 43 public class DescriptorCCPropertySheet extends CCPropertySheet implements DescriptorContainerView { 44 45 48 public DescriptorCCPropertySheet(RequestContext ctx, ContainerView container, 49 String pageName, ViewDescriptor desc, 50 CCPropertySheetModelInterface model) { 51 super(container, model, pageName); 52 setRequestContext(ctx); 53 setContainerView(this); 54 setViewDescriptor(desc); 55 registerViewDescriptorChildren(); 56 } 57 58 59 64 public ViewDescriptor getViewDescriptor() { 65 return _viewDesc; 66 } 67 68 69 72 protected void setViewDescriptor(ViewDescriptor desc) { 73 _viewDesc = desc; 74 } 75 76 77 80 public void registerViewDescriptorChildren() { 81 DescriptorViewHelper.registerViewDescriptorChildren(getViewDescriptor(), this); 82 } 83 84 85 92 public View createChild(String name) { 93 return DescriptorViewHelper.createChild(this, name); 95 109 } 110 111 112 115 public RequestContext getRequestContext() { 116 return _reqCtx; 117 } 118 119 120 123 public void setRequestContext(RequestContext context) { 124 _reqCtx = context; 125 } 126 127 128 public void forwardTo(RequestContext requestContext) throws NavigationException { 129 getParentViewBean().forwardTo(requestContext); 130 } 131 132 133 134 138 146 public void beginDisplay(DisplayEvent event) throws ModelControlException { 147 DescriptorViewHelper.beginDisplay(this, event); 148 super.beginDisplay(event); 149 } 150 151 152 public boolean beginChildDisplay(ChildDisplayEvent event) throws ModelControlException { 153 return DescriptorViewHelper.beginChildDisplay(this, event); 154 } 155 156 157 public String endChildDisplay(ChildContentDisplayEvent event) throws ModelControlException { 158 return DescriptorViewHelper.endChildDisplay(this, event); 159 } 160 161 162 public void endDisplay(DisplayEvent event) { 163 DescriptorViewHelper.endDisplay(this, event); 164 super.endDisplay(event); 165 } 166 167 168 private RequestContext _reqCtx = null; 169 private ViewDescriptor _viewDesc = null; 170 } 171 | Popular Tags |