[ https://issues.apache.org/jira/browse/WW-4987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16711202#comment-16711202 ]
Hudson commented on WW-4987: ---------------------------- SUCCESS: Integrated in Jenkins build Struts-master-JDK7 #223 (See [https://builds.apache.org/job/Struts-master-JDK7/223/]) WW-4987 Add listCssClass to optgroup tag (amashchenko: rev c0eafac042d3e4487824b1095e21ca306439fc6e) * (edit) core/src/main/java/org/apache/struts2/components/OptGroup.java * (edit) core/src/main/java/org/apache/struts2/views/jsp/ui/OptGroupTag.java * (edit) core/src/main/resources/template/simple/optgroup.ftl * (edit) core/src/site/resources/tags/optgroup.html WW-4987 Add test for listCssClass in optgroup tag (amashchenko: rev 94210a02e73a32a0e20d111ac8270191ee2cb5d6) * (edit) core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java * (add) core/src/test/resources/org/apache/struts2/views/jsp/ui/OptGroup-8.txt > Setting Struts2 <s:select> options Css Class > -------------------------------------------- > > Key: WW-4987 > URL: https://issues.apache.org/jira/browse/WW-4987 > Project: Struts 2 > Issue Type: Bug > Components: Core Tags > Affects Versions: 2.5.17 > Reporter: Muhammad Salman > Assignee: Aleksandr Mashchenko > Priority: Major > Fix For: 2.6, 2.5.19 > > Attachments: optgroup.ftl, select.ftl, struts.log > > > Hi > I am working on an application that is built on struts 2.5.17. I have > {{<s:select>}} tag with <optgroup> and <option>. I am trying to add cssClass > to <options> under <optgroup>. I am trying to add css class to <option> using > listCssClass attribute of {{<s:select>}} but it is not adding class to the > <option>. Any help would be much appreciated. > Here is code from my JSP: > {code:xml} > <s:select list="#\{'none':'-Select Template-'}" id="export-data" > cssStyle="width:250px;" title="templateDesc" cssClass="templateType" > onchange="adjustReportText()" name="templateID" listCssClass="templateType"> > <s:iterator value="\{SOME MAP WITH KEY AND LIST OF VALUES}" var="TG" > status="stat"> > <s:optgroup label="%\{key}" list="%\{value}" listKey="templateId" > listValue="templateName" ></s:optgroup> > </s:iterator> > </s:select> > {code} > Initially we were working on struts 2.2.3 version and in that version, > cssClass attribute populates the CSS Class for <option>, but in 2.5.17 > neither cssClass is populated class to <option> nor listCssClass. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)