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

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


    }
 
 
  private void addAdministratorOnlyButton(Cell cell, String buttonName, Message buttonLabel) throws WingException, SQLException
  {
      Button button = cell.addButton(buttonName);
      button.setValue(buttonLabel);
      if (!AuthorizeManager.isAdmin(context))
      {
        // Only admins can create or delete
        button.setDisabled();
        cell.addHighlight("fade").addContent(T_sysadmins_only);
      }
  }
View Full Code Here


                            {
                                mdValue.setAuthorityControlled();
                                mdValue.setAuthorityRequired(MetadataAuthorityManager.getManager().isAuthorityRequired(fieldKey));
                                Value authValue =  mdValue.setAuthorityValue((value.authority == null)?"":value.authority, Choices.getConfidenceText(value.confidence));
                                // add the "unlock" button to auth field
                                Button unlock = authValue.addButton("authority_unlock_"+index,"ds-authority-lock");
                                unlock.setHelp(T_unlock);
                            }
                            if (ChoiceAuthorityManager.getManager().isChoicesConfigured(fieldKey))
                            {
                                mdValue.setChoices(fieldKey);
                                mdValue.setChoicesPresentation(Params.PRESENTATION_LOOKUP);
View Full Code Here

           {
               passwordConfirm.addError(T_error_unconfirmed_password);
           }
       }
      
       Button submit = form.addItem().addButton("submit");
       if (registering)
       {
           submit.setValue(T_submit_update);
       }
       else
       {
           submit.setValue(T_submit_create);
       }
      
       profile.addHidden("eperson-continue").setValue(knot.getId());
      
      
View Full Code Here

        // Non-Field-item
        list.addLabel("Non-Field");
        list.addItem().addContent("This is just text, not a field, but it has a list label.");
       
        // Button
        Button button = list.addItem().addButton("button");
        button.setLabel("Button");
        button.setValue("When you touch me I do things, lots of things");
        if (help)
        {
            button.setHelp("Submit buttons allow the user to submit the form.");
        }
        if (error)
        {
            button.addError("This button is in error.");
        }
       
        // Non-field-unlabeled-item
        list.addItem().addContent("The following fields are all various use cases of composites. Also note that this item is an item inside a list of type form that 1) does not contain a field and 2) does not have a label.");
       
View Full Code Here

        {
            optionsField.setOptionSelected("blankLines");
        }
       
       
        Button submit = form.addItem().addButton("submit");
        submit.setValue("Test HTML Rendering");
       
        Division test = div.addDivision("html-test-sample");
        test.setHead("Rendered Sample");
       
        test.addSimpleHTMLFragment(blankLines, fragment);
View Full Code Here

        p.addContent(", embedded in a paragraph.");
       
        // Button
        p = suited.addPara();
    p.addContent("This is a 'Button' field, ");
        Button button = p.addButton("button");
        button.setLabel("Button");
        button.setValue("When you touch me I do things, lots of things");
        if (help)
        {
            button.setHelp("Submit buttons allow the user to submit the form.");
        }
        if (error)
        {
            button.addError("This button is in error.");
        }
        p.addContent(", embedded in a paragraph.");
       
       
       
View Full Code Here

    }

    // LIST: actions, confirm or return
    org.dspace.app.xmlui.wing.element.Item actions = main.addList("actions", List.TYPE_FORM).addItem();

    Button confirmButton = actions.addButton("submit_confirm");

    if("delete".equals(confirm))
    {
      confirmButton.setValue(T_submit_delete);
    }
    else if ("reinstate".equals(confirm))
    {
      confirmButton.setValue(T_submit_reinstate);
    }
        else if ("private".equals(confirm))
        {
            confirmButton.setValue(T_submit_private);
        }
        else if ("public".equals(confirm))
        {
            confirmButton.setValue(T_submit_public);
        }
    else if ("withdraw".equals(confirm))
    {
      confirmButton.setValue(T_submit_withdraw);
    }
    actions.addButton("submit_cancel").setValue(T_submit_cancel);

    main.addHidden("administrative-continue").setValue(knot.getId());
  }
View Full Code Here

            }
        }

        // confirmation buttons
        Item buttItem = fl.addItem("confirmation", "choices-lookup");
        Button accept = buttItem.addButton("accept", "choices-lookup");
        accept.setValue(isRepeating ? T_add : T_accept);
        Button more = buttItem.addButton("more", "choices-lookup");
        more.setValue(T_more);
        Button cancel = buttItem.addButton("cancel", "choices-lookup");
        cancel.setValue(T_cancel);
    }
View Full Code Here

    {
        // Only add the button if we have button text and a valid step & page!
        if(buttonText!=null && stepAndPage.isSet())
        {   
            // add a Jump To button for this section
            Button jumpButton = list.addItem("step_" + stepAndPage, renderJumpButton(stepAndPage))
                                    .addButton(AbstractProcessingStep.PROGRESS_BAR_PREFIX + stepAndPage);
            jumpButton.setValue(buttonText);
        }
    }
View Full Code Here

                    cell.addContent(" (" + md + ")");
                    mdrow.addCellContent(dcv.value);
                }
            }
            Para actions = div.addPara();
            Button applychanges = actions.addButton("submit_confirm");
            applychanges.setValue(T_submit_confirm);
            Button cancel = actions.addButton("submit_return");
            cancel.setValue(T_submit_return);
        }
        else
        {
            Para nochanges = div.addPara();
            nochanges.addContent(T_no_changes);
            Para actions = div.addPara();
            Button cancel = actions.addButton("submit_return");
            cancel.setValue(T_submit_return);
        }



        div.addHidden("administrative-continue").setValue(knot.getId());
View Full Code Here

TOP

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

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.