1 23 24 package com.sun.enterprise.tools.guiframework.view.descriptors; 25 26 import com.iplanet.jato.RequestContext; 27 import com.iplanet.jato.RequestManager; 28 import com.iplanet.jato.view.ContainerView; 29 import com.iplanet.jato.view.ContainerViewBase; 30 import com.iplanet.jato.view.DisplayField; 31 import com.iplanet.jato.view.View; 32 33 import com.sun.enterprise.tools.guiframework.exception.FrameworkException; 34 35 import com.sun.web.ui.model.CCWizardWindowModel; 36 import com.sun.web.ui.model.CCWizardWindowModelInterface; 37 import com.sun.web.ui.view.wizard.CCWizardWindow; 38 39 40 43 public class CCWizardWindowDescriptor extends DisplayFieldDescriptor { 44 45 48 public CCWizardWindowDescriptor(String name) { 49 super(name); 50 } 51 52 53 75 public View getInstance(RequestContext ctx, ContainerView container, String name) { 76 CCWizardWindowModelInterface wizModel = new CCWizardWindowModel(); 77 78 String image = (String )getParameter(MASTHEAD_IMAGE); 80 if (image != null) { 81 wizModel.setValue(CCWizardWindowModelInterface.MASTHEAD_SRC, image); 82 } 83 String alt = (String )getParameter(MASTHEAD_ALT_TEXT); 85 if (alt != null) { 86 wizModel.setValue(CCWizardWindowModelInterface.MASTHEAD_ALT, alt); 87 } 88 String resource = getResourceBundle(); 90 if (resource != null) { 91 wizModel.setValue(CCWizardWindowModelInterface.BASENAME, resource); 92 } 93 String bundle = (String )getParameter(BUNDLE_ID); 95 if (bundle != null) { 96 wizModel.setValue(CCWizardWindowModelInterface.BUNDLEID, bundle); 97 } 98 String title = (String )getParameter(WIZARD_TITLE); 100 if (title != null) { 101 wizModel.setValue(CCWizardWindowModelInterface.TITLE, title); 102 } 103 String className = (String )getParameter(WIZARD_CLASS_NAME); 105 if (className != null) { 106 wizModel.setValue(CCWizardWindowModelInterface.WIZARD_CLASS_NAME, className); 107 } 108 String wizName = (String )getParameter(WIZARD_NAME); 110 if (wizName != null) { 111 wizModel.setValue(CCWizardWindowModelInterface.WIZARD_NAME, wizName); 112 } 113 String wizWindowName = (String )getParameter(WIZARD_WINDOW_NAME); 115 if (wizWindowName != null) { 116 wizModel.setValue(CCWizardWindowModelInterface.WIZARD_WINDOW_NAME, wizWindowName); 117 } 118 String label = (String )getParameter(BUTTON_LABEL); 120 if (label != null) { 121 wizModel.setValue(CCWizardWindowModelInterface.WIZARD_BUTTON_FORM, label); 122 } 123 String wizRefresh = (String )getParameter(WIZARD_REFRESH_CMDCHILD); 125 if (wizRefresh != null) { 126 wizModel.setValue(CCWizardWindowModelInterface.WIZARD_REFRESH_CMDCHILD, wizRefresh); 127 } 128 129 wizModel.setValue(RESET_MODEL_DATA, "true"); 132 133 return new CCWizardWindow(container, wizModel, name, label); 134 } 135 136 137 140 public static final String MASTHEAD_IMAGE = "mastheadImage"; 141 142 145 public static final String MASTHEAD_ALT_TEXT = "mastheadAltText"; 146 147 150 public static final String BUNDLE_ID = "bundleId"; 151 152 155 public static final String WIZARD_TITLE = "wizardTitle"; 156 157 160 public static final String WIZARD_CLASS_NAME = "wizardClassName"; 161 162 165 public static final String WIZARD_NAME = "wizardName"; 166 167 170 public static final String WIZARD_WINDOW_NAME = "wizardWindowName"; 171 172 175 public static final String BUTTON_LABEL = "buttonLabel"; 176 177 180 public static final String WIZARD_REFRESH_CMDCHILD = "wizardRefreshCmd"; 181 182 185 public static final String RESET_MODEL_DATA = "resetModelData"; 186 } 187 | Popular Tags |