1 23 24 package com.sun.enterprise.tools.guiframework.view.descriptors; 25 26 import com.iplanet.jato.RequestContext; 27 import com.iplanet.jato.view.ContainerView; 28 import com.iplanet.jato.view.View; 29 import com.sun.web.ui.view.alert.CCAlertInline; 30 31 32 35 public class CCAlertInlineDescriptor extends DisplayFieldDescriptor { 36 37 40 public CCAlertInlineDescriptor(String name) { 41 super(name); 42 } 43 44 45 59 public View getInstance(RequestContext ctx, ContainerView container, String name) { 60 CCAlertInline alert = new CCAlertInline(container, name, "error"); 62 63 setBoundName(alert); 65 66 Object value=getParameter(TYPE); 68 if (value != null) { 69 alert.setValue(value); 70 } 71 72 value=getParameter(SUMMARY); 74 if (value != null) { 75 alert.setSummary(value.toString()); 76 } 77 78 value=getParameter(DETAIL); 80 if (value != null) { 81 alert.setDetail(value.toString()); 82 } 83 return alert; 84 } 85 86 87 90 public static final String SUMMARY = "summary"; 91 92 95 public static final String DETAIL = "detail"; 96 97 102 public static final String TYPE = "type"; 103 } 104 | Popular Tags |