1 23 24 package com.sun.enterprise.tools.admingui.descriptors; 25 26 import com.iplanet.jato.RequestContext; 27 import com.iplanet.jato.view.BasicDisplayField; 28 import com.iplanet.jato.view.ContainerView; 29 import com.iplanet.jato.view.View; 30 31 import com.sun.enterprise.tools.guiframework.event.descriptors.EventDescriptor; 32 import com.sun.enterprise.tools.guiframework.FrameworkDescriptor; 33 import com.sun.enterprise.tools.guiframework.event.descriptors.EventDescriptor; 34 import com.sun.enterprise.tools.guiframework.event.descriptors.HandlerDescriptor; 35 import com.sun.enterprise.tools.guiframework.event.descriptors.IODescriptor; 36 import com.sun.enterprise.tools.guiframework.event.descriptors.UseHandlerDescriptor; 37 import com.sun.enterprise.tools.guiframework.exception.FrameworkException; 38 import com.sun.enterprise.tools.guiframework.view.descriptors.ViewDescriptor; 39 import com.sun.enterprise.tools.guiframework.view.descriptors.DisplayFieldDescriptor; 40 import com.sun.enterprise.tools.guiframework.util.Util; 41 42 45 public class ExtendedTextFieldDescriptor extends DisplayFieldDescriptor { 46 47 50 public ExtendedTextFieldDescriptor(String name) { 51 super(name); 52 addEndDisplayHandler(this); 54 } 55 56 72 private void addEndDisplayHandler(ViewDescriptor desc) { 73 EventDescriptor ev = desc.getEventDescriptor(EventDescriptor.TYPES.END_DISPLAY); 74 if (ev == null) 75 ev = new EventDescriptor(desc, EventDescriptor.TYPES.END_DISPLAY); 76 77 HandlerDescriptor hd = new HandlerDescriptor("endExtendedTextDisplay"); 78 hd.setHandlerMethod( 79 "com.sun.enterprise.tools.admingui.handlers.SystemPropsHandlers", 80 "endExtendedTextDisplay"); 81 82 UseHandlerDescriptor useDesc = new UseHandlerDescriptor(ev, hd); 83 ev.addEventHandler(useDesc); 84 desc.setEventDescriptor(ev); 85 } 86 87 95 public View getInstance(RequestContext ctx, ContainerView container, String name) { 96 BasicDisplayField field = new BasicDisplayField(container, name); 97 98 setDefaultValue(field); 100 101 return field; 102 } 103 } 104 | Popular Tags |