[ https://issues.apache.org/jira/browse/OFBIZ-4641?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olivier Heintz updated OFBIZ-4641: ---------------------------------- Description: when attribute text-size is used in drop-down, the method to encode description to show in drop down is not the same when description is less or more long than text-size. This correction change the code to use same same method in all case. How to show error and test the correction : a) add a exampleType with webtools : exampleTypeId='TEST' description = 'Test long description with special characters / and size used in drop-down description' b) go to example component in main screen (findExample) in exampleType drop-down, the new exampleType is list and correctly c) modify framework/example/widget/example/ExampleForms.xml, line 29 {code} - <drop-down allow-empty="true" current-description=""> + <drop-down allow-empty="true" current-description="" text-size="35"> {code} d) test findExample, it's correct drop-down is print e) change text-size to text-size="65" f) test findExample, it's NOT correct drop-down has disappear, in log : {code} Error rendering screen thru ftl, macro: <@renderDropDownField name="exampleTypeId" className="" alert="false" id="FindExamples_exampleTypeId" multiple="" formName="FindExamples" otherFieldName="" event="" action="" size="1" firstInList="" currentValue="" explicitDescription="" allowEmpty="Y" options=[{'key':'CONTRIVED','description':'Arrangé'},{'key':'INSPIRED','description':'Inspiré'},{'key':'MADE_UP','description':'Composé'},{'key':'REAL_WORLD','description':'Monde réel'},{'key':'TESTSL','description':'Test long description with special characters \/ and size...ption'}] fieldName="" otherFieldName="" otherValue="" otherFieldSize=0 dDFCurrent="first-in-list" ajaxEnabled=false noCurrentSelectedKey="" ajaxOptions="" frequency="" minChars="" choices="" autoSelect="" partialSearch="" partialChars="" ignoreCase="" fullSearch="" /> Exception: freemarker.core.ParseException Message: Token manager error: freemarker.core.TokenMgrError: Lexical error at line 1, column 547. Encountered: "/" (47), after : "\'Test long description with special characters \\" {code} g) apply the patch h) test findExample, it's correct drop-down is print was: when attribute text-size is used in drop-down, the method to encode description to show in drop down is not the same when description is less or more long than text-size. This correction change the code to use same same method in all case. How to show error and test the correction : a) add a exampleType with webtools : exampleTypeId='TEST' description = 'Test long description with special characters / and size used in drop-down description' b) go to example component in main screen (findExample) in exampleType drop-down, the new exampleType is list and correctly c) modify framework/example/widget/example/ExampleForms.xml, line 29 {code} - <drop-down allow-empty="true" current-description=""> + <drop-down allow-empty="true" current-description="" text-size="35"> {/code} d) test findExample, it's correct drop-down is print e) change text-size to text-size="65" f) test findExample, it's NOT correct drop-down has disappear, in log : {code} Error rendering screen thru ftl, macro: <@renderDropDownField name="exampleTypeId" className="" alert="false" id="FindExamples_exampleTypeId" multiple="" formName="FindExamples" otherFieldName="" event="" action="" size="1" firstInList="" currentValue="" explicitDescription="" allowEmpty="Y" options=[{'key':'CONTRIVED','description':'Arrangé'},{'key':'INSPIRED','description':'Inspiré'},{'key':'MADE_UP','description':'Composé'},{'key':'REAL_WORLD','description':'Monde réel'},{'key':'TESTSL','description':'Test long description with special characters \/ and size...ption'}] fieldName="" otherFieldName="" otherValue="" otherFieldSize=0 dDFCurrent="first-in-list" ajaxEnabled=false noCurrentSelectedKey="" ajaxOptions="" frequency="" minChars="" choices="" autoSelect="" partialSearch="" partialChars="" ignoreCase="" fullSearch="" /> Exception: freemarker.core.ParseException Message: Token manager error: freemarker.core.TokenMgrError: Lexical error at line 1, column 547. Encountered: "/" (47), after : "\'Test long description with special characters \\" {/code} g) apply the patch h) test findExample, it's correct drop-down is print > in Form.xml, special characters are not manage correctly in description if > text-size is used in drop-down > ---------------------------------------------------------------------------------------------------------- > > Key: OFBIZ-4641 > URL: https://issues.apache.org/jira/browse/OFBIZ-4641 > Project: OFBiz > Issue Type: Bug > Reporter: Olivier Heintz > Attachments: OFBIZ-4641.patch > > > when attribute text-size is used in drop-down, the method to encode > description to show in drop down is not the same when description is less or > more long than text-size. > This correction change the code to use same same method in all case. > How to show error and test the correction : > a) add a exampleType with webtools : > exampleTypeId='TEST' > description = 'Test long description with special characters / and size used > in drop-down description' > b) go to example component > in main screen (findExample) in exampleType drop-down, the new exampleType is > list and correctly > c) modify framework/example/widget/example/ExampleForms.xml, line 29 > {code} > - <drop-down allow-empty="true" current-description=""> > + <drop-down allow-empty="true" current-description="" > text-size="35"> > {code} > d) test findExample, it's correct drop-down is print > e) change text-size to text-size="65" > f) test findExample, it's NOT correct drop-down has disappear, in log : > {code} > Error rendering screen thru ftl, macro: <@renderDropDownField > name="exampleTypeId" className="" alert="false" > id="FindExamples_exampleTypeId" multiple="" formName="FindExamples" > otherFieldName="" event="" action="" size="1" firstInList="" currentValue="" > explicitDescription="" allowEmpty="Y" > options=[{'key':'CONTRIVED','description':'Arrangé'},{'key':'INSPIRED','description':'Inspiré'},{'key':'MADE_UP','description':'Composé'},{'key':'REAL_WORLD','description':'Monde > réel'},{'key':'TESTSL','description':'Test long description with > special characters \/ and size...ption'}] fieldName="" otherFieldName="" > otherValue="" otherFieldSize=0 dDFCurrent="first-in-list" ajaxEnabled=false > noCurrentSelectedKey="" ajaxOptions="" frequency="" minChars="" choices="" > autoSelect="" partialSearch="" partialChars="" ignoreCase="" fullSearch="" /> > Exception: freemarker.core.ParseException > Message: Token manager error: freemarker.core.TokenMgrError: Lexical error at > line 1, column 547. Encountered: "/" (47), after : "\'Test long description > with special characters \\" > {code} > g) apply the patch > h) test findExample, it's correct drop-down is print > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira