[richfaces-svn-commits] JBoss Rich Faces SVN: r2946 - in trunk/ui/suggestionbox/src/main: java/org/richfaces/renderkit/html and 1 other directories.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Fri Sep 14 13:42:58 EDT 2007
Author: sergeyhalipov
Date: 2007-09-14 13:42:57 -0400 (Fri, 14 Sep 2007)
New Revision: 2946
Modified:
trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml
trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/table.jspx
Log:
http://jira.jboss.com/jira/browse/RF-905
Modified: trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml
===================================================================
--- trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml 2007-09-14 16:26:07 UTC (rev 2945)
+++ trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml 2007-09-14 17:42:57 UTC (rev 2946)
@@ -105,7 +105,7 @@
Name of the CSS class for a suggestion entry element
(table row)
</description>
- <defaultvalue>"dr-sb-int rich-sb-int richfaces_suggestionEntry"</defaultvalue>
+ <defaultvalue>"richfaces_suggestionEntry"</defaultvalue>
</property>
<property>
<name>rowClasses</name>
Modified: trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java
===================================================================
--- trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java 2007-09-14 16:26:07 UTC (rev 2945)
+++ trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java 2007-09-14 17:42:57 UTC (rev 2946)
@@ -769,4 +769,23 @@
}
}
+
+ /**
+ * Gets 'class' attribute for suggestion entry.
+ *
+ * @param context {@link javax.faces.context.FacesContext}
+ * @param component {@link javax.faces.component.UIComponent}
+ * @return 'class' attribute for 'tr' element of suggestion entry.
+ */
+ public final String getEntryClass(final FacesContext context,
+ final UIComponent component) {
+ String entryClass = (String) component.getAttributes().get("entryClass");
+ if (null == entryClass)
+ entryClass = "";
+ String rowClass = (String) component.getAttributes().get("rowClasses");
+ if (null == rowClass)
+ rowClass = "";
+
+ return "dr-sb-int rich-sb-int " + entryClass + " " + rowClass;
+ }
}
Modified: trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/table.jspx
===================================================================
--- trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/table.jspx 2007-09-14 16:26:07 UTC (rev 2945)
+++ trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/table.jspx 2007-09-14 17:42:57 UTC (rev 2946)
@@ -46,8 +46,10 @@
</f:if>
<tbody>
<u:insertChildren context="rows">
- <tr class="dr-sb-int rich-sb-int">
- <f:attribute name="class" context="rowClass" mantadory="false"/>
+ <tr>
+ <f:attribute name="class">
+ <f:call name="getEntryClass"/>
+ </f:attribute>
<f:if property="fetchValue">
<td style="display: none;"><f:attribute name="class"
property="selectValueClass"
More information about the richfaces-svn-commits
mailing list