001: /*
002: * Copyright 2001 Sun Microsystems, Inc. All rights reserved.
003: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
004: */
005:
006: package com.sun.portal.search.admin;
007:
008: import java.net.URL;
009:
010: import com.sun.portal.search.admin.CSViewBeanBase; //import com.sun.portal.search.admin.cli.RobotController;
011:
012: import javax.servlet.http.HttpServletRequest;
013:
014: import com.iplanet.jato.RequestContext;
015:
016: import com.iplanet.jato.view.event.DisplayEvent;
017: import com.iplanet.jato.view.event.RequestInvocationEvent;
018:
019: import com.iplanet.jato.view.html.StaticTextField;
020: import com.iplanet.jato.view.html.TextField;
021: import com.iplanet.jato.view.html.CheckBox;
022: import com.iplanet.jato.view.html.Button;
023: import com.iplanet.jato.view.html.ComboBox;
024: import com.iplanet.jato.view.html.RadioButtonGroup;
025:
026: import com.iplanet.jato.view.html.Option;
027: import com.iplanet.jato.view.html.OptionList;
028:
029: import com.iplanet.jato.view.View;
030: import com.iplanet.jato.view.ViewBean;
031: import com.iplanet.jato.view.ViewBeanBase;
032:
033: import com.iplanet.jato.ViewBeanManager;
034:
035: import com.iplanet.jato.model.ModelControlException;
036:
037: import com.iplanet.am.console.components.view.html.IPlanetButton;
038:
039: /**
040: * iPS admin console view bean: TODO
041: */
042: public class StartPointsViewBean extends CSViewBeanBase {
043: public static final String DEFAULT_DISPLAY_URL = "/ps/searchadmin/StartPoints.jsp";
044: public static final String PAGE_NAME = "StartPoints";
045: public static final String ENABLE_LABEL = "EnableLabel";
046: public static final String STARTPOINT_LABEL = "StartPointLabel";
047: public static final String DEPTH_LABEL = "DepthLabel";
048: public static final String STARTPOINTLIST_VIEW = "StartPointsList";
049:
050: /**
051: * constructor
052: *
053: * @param PageName of this view bean
054: * @param displayURL default display URL
055: */
056: public StartPointsViewBean() {
057: super (PAGE_NAME);
058: setDefaultDisplayURL(DEFAULT_DISPLAY_URL);
059: registerChildren();
060: }
061:
062: /**
063: * register child component
064: */
065: protected void registerChildren() {
066: registerChild(ENABLE_LABEL, StaticTextField.class);
067: registerChild(STARTPOINT_LABEL, StaticTextField.class);
068: registerChild(DEPTH_LABEL, StaticTextField.class);
069: registerChild(STARTPOINTLIST_VIEW, StartPointsListView.class);
070:
071: }
072:
073: /**
074: * create child component
075: *
076: * @param name of component
077: * @return child component
078: */
079: protected View createChild(String name) {
080: View Headerchild = super .createChild(name);
081: if (Headerchild != null)
082: return Headerchild;
083: if (name.equals(ENABLE_LABEL)) {
084: return new StaticTextField(this , ENABLE_LABEL, "Enable");
085: }
086: if (name.equals(STARTPOINT_LABEL)) {
087: return new StaticTextField(this , STARTPOINT_LABEL,
088: "Starting Point");
089: }
090: if (name.equals(DEPTH_LABEL)) {
091: return new StaticTextField(this , DEPTH_LABEL, "Depth");
092: }
093: if (name.equals(STARTPOINTLIST_VIEW)) {
094: return new StartPointsListView(this , STARTPOINTLIST_VIEW);
095: }
096:
097: throw new IllegalArgumentException("Invalid child name ["
098: + name + "]");
099: }
100:
101: public void beginDisplay(DisplayEvent event) {
102: setPageEncoding();
103: }
104:
105: }
|