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

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


         */
        options.addList("browse");
        options.addList("account");
        options.addList("context");
        options.addList("administrative");
        List statistics = options.addList("statistics");

        DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
        if(dso != null && dso.getHandle() != null){
            statistics.setHead(T_statistics_head);
            statistics.addItemXref(contextPath + "/handle/" + dso.getHandle() + "/statistics", T_statistics_view);

        }


    }
View Full Code Here


    // DIVISION: group-actions
        Division actions = main.addDivision("group-actions");
        actions.setHead(T_actions_head);
       
        // Browse Epeople
        List actionsList = actions.addList("actions");
        actionsList.addLabel(T_actions_create);
        actionsList.addItemXref(baseURL+"&submit_add", T_actions_create_link);
        actionsList.addLabel(T_actions_browse);
        actionsList.addItemXref(baseURL+"&query&submit_search",T_actions_browse_link);
     
        actionsList.addLabel(T_actions_search);
        org.dspace.app.xmlui.wing.element.Item actionItem = actionsList.addItem();
        Text queryField = actionItem.addText("query");
        if (query != null)
          queryField.setValue(query);
        queryField.setHelp(T_search_help);
        actionItem.addButton("submit_search").setValue(T_go);
View Full Code Here

              buildReferenceSet(referenceSet,node);  
          }
        }
        else
        {
          List list = division.addList("comunity-browser");
         
          ArrayList<TreeNode> rootNodes = root.getChildrenOfType(Constants.COMMUNITY);
          
           for (TreeNode node : rootNodes)
           {
View Full Code Here

          name = ((Collection) dso).getMetadata("name");
       
        String url = contextPath + "/handle/"+dso.getHandle();
        list.addItem().addHighlight("bold").addXref(url, name);
       
        List subList = null;
       
        // Add all the sub-collections;
        ArrayList<TreeNode> collectionNodes = node.getChildrenOfType(Constants.COLLECTION);
        if (collectionNodes != null && collectionNodes.size() > 0)
        {
          subList = list.addList("sub-list-"+dso.getID());
       
            for (TreeNode collectionNode : collectionNodes)
            {
                String collectionName = ((Collection) collectionNode.getDSO()).getMetadata("name");
                String collectionUrl = contextPath + "/handle/"+collectionNode.getDSO().getHandle();
                subList.addItemXref(collectionUrl, collectionName);
            }
        }
       
       
        // Add all the sub-communities
View Full Code Here

    
        div.setHead("HTML Test");
       
        div.addPara("This page tests Manakin's ability to handle HTML fragments, this ability is normally used to handle user-inputed text. There are two reasons for using this ability of including user supplied HTML fragments 1) it doesn't break the abstraction between themes and aspects, 2) it provides a safety mechanism preventing security vulnerabilities such as cross site scripting.");
       
        List form = div.addList("html-test",List.TYPE_FORM);
        TextArea fragmentField = form.addItem().addTextArea("fragment");
        fragmentField.setLabel("Fragment");
        fragmentField.setHelp("Enter free formed text, you may use <p>,<a>,<b>,<i>, or <img> tags.");
        fragmentField.setSize(15, 50);
        fragmentField.setValue(fragment);
       
        CheckBox optionsField = form.addItem().addCheckBox("options");
        optionsField.setLabel("Options");
        optionsField.addOption("blankLines", "Treat blank lines as paragraph breaks.");
        if (blankLines)
          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");
       
View Full Code Here

      
       EPersonUtils.forgottProgressList(register,2);
      
       register.addPara(T_para1);
      
       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

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

                List form = div.addList("submit-describe",List.TYPE_FORM);
                form.setHead(T_head);

                // Iterate over all inputs and add it to the form.
                for(DCInput dcInput : inputs)
                {
                    String scope = submissionInfo.isInWorkflow() ? DCInput.WORKFLOW_SCOPE : DCInput.SUBMISSION_SCOPE;
                    boolean readonly = dcInput.isReadOnly(scope);
                   
                    // If the input is invisible in this scope, then skip it.
                        if (!dcInput.isVisible(scope) && !readonly)
                                continue;
                       
                        String schema = dcInput.getSchema();
                        String element = dcInput.getElement();
                        String qualifier = dcInput.getQualifier();

                        DCValue[] dcValues = item.getMetadata(schema, element, qualifier, Item.ANY);

                        String fieldName = FlowUtils.getFieldName(dcInput);
                        String inputType = dcInput.getInputType();

                        // if this field is configured as choice control and its
                        // presentation format is SELECT, render it as select field:
                        String fieldKey = MetadataAuthorityManager.makeFieldKey(schema, element, qualifier);
                        ChoiceAuthorityManager cmgr = ChoiceAuthorityManager.getManager();
                        if (cmgr.isChoicesConfigured(fieldKey) &&
                            Params.PRESENTATION_SELECT.equals(cmgr.getPresentation(fieldKey)))
                        {
                                renderChoiceSelectField(form, fieldName, collection, dcInput, dcValues, readonly);
                        }
                        else if (inputType.equals("name"))
                        {
                                renderNameField(form, fieldName, dcInput, dcValues, readonly);
                        }
                        else if (inputType.equals("date"))
                        {
                                renderDateField(form, fieldName, dcInput, dcValues, readonly);
                        }
                        else if (inputType.equals("series"))
                        {
                                renderSeriesField(form, fieldName, dcInput, dcValues, readonly);
                        }
                        else if (inputType.equals("twobox"))
                        {
                                // We don't have a twobox field, instead it's just a
                                // one box field that the theme can render in two columns.
                                renderOneboxField(form, fieldName, dcInput, dcValues, readonly);
                        }
                        else if (inputType.equals("qualdrop_value"))
                        {
                                // Determine the real field's values. Since the qualifier is
                                // selected we need to search through all the metadata and see
                                // if any match for another field, if not we assume that this field
                                // should handle it.
                                DCValue[] unfiltered = item.getMetadata(dcInput.getSchema(), dcInput.getElement(), Item.ANY, Item.ANY);
                                ArrayList<DCValue> filtered = new ArrayList<DCValue>();
                                for (DCValue dcValue : unfiltered)
                                {
                                        String unfilteredFieldName = dcValue.element + "." + dcValue.qualifier;
                                        if ( ! inputSet.isFieldPresent(unfilteredFieldName) )
                                        {
                                                filtered.add( dcValue );
                                        }
                                }
                               
                                renderQualdropField(form, fieldName, dcInput, filtered.toArray(new DCValue[filtered.size()]), readonly);
                        }
                        else if (inputType.equals("textarea"))
                        {
                                renderTextArea(form, fieldName, dcInput, dcValues, readonly);
                        }
                        else if (inputType.equals("dropdown"))
                        {
                                renderDropdownField(form, fieldName, dcInput, dcValues, readonly);
                        }
                        else if (inputType.equals("list"))
                        {
                                renderSelectFromListField(form, fieldName, dcInput, dcValues, readonly);
                        }
                        else if (inputType.equals("onebox"))
                        {
                                renderOneboxField(form, fieldName, dcInput, dcValues, readonly);
                        }
                        else
                        {
                                form.addItem(T_unknown_field);
                        }
                }

                // add standard control/paging buttons
        addControlButtons(form);
View Full Code Here

   
    Division div = body.addInteractiveDivision("control-panel", contextPath+"/admin/panel", Division.METHOD_POST, "primary administrative");
    div.setHead(T_head);
   
    // LIST: options
    List options = div.addList("options",List.TYPE_SIMPLE,"horizontal");
   
    // our options, selected or not....
    if (option == OPTIONS.java)
      options.addItem().addHighlight("bold").addXref("?java",T_option_java);
    else
      options.addItemXref("?java",T_option_java);
   
    if (option == OPTIONS.dspace)
      options.addItem().addHighlight("bold").addXref("?dspace",T_option_dspace);
    else
      options.addItemXref("?dspace",T_option_dspace);
   
    if (option == OPTIONS.alerts)
      options.addItem().addHighlight("bold").addXref("?alerts",T_option_alerts);
    else
      options.addItemXref("?alerts",T_option_alerts);
   
    if (option == OPTIONS.harvest)
      options.addItem().addHighlight("bold").addXref("?harvest",T_option_harvest);
    else
      options.addItemXref("?harvest",T_option_harvest);
   
    String userSortTarget = "?activity";
    if (request.getParameter("sortBy") != null)
      userSortTarget += "&sortBy="+request.getParameter("sortBy");
    if (option == OPTIONS.activity)
      options.addItem().addHighlight("bold").addXref(userSortTarget,"Current Activity");
    else
      options.addItemXref(userSortTarget,"Current Activity");
   
   
    // The main content:
    if (option == OPTIONS.java)
      addJavaInformation(div);
View Full Code Here

    public List addReviewSection(List reviewList) throws SAXException,
        WingException, UIException, SQLException, IOException,
        AuthorizeException
    {
        //Create a new list section for this step (and set its heading)
        List describeSection = reviewList.addList("submit-review-" + this.stepAndPage, List.TYPE_FORM);
        describeSection.setHead(T_head);
       
        //Review the values assigned to all inputs
        //on this page of the Describe step.
        DCInputSet inputSet = null;
        try
        {
            inputSet = getInputsReader().getInputs(submission.getCollection().getHandle());
        }
        catch (DCInputsReaderException se)
        {
            throw new UIException(se);
        }
       
        MetadataAuthorityManager mam = MetadataAuthorityManager.getManager();
        DCInput[] inputs = inputSet.getPageRows(getPage()-1, submission.hasMultipleTitles(), submission.isPublishedBefore());

        for (DCInput input : inputs)
        {
            // If the input is invisible in this scope, then skip it.
            String scope = submissionInfo.isInWorkflow() ? DCInput.WORKFLOW_SCOPE : DCInput.SUBMISSION_SCOPE;
            if (!input.isVisible(scope) && !input.isReadOnly(scope))
                continue;

            String inputType = input.getInputType();
            String pairsName = input.getPairsType();
            DCValue[] values = new DCValue[0];

            if (inputType.equals("qualdrop_value"))
            {
                values = submission.getItem().getMetadata(input.getSchema(), input.getElement(), Item.ANY, Item.ANY);
            }
            else
            {
                values = submission.getItem().getMetadata(input.getSchema(), input.getElement(), input.getQualifier(), Item.ANY);
            }

            if (values.length > 0)
            {
                for (DCValue value : values)
                {
                    String displayValue = null;
                    if (inputType.equals("date"))
                    {
                        DCDate date = new DCDate(value.value);
                        displayValue = date.toString();
                    }
                    else if (inputType.equals("dropdown"))
                    {
                        displayValue = input.getDisplayString(pairsName,value.value);
                    }
                    else if (inputType.equals("qualdrop_value"))
                    {
                        String qualifier = value.qualifier;
                        String displayQual = input.getDisplayString(pairsName,qualifier);
                        if (displayQual!=null && displayQual.length()>0)
                        {
                            displayValue = displayQual + ":" + value.value;
                        }
                    }
                    else
                    {
                        displayValue = value.value;
                    }

                    //Only display this field if we have a value to display
                    if (displayValue!=null && displayValue.length()>0)
                    {

                        describeSection.addLabel(input.getLabel());
                        if (mam.isAuthorityControlled(value.schema, value.element, value.qualifier))
                        {
                            String confidence = (value.authority != null && value.authority.length() > 0) ?
                                Choices.getConfidenceText(value.confidence).toLowerCase() :
                                "blank";
                            org.dspace.app.xmlui.wing.element.Item authItem =
                                describeSection.addItem("submit-review-field-with-authority", "ds-authority-confidence cf-"+confidence);
                            authItem.addContent(displayValue);
                        }
                        else
                        describeSection.addItem(displayValue);
                    }
                } // For each DCValue
            } // If values exist
        }// For each input
       
View Full Code Here

    totalMemory = totalMemory / 1024 / 1024;
    usedMemory  = usedMemory  / 1024 / 1024;
    freeMemory  = freeMemory  / 1024 / 1024;
   
    // LIST: Java
    List list = div.addList("javaOs");
    list.setHead(T_JAVA_HEAD);
    list.addLabel(T_JAVA_VERSION);
        list.addItem(System.getProperty("java.version"));
        list.addLabel(T_JAVA_VENDOR);
        list.addItem(System.getProperty("java.vendor"));
        list.addLabel(T_OS_NAME);
        list.addItem(System.getProperty("os.name"));
        list.addLabel(T_OS_ARCH);
        list.addItem(System.getProperty("os.arch"));
        list.addLabel(T_OS_VERSION);
        list.addItem(System.getProperty("os.version"));
   
    // LIST: memory
    List runtime = div.addList("runtime");
    runtime.setHead(T_RUNTIME_HEAD);
    runtime.addLabel(T_RUNTIME_PROCESSORS);
    runtime.addItem(String.valueOf(processors));
    runtime.addLabel(T_RUNTIME_MAX);
    runtime.addItem(String.valueOf(maxMemory) + " MiB");
    runtime.addLabel(T_RUNTIME_TOTAL);
    runtime.addItem(String.valueOf(totalMemory) + " MiB");
    runtime.addLabel(T_RUNTIME_USED);
    runtime.addItem(String.valueOf(usedMemory) + " MiB");
    runtime.addLabel(T_RUNTIME_FREE);
    runtime.addItem(String.valueOf(freeMemory) + " MiB")
  }
View Full Code Here

TOP

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

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.