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

Examples of org.dspace.app.xmlui.wing.element.Field


         * @param dcValues
         *                      The field's pre-existing values.
         */
        private void renderSelectFromListField(List form, String fieldName, DCInput dcInput, DCValue[] dcValues, boolean readonly) throws WingException
        {
                Field listField = null;
               
                //if repeatable, this list of fields should be checkboxes
                if (dcInput.isRepeatable())
                {
                        listField = form.addItem().addCheckBox(fieldName);
                }
                else //otherwise this is a list of radio buttons
                {
                        listField = form.addItem().addRadio(fieldName);
                }
               
                if (readonly)
                {
                    listField.setDisabled();
                }
               
                //      Setup the field
                listField.setLabel(dcInput.getLabel());
                listField.setHelp(cleanHints(dcInput.getHints()));
                if (dcInput.isRequired())
                        listField.setRequired();
                if (isFieldInError(fieldName))
                    if (dcInput.getWarning() != null && dcInput.getWarning().length() > 0) {
                        listField.addError(dcInput.getWarning());
                    } else {
                        listField.addError(T_required_field);
                    }

       
                //Setup each of the possible options
                java.util.List<String> pairs = dcInput.getPairs();
View Full Code Here


       List form = register.addList("form",List.TYPE_FORM);
      
       form.addLabel(T_email_address);
       form.addItem(email);
      
       Field password = form.addItem().addPassword("password");
       password.setRequired();
       password.setLabel(T_new_password);
       if (errors.contains("password"))
       {
           password.addError(T_error_invalid_password);
       }
      
       Field passwordConfirm = form.addItem().addPassword("password_confirm");
       passwordConfirm.setRequired();
       passwordConfirm.setLabel(T_confirm_password);
       if (errors.contains("password_confirm"))
       {
           passwordConfirm.addError(T_error_unconfirmed_password);
       }
      
       form.addItem().addButton("submit").setValue(T_submit);
      
       register.addHidden("eperson-continue").setValue(knot.getId());
View Full Code Here

           {
                   security.addItem().addContent(T_update_password_instructions);
           }
          
          
           Field password = security.addItem().addPassword("password");
           password.setLabel(T_password);
           if (registering)
                   password.setRequired();
           if (errors.contains("password"))
           {
               password.addError(T_error_invalid_password);
           }
          
           Field passwordConfirm = security.addItem().addPassword("password_confirm");
           passwordConfirm.setLabel(T_confirm_password);
           if (registering)
                   passwordConfirm.setRequired();
           if (errors.contains("password_confirm"))
           {
               passwordConfirm.addError(T_error_unconfirmed_password);
           }
       }
      
       Button submit = form.addItem().addButton("submit");
       if (registering)
View Full Code Here

       List form = register.addList("form",List.TYPE_FORM);
      
       form.addLabel(T_email_address);
       form.addItem(email);
      
       Field password = form.addItem().addPassword("password");
       password.setRequired();
       password.setAutofocus("autofocus");
       password.setLabel(T_new_password);
       if (errors.contains("password"))
       {
           password.addError(T_error_invalid_password);
       }
      
       Field passwordConfirm = form.addItem().addPassword("password_confirm");
       passwordConfirm.setRequired();
       passwordConfirm.setLabel(T_confirm_password);
       if (errors.contains("password_confirm"))
       {
           passwordConfirm.addError(T_error_unconfirmed_password);
       }
      
       form.addItem().addButton("submit").setValue(T_submit);
      
       register.addHidden("eperson-continue").setValue(knot.getId());
View Full Code Here

           {
                   security.addItem().addContent(T_update_password_instructions);
           }
          
          
           Field password = security.addItem().addPassword("password");
           password.setLabel(T_password);
           if (registering)
           {
               password.setRequired();
           }
           if (errors.contains("password"))
           {
               password.addError(T_error_invalid_password);
           }
          
           Field passwordConfirm = security.addItem().addPassword("password_confirm");
           passwordConfirm.setLabel(T_confirm_password);
           if (registering)
           {
               passwordConfirm.setRequired();
           }
           if (errors.contains("password_confirm"))
           {
               passwordConfirm.addError(T_error_unconfirmed_password);
           }
       }
      
       Button submit = form.addItem().addButton("submit");
       if (registering)
View Full Code Here

         * @param dcValues
         *                      The field's pre-existing values.
         */
        private void renderSelectFromListField(List form, String fieldName, DCInput dcInput, Metadatum[] dcValues, boolean readonly) throws WingException
        {
                Field listField = null;
               
                //if repeatable, this list of fields should be checkboxes
                if (dcInput.isRepeatable())
                {
                        listField = form.addItem().addCheckBox(fieldName);
                }
                else //otherwise this is a list of radio buttons
                {
                        listField = form.addItem().addRadio(fieldName);
                }
               
                if (readonly)
                {
                    listField.setDisabled();
                }
               
                //      Setup the field
                listField.setLabel(dcInput.getLabel());
                listField.setHelp(cleanHints(dcInput.getHints()));
                if (dcInput.isRequired())
                {
                    listField.setRequired();
                }
                if (isFieldInError(fieldName))
                {
                    if (dcInput.getWarning() != null && dcInput.getWarning().length() > 0)
                    {
                        listField.addError(dcInput.getWarning());
                    }
                    else
                    {
                        listField.addError(T_required_field);
                    }
                }

       
                //Setup each of the possible options
View Full Code Here

TOP

Related Classes of org.dspace.app.xmlui.wing.element.Field

Copyright © 2018 www.massapicom. 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.