This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch struts-2-5-x in repository https://gitbox.apache.org/repos/asf/struts.git
commit c694c6fdfbe8ff67d95b08dc84b917a654a7e820 Author: Aleksandr Mashchenko <amashche...@apache.org> AuthorDate: Wed Dec 5 21:51:08 2018 +0200 Improve optgroup template (cherry picked from commit 60dfc4d141cb08d2bc8b975cdd821b79d1bba24f) --- core/src/main/resources/template/simple/optgroup.ftl | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/core/src/main/resources/template/simple/optgroup.ftl b/core/src/main/resources/template/simple/optgroup.ftl index a424fe7..fc4c78f 100644 --- a/core/src/main/resources/template/simple/optgroup.ftl +++ b/core/src/main/resources/template/simple/optgroup.ftl @@ -37,21 +37,15 @@ <#assign tmpKeyStr = tmpKey.toString() /> <#assign optGroupItemCssClass = ''/> <#if optGroupInternalListUiBean.parameters.listCssClass??> - <#if stack.findString(optGroupInternalListUiBean.parameters.listCssClass)??> - <#assign optGroupItemCssClass= stack.findString(optGroupInternalListUiBean.parameters.listCssClass)/> - </#if> + <#assign optGroupItemCssClass= stack.findString(optGroupInternalListUiBean.parameters.listCssClass)!''/> </#if> <#assign optGroupItemCssStyle = ''/> <#if optGroupInternalListUiBean.parameters.listCssStyle??> - <#if stack.findString(optGroupInternalListUiBean.parameters.listCssStyle)??> - <#assign optGroupItemCssStyle= stack.findString(optGroupInternalListUiBean.parameters.listCssStyle)/> - </#if> + <#assign optGroupItemCssStyle= stack.findString(optGroupInternalListUiBean.parameters.listCssStyle)!''/> </#if> <#assign optGroupItemTitle = ''/> <#if optGroupInternalListUiBean.parameters.listTitle??> - <#if stack.findString(optGroupInternalListUiBean.parameters.listTitle)??> - <#assign optGroupItemTitle= stack.findString(optGroupInternalListUiBean.parameters.listTitle)/> - </#if> + <#assign optGroupItemTitle= stack.findString(optGroupInternalListUiBean.parameters.listTitle)!''/> </#if> <option value="${tmpKeyStr?html}"<#rt> <#if tag.contains(parameters.nameValue, tmpKey) == true>