Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-17

DSpace 1.5 Controlled Vocab (edit-metadata.jsp) - ID: 1931796

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.0
    • Fix Version/s: 1.5.2
    • Component/s: None
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      1

      Description

      Error

      ==> selecting Subject from Popup page of controlled vocab, receiving null
      or not an object error on very first Subject Text Box.

      /jspui/controlledvocabulary/controlledvocabulary.jsp?ID=dc_subject_0&vocabu
      lary=srsc

      ==> (edit-metadata.jsp, doTwoBox)

      Line number 622 to 653

      if i==0

      ".append("_").append" was removed when appending to "sb"

      .append(fieldParam) = fieldName (==> dc_subject )

      But when calling to doControlledVocabulary = fieldName + "_" + i ( ==>
      dc_subject_0)

      if (i == 0)
      {
      //param is just the field name
      fieldParam = fieldName;
      ........

      else
      {
      //param is field name and index (e.g. myfield_2)
      fieldParam = fieldName + "_" + i;
      sb.append("<tr><td> </td>");
      }
      if (i < defaults.length)
      sb.append("<td align=\"left\"><input type=\"text\" name=\"")
      .append(fieldParam) <== dc-subject
      .append("\" size=\"15\" value=\"")
      .append(defaults[i].value.replaceAll("\"", """))
      .append("\"")
      .append(hasVocabulary(vocabulary)&&closedVocabulary?"
      readonly=\"readonly\" ":"")
      .append("/> <input type=\"submit\" name=\"submit_")
      .append(fieldName)
      .append("remove")
      .append
      .append("\" value=\"")
      .append(LocaleSupport.getLocalizedMessage(pageContext,
      "jsp.submit.edit-metadata.button.remove2"))
      .append("\"/>")
      .append(doControlledVocabulary(fieldName + "_" + i, pageContext,
      vocabulary)) <== dc_subject_0
      .append("</td>\n");
      else
      {
      sb.append("<td align=\"left\"><input type=\"text\" name=\"")
      .append(fieldParam) <== dc_subject
      .append("\" size=\"15\"")
      .append(hasVocabulary(vocabulary)&&closedVocabulary?"
      readonly=\"readonly\" ":"")
      .append("/>")
      .append(doControlledVocabulary(fieldName + "_" + i,
      pageContext, vocabulary)) <== dc_subject_0
      .append("</td>\n");
      }

        Attachments

          Activity

            People

            Assignee:
            stuartlewis Stuart Lewis
            Reporter:
            kipkorir2008 Charles Kiplagat
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: