Example usage for com.google.gwt.dom.client Element getTitle

List of usage examples for com.google.gwt.dom.client Element getTitle

Introduction

In this page you can find the example usage for com.google.gwt.dom.client Element getTitle.

Prototype

@Override
    public String getTitle() 

Source Link

Usage

From source file:com.alkacon.geranium.client.ui.TabbedPanel.java

License:Open Source License

/**
 * Disables the tab with the given index.<p>
 * //w  w w.  j  av  a2  s.  c  o m
 * @param tabContent the content of the tab that should be disabled
 * @param reason the reason why the tab is disabled
 */
public void disableTab(E tabContent, String reason) {

    Integer index = new Integer(m_tabPanel.getWidgetIndex(tabContent));
    Element tab = getTabElement(index.intValue());
    if ((tab != null) && !m_disabledTabIndexes.containsKey(index)) {
        if (ClientStringUtil.isNotEmptyOrWhitespaceOnly(tab.getTitle())) {
            m_disabledTabIndexes.put(index, tab.getTitle());
        } else {
            m_disabledTabIndexes.put(index, "");
        }
        tab.addClassName(I_LayoutBundle.INSTANCE.tabbedPanelCss().tabDisabled());
        tab.setTitle(reason);
    }
}

From source file:com.goodow.wave.client.wavepanel.blip.SetColor.java

License:Apache License

@Override
public void onBrowserEvent(final Event event) {
    if (DOM.eventGetType(event) == Event.ONCLICK) {
        if (changeElm == null) {
            Window.alert("changeElm is null!");
            return;
        }// w  w  w .ja  v  a2  s . c om

        NodeList<Element> aTags = changeElm.getElementsByTagName("span");
        Element aTag = aTags.getItem(1);
        Element elm = Element.as(event.getEventTarget());
        Style elmStyle = elm.getStyle();
        Style aTagStyle = aTag.getStyle();

        if (elm.getTitle().equals("White") || elm.getTitle().equals("20% Black")) {
            aTagStyle.setBackgroundColor(elmStyle.getBackgroundColor());
            aTagStyle.setColor("black");
            aTagStyle.setBorderStyle(BorderStyle.SOLID);
            aTagStyle.setBorderWidth(1, Unit.PX);
            aTagStyle.setBorderColor("black");
            aTagStyle.setTextDecoration(TextDecoration.NONE);
        } else {
            if (!aTagStyle.getBorderWidth().equals("")) {
                aTagStyle.clearBorderColor();
                aTagStyle.clearBorderStyle();
                aTagStyle.clearBorderWidth();
            }
            aTagStyle.setTextDecoration(TextDecoration.NONE);
            aTagStyle.setBackgroundColor(elmStyle.getBackgroundColor());
            aTagStyle.setColor("white");
        }
        // Window.alert("title:" + elm.getTitle() + ";color:" + elm.getStyle().getBackgroundColor());
    }
}

From source file:org.kuali.continuity.admin.main.client.CriticalFunction.java

License:Educational Community License

public void onModuleLoad() {

    RootPanel rootPanel = RootPanel.get("gwtRoot");
    rootPanel.setWidth("642");
    Element screenelement = DOM.getElementById("itemdata");
    Element formelement = DOM.getElementById("formelement");
    Element pluralelement = DOM.getElementById("plural");
    String panelHeight = "250px";
    String planBoxWidth = "275px";

    String pageInfo = screenelement.getTitle();
    String pageTitle = screenelement.getTitle();
    String proxyUrl = "./items.lst";
    itemService = (SimpleServiceAsync) GWT.create(SimpleService.class);

    rootPanel.add(dockPanel);//w  w w  . j  a v a 2  s.c om

    // set token
    String token = Cookies.getCookie(CSRF_TOKEN);
    csrfToken.setValue(token);
    rootPanel.add(csrfToken);

    dockPanel.add(horizontalPanel, DockPanel.NORTH);
    horizontalPanel.setSize("601px", panelHeight);
    VerticalPanel leftPanel = new VerticalPanel();
    leftPanel.add(new Label("Available Plans"));
    leftPanel.add(availablePlanListBox);

    horizontalPanel.add(leftPanel);

    availablePlanListBox.setWidth(planBoxWidth);
    availablePlanListBox.setVisibleItemCount(listBoxHeight);
    availablePlanListBox.addClickListener(new ClickListener() {
        public void onClick(final Widget arg0) {
            if (availablePlanListBox.getSelectedIndex() >= 0)
                if (availablePlanListBox.getSelectedIndex() <= availablePlanListBox.getItemCount()) {
                    int index = availablePlanListBox.getSelectedIndex();
                    Integer planId = Integer.parseInt(availablePlanListBox.getValue(index));

                    criticalFunctionLabel.setText(" - " + availablePlanListBox.getItemText(index));
                    itemService.getStringArray("function", planId, callbackGetFunctions);
                }
        }

    });
    examplePlanListBox.setWidth(planBoxWidth);
    examplePlanListBox.addClickListener(new ClickListener() {
        public void onClick(final Widget arg0) {
            int index = examplePlanListBox.getSelectedIndex();
            if (index >= 0)
                if (index < examplePlanListBox.getItemCount()) {
                    // Window.alert("" +
                    // examplePlanListBox.getSelectedIndex()
                    // + " " + examplePlanListBox.getItemCount());
                    Integer planId = Integer.parseInt(examplePlanListBox.getValue(index));

                    //Window.alert("Before getting plans for plan id " + planId);
                    // criticalFunctionLabel.setText(" - "+examplePlanListBox
                    // .getItemText(index));
                    criticalFunctionLabel.setText(" - " + examplePlanListBox.getItemText(index));
                    itemService.getStringArray("function", planId, callbackGetFunctions);
                }
        }
    });
    availablePlanListBox.addChangeListener(new ChangeListener() {

        public void onChange(Widget arg0) {
            // Window.alert("Double click "+availablePlanListBox.getItemText(
            // availablePlanListBox.getSelectedIndex()));
            addMethod();

        }
    });
    examplePlanListBox.addChangeListener(new ChangeListener() {

        public void onChange(Widget arg0) {
            // Window.alert("Double click "+availablePlanListBox.getItemText(
            // availablePlanListBox.getSelectedIndex()));
            removeMethod();

        }
    });
    itemRootName = pageInfo.toLowerCase();

    VerticalPanel topFiller = new VerticalPanel();
    String midwid = "90px";
    topFiller.setSize(midwid, "90px");
    topFiller.add(new Label(" "));
    midPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    midPanel.add(topFiller);
    horizontalPanel.add(midPanel);

    midPanel.add(addButton);
    addButton.addClickListener(new ClickListener() {
        public void onClick(final Widget arg0) {
            // Get plan from Available Plan List
            // Remove it and add it to example plan List
            addMethod();

        }
    });
    // addButton.setText("Add >");

    VerticalPanel midFiller = new VerticalPanel();
    midFiller.setSize(midwid, "12px");
    midFiller.add(new Label(" "));
    midPanel.add(midFiller);
    midPanel.add(removeButton);
    removeButton.addClickListener(new ClickListener() {
        public void onClick(final Widget arg0) {
            // Get selected item from example Plan List
            // Remove it from selected List and add it to
            // Available list.
            removeMethod();

        }
    });
    // removeButton.setText("< Remove ");
    VerticalPanel rightPanel = new VerticalPanel();
    rightPanel.add(new Label("Selected Plans"));
    rightPanel.add(examplePlanListBox);
    horizontalPanel.add(rightPanel);

    examplePlanListBox.setVisibleItemCount(listBoxHeight);
    examplePlanListBox.addClickListener(new ClickListener() {
        public void onClick(final Widget arg0) {
            // Show functions for the current plan.
            //itemService.getStringArray("function", thisInstitution,callbackGetPlans);
        }
    });

    horizontalPanel_1.setSize("601px", "128px");
    VerticalPanel bottom = new VerticalPanel();
    AbsolutePanel bottomLabelPanel = new AbsolutePanel();
    // HorizontalPanel bottomLabelPanelLeft = new HorizontalPanel();

    // bottomLabelPanelLeft.setWidth("220px");
    // bottomLabelPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    // bottomLabelPanelLeft.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    // bottomLabelPanel.add(bottomLabelPanelLeft);

    final Label cfTitle = new Label("Critical Functions of Plan");
    bottomLabelPanel.add(cfTitle, 0, 0);

    cfTitle.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    // functionLabelPanel.add(spacer);
    criticalFunctionLabel.setStyleName("AttentionClass2");
    bottomLabelPanel.add(criticalFunctionLabel, 140, 0);
    criticalFunctionLabel.setWidth("341px");
    bottomLabelPanel.setHeight("12px");
    criticalFunctionLabel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    // criticalFunctionLabel.setText("Hi there Joe Smudley");

    // HorizontalPanel functionLabelPanel = new HorizontalPanel();
    // functionLabelPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    // functionLabelPanel.setWidth("136px");

    // bottomLabelPanel.add(functionLabelPanel, 409, 0);

    bottom.add(bottomLabelPanel);
    bottom.add(criticalFunctionsListBox);
    horizontalPanel_1.add(bottom);
    criticalFunctionsListBox.setWidth("642px");
    criticalFunctionsListBox.setVisibleItemCount(10);

    // Button Bar
    backButton.setText("Back");
    backButton.setStyleName("ButtonClass");
    backButton.addClickListener(new ClickListener() {
        public void onClick(final Widget sender) {
            showErr(false);
            redirect("/continuity/admin/adminHome");
        }
    });
    viewButton.setText("View User-Screen");
    viewButton.setStyleName("ButtonClass");
    viewButton.addClickListener(new ClickListener() {
        public void onClick(final Widget sender) {
            showErr(false);
            redirect("/continuity/plan/getCriticalFunctionExamples");
        }
    });
    saveButton.setText("Save Selections");
    saveButton.setStyleName("ButtonClass");

    saveButton.addClickListener(new ClickListener() {
        public void onClick(final Widget sender) {
            showErr(false);
            NamedItem item = new NamedItem();
            item.setId(currentId);
            // Create plan list
            String planString = "";
            String comma = "";
            for (int i = 0; i < examplePlanListBox.getItemCount(); i++) {
                String planId = examplePlanListBox.getValue(i);
                planString += comma + planId;
                comma = ",";
            }
            item.setName(planString);
            item.setCsrfToken(csrfToken.getValue());
            itemService.updateItem("function", item, callbackUpdate);
        }
    });

    buttonBar.add(left, DockPanel.WEST);
    left.setWidth("200px");
    right.setWidth("440px");
    right.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
    left.add(backButton);
    right.add(saveButton);
    right.add(viewButton);
    buttonBar.add(right, DockPanel.EAST);

    buttonBar.setSize(screenWidth, "58px");
    dockPanel.add(buttonBar, DockPanel.SOUTH);
    dockPanel.add(horizontalPanel_1, DockPanel.SOUTH);
    // Begin load process.
    // Get Function Example list
    itemService.getItem("function", thisInstitution, callbackLoad);

    // formGrid.addFormItem("Order", orderBox);

}

From source file:org.kuali.continuity.admin.main.client.Dependency.java

License:Educational Community License

public void onModuleLoad() {
    // Top level info

    itemService = (ItemServiceAsync) GWT.create(ItemService.class);

    Element screenelement = DOM.getElementById("itemdata");
    Element formelement = DOM.getElementById("formelement");
    Element pluralelement = DOM.getElementById("plural");
    String plural = pluralelement.getTitle();

    String pageInfo = screenelement.getTitle();
    String pageTitle = screenelement.getTitle();
    String proxyUrl = "./items";
    String formItemName = pageTitle;
    itemRootName = pageInfo;//from  w  ww.j av  a 2s  . c  o  m
    // Grid
    RecordDef recordDef = new RecordDef(new FieldDef[] { new StringFieldDef("id"), new StringFieldDef("name"),
            new IntegerFieldDef("order"), new StringFieldDef("description") });

    super.onModuleLoad(plural, proxyUrl, columnModel, recordDef);
    this.formController = dependencyFormController;

    // Buttons

    this.setButtonNames(pageTitle);

    // Heading
    this.setHeadingName(plural + " Setup");

    // Form Data
    textBox.setMaxLength(50);
    textBox.setWidth("335px");
    flexForm.addFormItem(formItemName, textBox);
    type.setVisibleItemCount(1);

    type.addItem("--Select--", "2");
    type.addItem("Upstream", "1");
    type.addItem("Downstream", "0");
    flexForm.addFormItem("Type", type);
    flexForm.addFormItem("Order", orderBox);

    // set token
    String token = Cookies.getCookie(CSRF_TOKEN);
    csrfToken.setValue(token);
    flexForm.registerWidget(csrfToken);

    gridPanel.setCls(".myclass");
    itemRootName = itemRootName.toLowerCase();
}

From source file:org.kuali.continuity.admin.main.client.Faq.java

License:Educational Community License

public void onModuleLoad() {
    // Grid/*from  w  ww . jav  a 2  s .  c om*/
    String proxyUrl = "./items.lst";
    // gpheight="250px";
    Element dataelement = DOM.getElementById("dataelement");
    itemRootName = dataelement.getTitle();
    this.formController = fc;
    itemService = (ItemServiceAsync) GWT.create(ItemService.class);

    onModuleLoad("FAQs", proxyUrl, columnModel, recordDef);
    // questionCol.setCss("white-space:wrap !important;");
    // answerCol.setCss("white-space:wrap !important;");   
    // Buttons

    setButtonNames("FAQ");

    // Heading
    String plural = "Frequently Asked Questions";
    setHeadingName(plural + " Setup");

    // Form
    // Fields: Order
    HorizontalPanel formdata = new HorizontalPanel();
    formdata.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    flexForm.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    flexForm.addIdentifiedItem(new HTML("<B>Order</B>"), orderBox);
    formPanel.add(formdata);
    // Create Rich Text Area
    richBox1.ensureDebugId("cwRichText-area");
    richBox1.setSize("642px", "6em");
    richBox1.setStyleName("select");
    richBox1.setStylePrimaryName("select");

    RichTextToolbar toolbar1 = new RichTextToolbar(richBox1);

    toolbar1.ensureDebugId("cwRichText-toolbar");
    toolbar1.setWidth("642px");
    Grid grid1 = new Grid(2, 1);
    grid1.setStyleName("cw-RichText");
    grid1.setWidget(0, 0, toolbar1);
    grid1.setWidget(1, 0, richBox1);

    flexForm.addRow();
    flexForm.addIdentifiedItemVertical(new HTML("<B>Question</B>"), grid1);
    richBox2.ensureDebugId("cwRichText-area");
    richBox2.setSize("642px", "8em");
    richBox2.setStyleName("r-text");
    RichTextToolbar toolbar2 = new RichTextToolbar(richBox2);
    toolbar2.ensureDebugId("cwRichText-toolbar");
    toolbar2.setWidth("642px");
    Grid grid2 = new Grid(2, 1);
    grid2.setStyleName("cw-RichText");
    grid2.setWidget(0, 0, toolbar2);
    grid2.setWidget(1, 0, richBox2);
    flexForm.addRow();
    flexForm.addIdentifiedItemVertical(new HTML("<B>Answer</B>"), grid2);
    flexForm.registerWidget(richBox1);
    flexForm.registerWidget(richBox2);
    itemRootName = "faq";

    // set token
    String token = Cookies.getCookie(CSRF_TOKEN);
    csrfToken.setValue(token);
    flexForm.registerWidget(csrfToken);

}

From source file:org.kuali.continuity.admin.main.client.Knowledge.java

License:Educational Community License

public void onModuleLoad() {
    // Grid//from  ww w . j a  va  2  s  .  co m

    itemService = (ItemServiceAsync) GWT.create(ItemService.class);
    Element dataelement = DOM.getElementById("dataelement");
    itemRootName = dataelement.getTitle();

    // Buttons;
    onModuleLoad("Things to Know");
    setButtonNames("Item");

    // Heading
    String plural = "Things to Know as You Plan";
    setHeadingName(plural + " Setup");

    // Form
    // Rich Text Area. 
    FormPanel extFormPanel = new FormPanel();
    extFormPanel.setFrame(false);
    extFormPanel.setWidth(642);
    extFormPanel.setLabelAlign(Position.TOP);
    extFormPanel.add(gridPanel);
    HtmlEditor htmlEditor = new HtmlEditor("Item", "knowledge");
    htmlEditor.setHeight(textht);
    htmlEditor.setPixelSize(622, textht);
    htmlEditor.setEnableFont(true);
    htmlEditor.setEnableFontSize(true);
    extFormPanel.add(htmlEditor, new AnchorLayoutData("98%"));
    flexForm.addFormItem("Order", orderBox);

    formPanel.add(extFormPanel);

    gridPanel.setCls(".myclass");

}

From source file:org.kuali.continuity.admin.main.client.MajorDivision.java

License:Educational Community License

public void onModuleLoad() {
    // Get parameters from HTML
    Element screenelement = DOM.getElementById("itemdata");
    Element pluralelement = DOM.getElementById("plural");
    Element formelement = DOM.getElementById("formelement");
    Element columnelement = DOM.getElementById("columnelement");
    String formItemName = formelement.getTitle();
    String plural = pluralelement.getTitle();
    String pageInfo = screenelement.getTitle();
    String columnTitle = columnelement.getTitle();

    // Set Columns.
    ColumnConfig divisionCol = new ColumnConfig(columnTitle, "name", gcsize[0], true);
    ColumnModel columnModel = new ColumnModel(new ColumnConfig[] { divisionCol });

    // Set backend.
    this.formController = sf;

    // Set up form.
    formItemName = this.setElementNames(columnModel, recordDef);

    // MajorDivision.java also handles Instructional Departments which is also 50.
    // MajorDivision requires a form label of "Major Division" which is wider than "Name."

    textBox.setMaxLength(50);//  w w  w  .j  a va  2 s.com
    HTML formItemHTML = null;
    /* There is probably a way to measure the HTML once created and subtract from the form
     * width.  However, according to experiments with FireBug, we would still
     * need the non-breaking space in the label to represent it on one line.
     */
    if (pageInfo.equals("Division")) {
        formItemHTML = new HTML("Major&nbsp;Division"); // Setup to prevent splitting
        textBox.setWidth("550px");
    } else {
        textBox.setWidth("600px");
        formItemHTML = new HTML(formItemName);

    }
    flexForm.addIdentifiedItem(formItemHTML, textBox);
    itemRootName = pageInfo.toLowerCase(); // Backend Item 
    this.formController = sf;

    // set token
    String token = Cookies.getCookie(CSRF_TOKEN);
    csrfToken.setValue(token);
    flexForm.registerWidget(csrfToken);
}

From source file:org.kuali.continuity.admin.main.client.Reference.java

License:Educational Community License

public String setElementNames() {
    Element gwtRoot = DOM.getElementById("gwtRoot");
    itemService = (ItemServiceAsync) GWT.create(ItemService.class);
    Element screenelement = DOM.getElementById("itemdata");
    Element formelement = DOM.getElementById("formelement");
    Element dataelement = DOM.getElementById("dataelement");
    Element pluralelement = DOM.getElementById("plural");

    String pageInfo = screenelement.getTitle();
    String pageTitle = screenelement.getTitle();
    String proxyUrl = "./items.lst"; // ListService name.
    String formItemName = pageInfo;
    String columnTitle = formItemName;
    if (null != DOM.getElementById("columnelement")) {
        Element columnelement = DOM.getElementById("columnelement");
        columnTitle = columnelement.getTitle();
    }//from   www  .j  a v  a  2  s .co m
    //  Window.alert("Setting Name header to: "+columnTitle+"|"+nameColumn.getHeader());
    simplecolumnModel = new ColumnModel(new ColumnConfig[] { orderColumn, nameColumn });
    //  Window.alert("Name header is: "+simplecolumnModel.getColumnHeader(1));

    simplecolumnModel.setColumnHeader(1, columnTitle);
    itemRootName = pageInfo;
    if (null != formelement) {
        formItemName = formelement.getTitle();
    }
    if (dataelement != null) {
        itemRootName = dataelement.getTitle();
    }
    plural = pluralelement.getTitle();

    RecordDef recordDef = new RecordDef(new FieldDef[] { new StringFieldDef("id"), new StringFieldDef("name"),
            new IntegerFieldDef("order") });
    GridView gridView = new GridView() {
        public String getRowClass(Record record, int index, RowParams rowParams, Store store) {
            rowParams.setBody(Format.format("<p>{0}</p>", record.getAsString("excerpt")));
            return "x-grid3-row-expanded";
        }
    };
    gridPanel.setView(gridView);

    this.formController = refFormController;
    super.onModuleLoadRef(plural, simplecolumnModel);

    this.setButtonNames(pageTitle);
    this.setHeadingName(plural + " Setup");

    // nameColumn.setHeader(pageInfo);
    return formItemName;
}

From source file:org.kuali.continuity.admin.main.client.Role.java

License:Educational Community License

public void onModuleLoad() {
    this.formController = sf;
    String formItemName = this.setElementNames(columnModel, recordDef);

    // Form //from  ww w.java 2 s  .  co  m

    Element pluralelement = DOM.getElementById("plural");
    String plural = pluralelement.getTitle();

    setHeadingName(plural + " Setup");
    textBox.setMaxLength(50);
    textBox.setWidth("500px");
    //   VerticalPanel formPanel= new VerticalPanel();
    this.setFormPanel(formPanel);
    //   AbsolutePanel abs = new AbsolutePanel();
    //   formPanel.add(abs);
    //   abs.setSize("642px", "200px");

    //      flexForm.addUnlabeledItem(new ListBox());
    //      flexForm.addRow();
    //      
    //       flexForm.addFormItem(formItemName, textBox);
    //       flexForm.addFormItem("Order", orderBox);
    //      final ListBox universityListBox = new ListBox();
    //      flexForm.addUnlabeledItem( universityListBox);

    // Search and Trust Section.
    final Label firstSearchLabel = new Label("First Name");
    final TextBox firstSearchTextBox = new TextBox();
    // flexForm.addLabeledItem(firstSearchLabel, firstSearchTextBox);

    final ListBox universityListBox = new ListBox();
    flexForm.addUnlabeledItem(universityListBox);

    // Search and Trust Section.
    // final Label firstSearchLabel = new Label("First Name");
    // final TextBox firstSearchTextBox = new TextBox();
    flexForm.addLabeledItem(firstSearchLabel, firstSearchTextBox);

    final Label lastSearchLabel = new Label("Last Name");
    final Image searchButton = new Image("Search2.gif");
    final TextBox lastSearchTextBox = new TextBox();
    flexForm.addLabeledItem(lastSearchLabel, lastSearchTextBox);
    flexForm.addRow();

    // Not visible: User Key Info.
    final TextBox idTextBox = new TextBox();

    // Main Form
    final Image formImage = new Image("spacer.gif");
    flexForm.addRow();
    final Label firstNameLabel = new Label("First Name");
    final TextBox firstNameTextBox = new TextBox();
    flexForm.addLabeledItem(firstNameLabel, firstNameTextBox);

    final Label lastNameLabel = new Label("Last Name");
    final TextBox lastNameTextBox = new TextBox();
    flexForm.addLabeledItem(lastNameLabel, lastNameTextBox);

    final ListBox roleListBox = new ListBox();
    flexForm.addFormItem("Role", roleListBox);
    flexForm.addRow();

    final Label titleLabel = new Label("Title");
    final TextBox titleTextBox = new TextBox();
    flexForm.addFormItem("Title", titleTextBox);

    final Label departmentLabel = new Label("Department");
    final TextBox departmentTextBox = new TextBox();
    flexForm.addFormItem("Department", departmentTextBox);

    final Label emailLabel = new Label("EMail");
    final TextBox emailTextBox = new TextBox();

    final Label phoneLabel = new Label("Phone");
    final TextBox phoneTextBox = new TextBox();

    final Label loginLabel = new Label("Login Name");
    final TextBox loginTextBox = new TextBox();

    final Label passwordLabel = new Label("Password");
    final PasswordTextBox passwordTextBox = new PasswordTextBox();

    final Label accessLabel = new Label("Access");
    final ListBox accessListBox = new ListBox();
    flexForm.addRow();
    final Label directoryidLabel = new Label("DirectoryID");
    final TextBox directoryidTextBox = new TextBox();
    flexForm.addLabeledItem(directoryidLabel, directoryidTextBox);

}

From source file:org.kuali.continuity.admin.main.client.SimpleGridViewer.java

License:Educational Community License

public String setElementNames(Class remoteServiceClass) {
    Element gwtRoot = DOM.getElementById("gwtRoot");
    // remoteServiceClass
    itemService = (ItemServiceAsync) GWT.create(ItemService.class);
    Element screenelement = DOM.getElementById("itemdata");
    Element formelement = DOM.getElementById("formelement");
    Element pluralelement = DOM.getElementById("plural");
    Element dataelement = DOM.getElementById("dataelement");
    Element columnelement = null;

    String pageInfo = screenelement.getTitle();
    String pageTitle = screenelement.getTitle();
    String proxyUrl = "./items.lst"; //ListService name.
    String columnTitle = "Name";
    try {//from   w w w  .j  ava2  s. c o  m
        if (null != DOM.getElementById("columnelement")) {
            columnelement = DOM.getElementById("columnelement");
            columnTitle = columnelement.getTitle();
        }
    } catch (Exception e) {
        // We don't care.
    }
    String formItemName = pageInfo;
    itemRootName = pageInfo.toLowerCase();
    if (null != formelement) {
        formItemName = formelement.getTitle();
    }
    if (null != dataelement) {
        itemRootName = dataelement.getTitle().toLowerCase();

    }
    String plural = pluralelement.getTitle();
    RecordDef recordDef = new RecordDef(new FieldDef[] { new StringFieldDef("id"), new StringFieldDef("name"),
            new IntegerFieldDef("order") });

    this.setButtonNames(pageTitle);
    this.setHeadingName(plural + " Setup");

    //  Window.alert("Name header is: "+nameColumn.getHeader());
    nameColumn.setHeader(columnTitle);
    //  Window.alert("Setting Name header to: "+columnTitle+"|"+nameColumn.getHeader());
    simplecolumnModel = new ColumnModel(new ColumnConfig[] { orderColumn, nameColumn });
    //  Window.alert("Name header is: "+simplecolumnModel.getColumnHeader(1));

    simplecolumnModel.setColumnHeader(1, columnTitle);
    // Window.alert("Setting header to: "+columnTitle+"|"+simplecolumnModel.getColumnHeader(1));

    onModuleLoad(plural);
    return formItemName;
}