1 23 24 package com.sun.enterprise.tools.admingui.descriptors; 25 26 import com.iplanet.jato.RequestContext; 27 import com.iplanet.jato.view.ContainerView; 28 import com.iplanet.jato.view.View; 29 30 import com.sun.enterprise.tools.guiframework.exception.FrameworkException; 31 import com.sun.enterprise.tools.guiframework.view.descriptors.ViewDescriptor; 32 import com.sun.enterprise.tools.admingui.view.DescriptorCCHelp2MastheadViewBean; 33 34 35 38 public class CCHelp2MastheadViewBeanDescriptor extends ViewDescriptor { 39 40 43 public CCHelp2MastheadViewBeanDescriptor(String name) { 44 super(name); 45 } 46 47 48 55 public View getInstance(RequestContext ctx, ContainerView container, String name) { 56 if (name.equals("com.sun.web.ui.servlet.help2.MastheadViewBean")) { 60 try { 61 return ctx.getViewBeanManager().getViewBean("Masthead"); 62 } catch (ClassNotFoundException ex) { 63 throw new FrameworkException( 64 "MastheadViewBean is called by 2 names: " + 65 "'Masthead' and 'com.sun.web.ui.servlet.help2." + 66 "MastheadViewBean'. For this reason, you must " + 67 "register both of these in the ViewXML! The "+ 68 "CCHelp2MastheadViewBeanDescriptor knows how to deal with " + 69 "this.", ex, this, container); 70 } 71 } 72 return new DescriptorCCHelp2MastheadViewBean(ctx, name, this); 73 } 74 } 75 | Popular Tags |