Author: abelevich
Date: 2008-01-10 15:51:43 -0500 (Thu, 10 Jan 2008)
New Revision: 5281
Modified:
trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml
trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
Log:
Modified: trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml
===================================================================
--- trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml 2008-01-10 20:04:37
UTC (rev 5280)
+++ trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml 2008-01-10 20:51:43
UTC (rev 5281)
@@ -135,55 +135,42 @@
<name>listClass</name>
<classname>java.lang.String</classname>
<description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
- <name>inputStyle</name>
+ <name>listDisabledClass</name>
<classname>java.lang.String</classname>
<description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
- <name>inputClass</name>
+ <name>listDisabledStyle</name>
<classname>java.lang.String</classname>
<description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
- <name>itemStyle</name>
+ <name>inputStyle</name>
<classname>java.lang.String</classname>
<description></description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
- <name>itemClass</name>
+ <name>inputClass</name>
<classname>java.lang.String</classname>
<description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
- <name>itemDisabledStyle</name>
+ <name>itemClass</name>
<classname>java.lang.String</classname>
<description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>itemDisabledClass</name>
<classname>java.lang.String</classname>
<description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
- <name>itemSelectedStyle</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
<name>itemSelectedClass</name>
<classname>java.lang.String</classname>
<description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>buttonStyle</name>
@@ -195,13 +182,11 @@
<name>buttonClass</name>
<classname>java.lang.String</classname>
<description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>buttonDisabledStyle</name>
<classname>java.lang.String</classname>
<description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>buttonDisabledClass</name>
Modified: trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-10 20:04:37 UTC
(rev 5280)
+++ trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-10 20:51:43 UTC
(rev 5281)
@@ -55,36 +55,54 @@
variables.setVariable("value", value);
Object inputStyle = component.getAttributes().get("inputStyle");
+ if(inputStyle==null || inputStyle.equals("")) {
+ inputStyle = "\"\"";
+ }
variables.setVariable("inputStyle", inputStyle);
Object inputClass = component.getAttributes().get("inputClass");
variables.setVariable("inputClass", inputClass);
Object inputDisabledStyle =
component.getAttributes().get("inputDisabledStyle");
+ if(inputDisabledStyle==null || inputDisabledStyle.equals("")) {
+ inputDisabledStyle = "\"\"";
+ }
variables.setVariable("inputDisabledStyle", inputDisabledStyle);
Object inputDisabledClass =
component.getAttributes().get("inputDisabledClass");
variables.setVariable("inputDisabledClass", inputDisabledClass);
- Object buttonStyle = component.getAttributes().get("buttonStyle");
- variables.setVariable("buttonStyle", buttonStyle);
-
Object buttonDisabledClass =
component.getAttributes().get("buttonDisabledClass");
variables.setVariable("buttonDisabledClass", buttonDisabledClass);
Object buttonDisabledStyle =
component.getAttributes().get("buttonDisabledStyle");
+ if(buttonDisabledStyle==null || buttonDisabledStyle.equals("")) {
+ buttonDisabledStyle = "\"\"";
+ }
variables.setVariable("buttonDisabledStyle", buttonDisabledStyle);
Object buttonClass = component.getAttributes().get("buttonClass");
variables.setVariable("buttonClass", buttonClass);
+ Object buttonStyle = component.getAttributes().get("buttonStyle");
+ if(buttonStyle==null || buttonStyle.equals("")) {
+ buttonStyle = "\"\"";
+ }
+ variables.setVariable("buttonStyle", buttonStyle);
+
Object listStyle = component.getAttributes().get("listStyle");
+ if(listStyle==null || listStyle.equals("")) {
+ listStyle = "\"\"";
+ }
variables.setVariable("listStyle", listStyle);
Object listClass = component.getAttributes().get("listClass");
variables.setVariable("listClass", listClass);
Object listDisabledStyle =
component.getAttributes().get("listDisabledStyle");
+ if(listDisabledStyle==null || listDisabledStyle.equals("")) {
+ listDisabledStyle = "\"\"";
+ }
variables.setVariable("listDisabledStyle", listDisabledStyle);
Object listDisabledClass =
component.getAttributes().get("listDisabledClass");
@@ -95,6 +113,16 @@
Object style = component.getAttributes().get("style");
variables.setVariable("style", style);
+
+ Object itemClass = component.getAttributes().get("itemClass");
+ variables.setVariable("itemClass", itemClass);
+
+ Object itemDisabledClass =
component.getAttributes().get("itemDisabledClass");
+ variables.setVariable("itemDisabledClass", itemDisabledClass);
+
+ Object itemSelectedClass =
component.getAttributes().get("itemSelectedClass");
+ variables.setVariable("itemSelectedClass", itemSelectedClass);
+
]]>
</jsp:scriptlet>
@@ -120,14 +148,34 @@
<script type="text/javascript">
Richfaces.ComboBox.CLASSES = {
- BUTTON : {NORMAL : "#{buttonDisabledClass}", ACTIVE :
"#{buttonClass}", DISABLED : "#{buttonDisabledClass}"},
- FIELD : {NORMAL : "#{inputDisabledClass}", ACTIVE :
"#{inputClass}", DISABLED : "#{inputDisabledClass}"},
+ BUTTON : {CLASSES :
+ {NORMAL : "rich-combobox-font rich-combobox-button-icon rich-combobox-button
#{buttonDisabledClass}",
+ ACTIVE : "rich-combobox-font rich-combobox-button-icon
rich-combobox-button #{buttonClass}",
+ DISABLED : "rich-combobox-font rich-combobox-button-icon
rich-combobox-button #{buttonDisabledClass}"},
+ STYLE :
+ {NORMAL: #{buttonDisabledStyle},
+ ACTIVE: #{buttonStyle},
+ DISABLED: #{buttonDisabledStyle}}
+ },
+ FIELD : {CLASSES:
+ {NORMAL : "rich-combobox-font rich-combobox-button-icon-disabled
rich-combobox-button #{inputDisabledClass}",
+ ACTIVE : "rich-combobox-font rich-combobox-input-default rich-combobox-input
#{inputClass}",
+ DISABLED : "rich-combobox-font rich-combobox-button-icon-disabled
rich-combobox-button #{inputDisabledClass}"},
+ STYLE :
+ {NORMAL : #{inputDisabledStyle},
+ ACTIVE : #{inputStyle},
+ DISABLED : #{inputDisabledStyle}}
+ },
COMBO_LIST : {
- LIST : {ACTIVE : "#{listClass}", DISABLED :
"#{listDisabledClass}"},
- ITEM : {NORMAL : "rich-combobox-item rich-combobox-item-normal",
- SELECTED : "rich-combobox-item rich-combobox-item-selected",
- DISABLED : "rich-combobox-item rich-combobox-item-disabled",
- SELECTED_DISABLED : "rich-combobox-item rich-combobox-item-selected
rich-combobox-item-disabled"
+ LIST : {CLASSES :
+ {ACTIVE : "rich-combobox-list-cord rich-combobox-list-scroll
rich-combobox-list-decoration rich-combobox-list-position #{listClass}",
+ DISABLED : "rich-combobox-list-cord rich-combobox-list-scroll
rich-combobox-list-decoration rich-combobox-list-position #{listDisabledClass}"},
+ STYLE : {ACTIVE: #{listStyle},
+ DISABLED: #{listDisabledStyle}}
+ },
+ ITEM : {NORMAL : "rich-combobox-item rich-combobox-item-normal
#{itemClass}",
+ SELECTED : "rich-combobox-item rich-combobox-item-selected
#{itemSelectedClass}",
+ DISABLED : "rich-combobox-item rich-combobox-item-disabled
#{itemDisabledClass}"
}
}
}
@@ -144,6 +192,7 @@
#{selectFirstOnUpdate},
#{this:getAsEventHandler(context, component, "onlistcall")},
#{this:getAsEventHandler(context, component, "onitemselected")},
+ #{this:getAsEventHandler(context, component, "onchange")},
"#{defaultMessage}");
</script>
</f:root>
\ No newline at end of file