Author: abelevich
Date: 2008-01-10 13:45:48 -0500 (Thu, 10 Jan 2008)
New Revision: 5278
Modified:
trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/ComboBoxBaseRenderer.java
trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
Log:
Modified:
trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/ComboBoxBaseRenderer.java
===================================================================
---
trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/ComboBoxBaseRenderer.java 2008-01-10
18:10:50 UTC (rev 5277)
+++
trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/ComboBoxBaseRenderer.java 2008-01-10
18:45:48 UTC (rev 5278)
@@ -3,6 +3,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -188,7 +189,7 @@
}
return script;
}
-
+
public String getAsEventHandler(FacesContext context, UIComponent component, String
attributeName) {
String event = (String) component.getAttributes().get(attributeName);
ScriptString result = JSReference.NULL;
Modified: trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-10 18:10:50 UTC
(rev 5277)
+++ trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-10 18:45:48 UTC
(rev 5278)
@@ -51,28 +51,54 @@
variables.setVariable("selectFirstOnUpdate", selectFirstOnUpdate);
Object value = component.getAttributes().get("value");
- if (value != null) {
- value = getConvertedStringValue(context, component,value);
- }
+ value = getConvertedStringValue(context, component,value);
variables.setVariable("value", value);
+ Object inputStyle = component.getAttributes().get("inputStyle");
+ variables.setVariable("inputStyle", inputStyle);
+
+ Object inputClass = component.getAttributes().get("inputClass");
+ variables.setVariable("inputClass", inputClass);
+
+ 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");
+ variables.setVariable("buttonDisabledStyle", buttonDisabledStyle);
+
+ Object buttonClass = component.getAttributes().get("buttonClass");
+ variables.setVariable("buttonClass", buttonClass);
+
+ Object listStyle = component.getAttributes().get("listStyle");
+ variables.setVariable("buttonStyle", buttonStyle);
+
+ Object listClass = component.getAttributes().get("listClass");
+ variables.setVariable("listClass", listClass);
+
+ Object styleClass = component.getAttributes().get("styleClass");
+ variables.setVariable("styleClass", styleClass);
+
+ Object style = component.getAttributes().get("style");
+ variables.setVariable("style", style);
-
]]>
</jsp:scriptlet>
- <div id="#{clientId}" class="rich-combobox-font
rich-combobox-shell" style="width:#{listWidth}">
- <input id="comboboxField#{clientId}"
name="comboboxField#{clientId}" class="rich-combobox-font
rich-combobox-input-default rich-combobox-input" type="text"
value="#{value}" size="#{inputSize}" autocomplete="off"
style="width:#{listWidth}">
+ <div id="#{clientId}" class="rich-combobox-font rich-combobox-shell
#{styleClass}" style="width:#{listWidth}; #{style}">
+ <input id="comboboxField#{clientId}"
name="comboboxField#{clientId}" class="rich-combobox-font
rich-combobox-input-default rich-combobox-input #{inputClass}" type="text"
value="#{value}" size="#{inputSize}" autocomplete="off"
style="width:#{listWidth}; #{inputStyle}">
</input>
<input id="comboBoxButtonBG#{clientId}" readonly="true"
type="text" value="" class="rich-combobox-font
rich-combobox-button-background rich-combobox-button">
</input>
- <input id="comboboxButton#{clientId}" readonly="true"
type="text" value="" class="rich-combobox-font
rich-combobox-button-icon rich-combobox-button "
+ <input id="comboboxButton#{clientId}" readonly="true"
type="text" value="" style="#{buttonStyle}"
class="rich-combobox-font rich-combobox-button-icon rich-combobox-button
#{buttonClass}"
onmousedown="document.getElementById('comboBoxButtonBG#{clientId}').className='rich-combobox-font
rich-combobox-button-pressed-background rich-combobox-button';
this.className='rich-combobox-button rich-combobox-button-pressed rich-combobox-font
rich-combobox-button-icon';"
onmouseup="document.getElementById('comboBoxButtonBG#{clientId}').className='rich-combobox-font
rich-combobox-button-background rich-combobox-button';
this.className='rich-combobox-button rich-combobox-font
rich-combobox-button-icon'" >
</input>
<input type="text" class="rich-combobox-strut
rich-combobox-font" style="width:#{listWidth}">
</input>
- <div id="listParent#{clientId}" style="display:none;"
class="rich-combobox-list-cord rich-combobox-list-scroll
rich-combobox-list-decoration rich-combobox-list-position">
+ <div id="listParent#{clientId}" style="display:none;
#{listStyle};" class="rich-combobox-list-cord rich-combobox-list-scroll
rich-combobox-list-decoration rich-combobox-list-position #{listClass}">
<div id="list#{clientId}">
<f:call name="encodeItems"/>
</div>
Show replies by date