Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-13647

Update xclass definition when pretty name, rows, cols or editor changes for TextArea

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.4
    • Fix Version/s: 8.3-milestone-1, 8.2.2
    • Component/s: Old Core
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Right now it's up to the user of BaseClass to write stuff such as:

              needsUpdate |= baseClass.addTextAreaField(FIELD_SCRIPT, "Job Script", 60, 10);
              // make sure that the script field is of type pure text so that wysiwyg editor is never used for it
              TextAreaClass scriptField = (TextAreaClass) baseClass.getField(FIELD_SCRIPT);
              // Note: getEditor() returns lowercase but the values are actually camelcase...
              if (!scriptField.getEditor().equals("puretext")) {
                  scriptField.setStringValue("editor", "PureText");
                  needsUpdate = true;
              }
      

      It would be better if it were automatically done and so that we could simply use:

              needsUpdate |= baseClass.addTextAreaField(FIELD_SCRIPT, "Job Script", 60, 10, "PureText");
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vmassol Vincent Massol
                Reporter:
                vmassol Vincent Massol
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: