1 23 24 package com.sun.enterprise.tools.guiframework.view.descriptors; 25 26 import com.iplanet.jato.RequestManager; 27 import com.iplanet.jato.RequestContext; 28 import com.iplanet.jato.view.ContainerView; 29 import com.iplanet.jato.view.View; 30 import com.iplanet.jato.ModelManager; 31 32 import com.sun.web.ui.model.CCAddRemoveModel; 33 import com.sun.web.ui.model.CCAddRemoveModelInterface; 34 35 import com.sun.enterprise.tools.guiframework.view.DescriptorCCAddRemove; 36 37 40 public class CCAddRemoveDescriptor extends ViewDescriptor { 41 42 45 public CCAddRemoveDescriptor(String name) { 46 super(name); 47 } 48 49 50 53 public View getInstance(RequestContext ctx, ContainerView container, String name) { 54 71 return new DescriptorCCAddRemove(ctx, container, name, this, getModel()); 72 } 73 74 75 public CCAddRemoveModelInterface getModel() { 76 ModelManager mgr = RequestManager.getRequestContext().getModelManager(); 77 78 return (CCAddRemoveModelInterface)mgr.getModel( 79 CCAddRemoveModel.class, 80 getModelInstanceName(), 81 shouldGetModelFromSession(), 82 shouldPutModelToSession()); 83 } 84 } 85 | Popular Tags |