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.view.descriptors.ViewDescriptor; 37 38 import com.sun.web.ui.model.CCActionTableModelInterface; 39 import com.sun.web.ui.view.table.CCActionTable; 40 41 42 43 44 public class DescriptorCCActionTable extends CCActionTable implements DescriptorContainerView { 45 46 49 public DescriptorCCActionTable(RequestContext ctx, ContainerView container, 50 String pageName, ViewDescriptor desc, 51 CCActionTableModelInterface 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 View child = null; 95 try { 96 child = DescriptorViewHelper.createChild(this, name); 98 } catch (ChildNotRegisteredException ex) { 99 child = super.createChild(name); 101 } catch (ChildNullException ex) { 102 try { 104 child = super.createChild(name); 105 if (child == null) { 106 throw ex; 107 } 108 } catch (Exception ex2) { 109 throw ex; 112 } 113 } 114 115 return child; 117 } 118 119 120 123 public RequestContext getRequestContext() { 124 return _reqCtx; 125 } 126 127 128 131 public void setRequestContext(RequestContext context) { 132 _reqCtx = context; 133 } 134 135 136 public void forwardTo(RequestContext requestContext) throws NavigationException { 137 getParentViewBean().forwardTo(requestContext); 138 } 139 140 141 142 146 154 public void beginDisplay(DisplayEvent event) throws ModelControlException { 155 DescriptorViewHelper.beginDisplay(this, event); 156 super.beginDisplay(event); 157 } 158 159 160 public boolean beginChildDisplay(ChildDisplayEvent event) throws ModelControlException { 161 return DescriptorViewHelper.beginChildDisplay(this, event); 162 } 163 164 165 public String endChildDisplay(ChildContentDisplayEvent event) throws ModelControlException { 166 return DescriptorViewHelper.endChildDisplay(this, event); 167 } 168 169 170 public void endDisplay(DisplayEvent event) { 171 DescriptorViewHelper.endDisplay(this, event); 172 super.endDisplay(event); 173 } 174 175 176 private RequestContext _reqCtx = null; 177 private ViewDescriptor _viewDesc = null; 178 } 179 | Popular Tags |