Uploaded image for project: 'ZK Spreadsheet'
  1. ZK Spreadsheet
  2. ZSS-934

Data validations are not visible after switching to another sheet

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 3.8.0
    • 3.7.0
    • None
    • Security Level: Jimmy

      Reproducing steps:

      1. Open the zul page
      2. Focus on A2 => should see a dropdown list (data validation loaded from Excel file)
      3. Focus on A3 => should see a dropdown list (data validation added in Java code)
      4. Click on "+" to add a sheet
      5. Switch to the new sheet
      6. Go back to "Sample" sheet
      7. Focus on A2 => the dropdown button does not show
      8. Focus on A3 => the dropdown button does not show

      Reproducing sample:

      testDataValidation.zul
      <div width="100%" height="100%" apply="test.DataValidationComposer">
          <spreadsheet id="ss" width="100%" vflex="1"
              src="/WEB-INF/DataValidation.xlsx"
              maxVisibleRows="20" maxVisibleColumns="10"
              showSheetbar="true" />
      </div>
      
      "DataValidationComposer.java
      public class DataValidationComposer extends SelectorComposer<Component> {
          
          @Wire
          private Spreadsheet ss;
          
          @Override
          public void doAfterCompose(Component comp) throws Exception {
              super.doAfterCompose(comp);
              
              Ranges.range(ss.getSelectedSheet(), 2, 0)
              .setValidation(
                  ValidationType.LIST,         
                  true,                       // ignore blank
                  OperatorType.EQUAL,         
                  true,                       // in cell dropdown
                  "1,2,3,4,5",                // the source of list (for list validation)
                  null,                       // additional formula
                  false,                      // show input
                  null,                       // input title
                  null,                       // input message
                  false,                      // show error
                  AlertStyle.INFO,                            
                  null,                       // error title
                  null);                      // error message
          }
      }
      

            henrichen henrichen
            neillee neillee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: