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

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


    // if the user selected showsimple, remove showfull.
    if (showfull != null && request.getParameter("showsimple") != null)
      showfull = null;

    Division div = body.addInteractiveDivision("resume-submission", actionURL, Division.METHOD_POST, "primary submission");
    div.setHead(T_submission_head);


    if (showfull == null)
    {
      ReferenceSet referenceSet = div.addReferenceSet("submission",ReferenceSet.TYPE_SUMMARY_VIEW);
      referenceSet.addReference(item);
      div.addPara().addButton("showfull").setValue(T_showfull);
    }
    else
    {
      ReferenceSet referenceSet = div.addReferenceSet("submission",ReferenceSet.TYPE_DETAIL_VIEW);
      referenceSet.addReference(item);
      div.addPara().addButton("showsimple").setValue(T_showsimple);

      div.addHidden("showfull").setValue("true");
    }


    List form = div.addList("resume-submission",List.TYPE_FORM);

    org.dspace.app.xmlui.wing.element.Item actions = form.addItem();
    actions.addButton("submit_resume").setValue(T_submit_resume);
    actions.addButton("submit_cancel").setValue(T_submit_cancel);
  }
View Full Code Here


      default: dso = null;
    }

   
        // DIVISION: edit-container-policies
        Division main = body.addInteractiveDivision("edit-policy",contextPath+"/admin/authorize",Division.METHOD_POST,"primary administrative authorization");
       
        if (policyID >= 0) {
          objectID = policy.getResourceID();
          objectType = policy.getResourceType();
          main.setHead(T_main_head_edit.parameterize(policyID,Constants.typeText[objectType],objectID));
        }
        else
          main.setHead(T_main_head_new.parameterize(Constants.typeText[objectType],objectID));
   
      int resourceRelevance = 1 << objectType;
   
   
      // DIVISION: authorization-actions
        Division actions = main.addDivision("edit-policy-actions");
       
        List actionsList = actions.addList("actions","form");
       
        // actions radio buttons
        actionsList.addLabel(T_label_action);
        Item actionSelectItem = actionsList.addItem();
        Radio actionSelect = actionSelectItem.addRadio("action_id");
        actionSelect.setLabel(T_label_action);
            //Select actionSelect = actionSelectItem.addSelect("action_id");
            //actionsBox.addContent(T_label_action);
            //Select actionSelect = actionsBox.addSelect("action_id");
        for( int i = 0; i < Constants.actionText.length; i++ )
        {
            // only display if action i is relevant
            //  to resource type resourceRelevance                            
            if( (Constants.actionTypeRelevance[i] & resourceRelevance) > 0)
            {
              if (actionID == i)
                actionSelect.addOption(true, i, Constants.actionText[i]);
              else
                actionSelect.addOption(i, Constants.actionText[i]);
            }
        }
        if (errors.contains("action_id"))
          actionSelect.addError(T_error_no_action);       
       
       
        // currently set group
        actionsList.addLabel(T_policy_currentGroup);
      Select groupSelect = actionsList.addItem().addSelect("group_id");
      groupSelect.setSize(5);
      for (Group group : Group.findAll(context, Group.NAME))
      {
        if (group == currentGroup)
          groupSelect.addOption(true, group.getID(), group.getName());
        else
          groupSelect.addOption(group.getID(), group.getName());
      }
      if (errors.contains("group_id"))
        groupSelect.addError(T_error_no_group);
     
       
        // the search function
        actionsList.addLabel(T_label_search);
        Item searchItem = actionsList.addItem();
        Text searchText = searchItem.addText("query");
        if (!query.equals(new String("-1")))
          searchText.setValue(query);
        searchItem.addButton("submit_search_groups").setValue(T_submit_search_groups);
       
       
        actionsList.addLabel();
        Item buttons = actionsList.addItem();
        buttons.addButton("submit_save").setValue(T_submit_save);
        buttons.addButton("submit_cancel").setValue(T_submit_cancel);
       
       
      // Display the search results table
        if (!query.equals(new String("-1"))) {
          Division groupsList = main.addDivision("edit-policy-groupsList");
            groupsList.setHead(T_groups_head)
          this.addGroupSearch(groupsList, currentGroup, dso, query, page);
        }        
        
      main.addHidden("administrative-continue").setValue(knot.getId());
   }
View Full Code Here

  {
    int communityID = parameters.getParameterAsInteger("communityID", -1);
    Community parentCommunity = Community.find(context, communityID);
   
    // DIVISION: main
      Division main = body.addInteractiveDivision("create-collection",contextPath+"/admin/collection",Division.METHOD_MULTIPART,"primary administrative collection");
      main.setHead(T_main_head.parameterize(parentCommunity.getMetadata("name")));
         
     
      // The grand list of metadata options
      List metadataList = main.addList("metadataList", "form");
     
      // collection name
      metadataList.addLabel(T_label_name);
      Text name = metadataList.addItem().addText("name");
      name.setSize(40);
     
      // short description
      metadataList.addLabel(T_label_short_description);
      Text short_description = metadataList.addItem().addText("short_description");
      short_description.setSize(40);
     
      // introductory text
      metadataList.addLabel(T_label_introductory_text);
      TextArea introductory_text = metadataList.addItem().addTextArea("introductory_text");
      introductory_text.setSize(6, 40);
     
      // copyright text
      metadataList.addLabel(T_label_copyright_text);
      TextArea copyright_text = metadataList.addItem().addTextArea("copyright_text");
      copyright_text.setSize(6, 40);
     
      // legacy sidebar text; may or may not be used for news
      metadataList.addLabel(T_label_side_bar_text);
      TextArea side_bar_text = metadataList.addItem().addTextArea("side_bar_text");
      side_bar_text.setSize(6, 40);
     
      // license text
      metadataList.addLabel(T_label_license);
      TextArea license = metadataList.addItem().addTextArea("license");
      license.setSize(6, 40);
     
      // provenance description
      metadataList.addLabel(T_label_provenance_description);
      TextArea provenance_description = metadataList.addItem().addTextArea("provenance_description");
      provenance_description.setSize(6, 40);
           
      // the row to upload a new logo
      metadataList.addLabel(T_label_logo);
      metadataList.addItem().addFile("logo");

      Para buttonList = main.addPara();
      buttonList.addButton("submit_save").setValue(T_submit_save);
      buttonList.addButton("submit_cancel").setValue(T_submit_cancel);
     
      main.addHidden("administrative-continue").setValue(knot.getId());
    }
View Full Code Here

    pageMeta.addTrail().addContent(T_main_head);
  }

  public void addBody(Body body) throws SAXException, WingException,
      UIException, SQLException, IOException, AuthorizeException {
    Division main = body.addDivision("export_main");
    main.setHead(T_main_head);

    if (message != null) {
      main.addDivision("success", "success").addPara(message);
    }

    if (errors.size() > 0) {
      Division errors = main.addDivision("export-errors", "error");
      for (Message error : this.errors) {
        errors.addPara(error);
      }
    }

    if (availableExports != null && availableExports.size() > 0) {
      Division avail = main.addDivision("available-exports",
          "available-exports");
      avail.setHead(T_avail_head);

      List fileList = avail.addList("available-files", List.TYPE_ORDERED);
      for (String fileName : availableExports) {
        fileList.addItem().addXref(
            this.contextPath + "/exportdownload/" + fileName,
            fileName);
      }
View Full Code Here

      collections = Collection.findAuthorized(context, null, Constants.ADD);
    }
       
    // Basic form with a drop down list of all the collections
    // you can submit too.
        Division div = body.addInteractiveDivision("select-collection",actionURL,Division.METHOD_POST,"primary submission");
    div.setHead(T_submission_head);
       
        List list = div.addList("select-collection", List.TYPE_FORM);
        list.setHead(T_head);      
        Select select = list.addItem().addSelect("handle");
        select.setLabel(T_collection);
        select.setHelp(T_collection_help);
       
View Full Code Here

  }

  public void addBody(Body body) throws SAXException, WingException,
  UIException, SQLException, IOException, AuthorizeException
 
    Division div = body.addInteractiveDivision("submit-complete",contextPath+"/handle/"+handle+"/submit", Division.METHOD_POST,"primary submission");
    div.setHead(T_head);
   
    div.addPara(T_info1);
   
    div.addPara().addXref(contextPath+"/submissions",T_go_submission);
      
      div.addPara().addButton("submit_again").setValue(T_submit_again);
      div.addHidden("handle").setValue(handle);
  }
View Full Code Here

   

    public void addBody(Body body) throws SAXException, WingException,
            UIException, SQLException, IOException, AuthorizeException
    {
        Division search =
          body.addInteractiveDivision("front-page-search",contextPath+"/search",Division.METHOD_GET,"primary");
       
        search.setHead(T_head);
       
        search.addPara(T_para1);
       
        Para fields = search.addPara();
        fields.addText("query");
        fields.addButton("submit").setValue(T_go);
    }
View Full Code Here

  UIException, SQLException, IOException, AuthorizeException
 
    Collection collection = submission.getCollection();
    String actionURL = contextPath + "/handle/"+collection.getHandle() + "/submit/" + knot.getId() + ".continue";

    Division div = body.addInteractiveDivision("submit-save-or-cancel",actionURL, Division.METHOD_POST,"primary submission");
    div.setHead(T_submission_head);
    addSubmissionProgressList(div);
   
    List saveOrCancel = div.addList("submit-review", List.TYPE_FORM);
 
    saveOrCancel.setHead(T_head);
    saveOrCancel.addItem(T_info1);
   
        org.dspace.app.xmlui.wing.element.Item actions = saveOrCancel.addItem();
View Full Code Here

  {
    int collectionID = parameters.getParameterAsInteger("collectionID", -1);
    Collection thisCollection = Collection.find(context, collectionID);
   
    // DIVISION: main
      Division main = body.addInteractiveDivision("collection-confirm-delete",contextPath+"/admin/collection",Division.METHOD_POST,"primary administrative collection");
      main.setHead(T_main_head.parameterize(collectionID));
      main.addPara(T_main_para.parameterize(thisCollection.getMetadata("name")));     
      List deleteConfirmHelp = main.addList("consequences",List.TYPE_BULLETED);
      deleteConfirmHelp.addItem(T_confirm_item1);
      deleteConfirmHelp.addItem(T_confirm_item2);
      deleteConfirmHelp.addItem(T_confirm_item3);
     
      Para buttonList = main.addPara();
      buttonList.addButton("submit_confirm").setValue(T_submit_confirm);
      buttonList.addButton("submit_cancel").setValue(T_submit_cancel);
     
      main.addHidden("administrative-continue").setValue(knot.getId());
    }
View Full Code Here

        catch (org.apache.avalon.framework.parameters.ParameterException e)
        {
            throw new UIException("Missing a required parameter",e);
        }

        Division idiv = body.addInteractiveDivision("lookup", "", "get", "popup");
        if (isFieldMessage(field, "title"))
            idiv.setHead(getFieldMessage(field, "title"));
        else
            idiv.setHead(getFieldLabel(field, "title"));
        List fl = idiv.addList("choicesList", "form", "choices-lookup");
        fl.setHead(T_results);

        // the <select> tag, and param values
        Item selectItem = fl.addItem("select", "choices-lookup");
        Select s = selectItem.addSelect("chooser", "choices-lookup");
View Full Code Here

TOP

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

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.