Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-7983

readonly field defined in form was rendered as editable in embed forms

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.14.0.Final
    • 7.13.0.Final
    • KieServer
    • None
    • NEW
    • NEW
    • Hide

      example form definition Json

      {"maxLength":100,"placeHolder":"ClientName","id":"field_90519299646713E11","name":"ClientName","label":"ClientName","required":false,"readOnly":true,"validateOnChange":false,"helpMessage":"","binding":"ClientName","standaloneClassName":"java.lang.String","code":"TextBox","serializedFieldClassName":"org.kie.workbench.common.forms.fields.shared.fieldTypes.basic.textBox.definition.TextBoxFieldDefinition"}

      which has readOnly = true.

      In rg.kie.server.services.jbpm.ui.form.render.model.FormField,

      @JsonProperty("readonly")
      private boolean readOnly;

      which check readonly instead of readOnly.

      Easy fix would be change
      @JsonProperty("readonly")
      to
      @JsonProperty("readOnly")

      Show
      example form definition Json {"maxLength":100,"placeHolder":"ClientName","id":"field_90519299646713E11","name":"ClientName","label":"ClientName","required":false,"readOnly":true,"validateOnChange":false,"helpMessage":"","binding":"ClientName","standaloneClassName":"java.lang.String","code":"TextBox","serializedFieldClassName":"org.kie.workbench.common.forms.fields.shared.fieldTypes.basic.textBox.definition.TextBoxFieldDefinition"} which has readOnly = true. In rg.kie.server.services.jbpm.ui.form.render.model.FormField, @JsonProperty("readonly") private boolean readOnly; which check readonly instead of readOnly. Easy fix would be change @JsonProperty("readonly") to @JsonProperty("readOnly")

    Description

      Embed form always renders fields as editable even the definition has readOnly = true property.

      Attachments

        Activity

          People

            swiderski.maciej Maciej Swiderski (Inactive)
            jeffxpeng jie peng (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: