-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Normal
-
Affects Version/s: 3.7.0
-
Component/s: 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 } }