Package org.dspace.app.xmlui.wing.element

Examples of org.dspace.app.xmlui.wing.element.Text.addError()


                if (dcInput.isRequired())
                        text.setRequired();
                if (isFieldInError(fieldName))
                    if (dcInput.getWarning() != null && dcInput.getWarning().length() > 0) {
                        text.addError(dcInput.getWarning());
                    } else {
                        text.addError(T_required_field);
                    }
                if (dcInput.isRepeatable() && !readonly)
                        text.enableAddOperation();
View Full Code Here


                        text.setRequired();
                if (isFieldInError(fieldName))
                    if (dcInput.getWarning() != null && dcInput.getWarning().length() > 0) {
                        text.addError(dcInput.getWarning());
                    } else {
                        text.addError(T_required_field);
                    }
                if (dcInput.isRepeatable() && !readonly)
                        text.enableAddOperation();
                if ((dcInput.isRepeatable() || dcValues.length > 1) && !readonly)
                        text.enableDeleteOperation();
View Full Code Here

        Text text = p.addText("text");
        text.setLabel("Text");
        if (help)
          text.setHelp("This is helpfull text.");
        if (error)
          text.addError("This field is in error.");
        text.setValue("Current raw value");
        p.addContent(", embedded in a paragraph.");
       
        // Single Checkbox field
        p = suited.addPara();
View Full Code Here

        Text text = list.addItem().addText("text");
        text.setLabel("Text");
        if (help)
          text.setHelp("This is helpfull text.");
        if (error)
          text.addError("This field is in error.");
        text.setValue("Current raw value");
       
        // Long help
        Text longHelp = list.addItem().addText("longHelp");
        longHelp.setLabel("Long Help");
View Full Code Here

        Text longHelp = list.addItem().addText("longHelp");
        longHelp.setLabel("Long Help");
        if (help)
          longHelp.setHelp("This is a really long help message. It could potentially be a paragraph of material, really really long. Actually we don't know how long it can be because there is no upper limit on it! Although if you do find your self adding a long help message consider whether your user will actually read any of this, my bet is that they won't. However we still need to support these really, really, really, long messages that may break across multiple lines!");
        if (error)
          longHelp.addError("This field is in error.");
        longHelp.setValue("Current raw value");
       
        // Long error
        Text longError = list.addItem().addText("longError");
        longError.setLabel("Long Error");
View Full Code Here

        Text longError = list.addItem().addText("longError");
        longError.setLabel("Long Error");
        if (help)
          longError.setHelp("TThis is helpfull text.");
        if (error)
          longError.addError("This field is very much is serious trouble, it's so horrible wrong that i now have to give you a very long stern message that may break across multiple lines! To fix this problem you should examine what you are attempting to do and consider other factors like what might have lead you to this path vs another path. Are you sure you even want this field or might another one work just as well?");
        longError.setValue("Current raw value");
       
        // Text Area Field
        TextArea textArea = list.addItem().addTextArea("textarea");
        textArea.setLabel("Text Area");
View Full Code Here

    Text email = list.addItem().addText("username");
    email.setRequired();
    email.setLabel(T_userName);
    if (previousUserName != null) {
      email.setValue(previousUserName);
      email.addError(T_error_bad_login);
    }

    Item item = list.addItem();
    Password password = item.addPassword("ldap_password");
    password.setRequired();
View Full Code Here

        Text name = identity.addItem().addText("name");
        name.setLabel("Username");
        if (help)
          name.setHelp("The username you wish to chooose");
        if (error)
          name.addError("Sorry, that username is allready used by another user.");
       
        Composite ssn = identity.addItem().addComposite("ssn");
        ssn.setLabel("SSN");
        if (help)
          ssn.setHelp("Your Social Security Number, really we won't use it for anything bad.... you can trust me.");
View Full Code Here

      
       // Prefill with invalid email if this is a retry attempt.
       if (email != null)
           email.setValue(this.email);
       if (errors.contains("email"))
           email.addError(T_error_not_found);
      
       Item submit = form.addItem();
       submit.addButton("submit").setValue(T_submit);
      
       forgot.addHidden("eperson-continue").setValue(knot.getId());
View Full Code Here

    Text id = form.addItem().addText("identifier");
    id.setLabel(T_identifier_label);
    if (identifier != null)
      id.setValue(identifier);
    if (errors.contains("identifier"))
      id.addError(T_identifier_error);
   
    form.addItem().addButton("submit_find").setValue(T_find);
   
    findItem.addHidden("administrative-continue").setValue(knot.getId());
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.