Author: nbelaevski
Date: 2009-03-26 15:22:22 -0400 (Thu, 26 Mar 2009)
New Revision: 13233
Modified:
trunk/ui/colorPicker/src/main/java/org/richfaces/renderkit/ColorPickerRendererBase.java
Log:
https://jira.jboss.org/jira/browse/RF-6592
Modified:
trunk/ui/colorPicker/src/main/java/org/richfaces/renderkit/ColorPickerRendererBase.java
===================================================================
---
trunk/ui/colorPicker/src/main/java/org/richfaces/renderkit/ColorPickerRendererBase.java 2009-03-26
18:40:52 UTC (rev 13232)
+++
trunk/ui/colorPicker/src/main/java/org/richfaces/renderkit/ColorPickerRendererBase.java 2009-03-26
19:22:22 UTC (rev 13233)
@@ -1,45 +1,14 @@
package org.richfaces.renderkit;
-import java.util.Map;
import java.util.Set;
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIInput;
-import javax.faces.context.ExternalContext;
+
import javax.faces.context.FacesContext;
+
import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
-import org.ajax4jsf.util.InputUtils;
import org.richfaces.component.UIColorPicker;
-public abstract class ColorPickerRendererBase extends HeaderResourcesRendererBase{
+public abstract class ColorPickerRendererBase extends InputRendererBase {
- public void decode(FacesContext context, UIComponent component){
- ExternalContext external = context.getExternalContext();
- Map<String, String> requestParams = external.getRequestParameterMap();
- UIColorPicker colorPicker = (UIColorPicker)component;
- String clientId = colorPicker.getClientId(context);
- String submittedValue = requestParams.get(clientId);
-
- if (submittedValue != null) {
- colorPicker.setSubmittedValue(submittedValue);
- }
- }
-
- public String getInputValue(FacesContext context, UIInput input) {
- String inputValue = "";
-
- String submittedValue = (String) input.getSubmittedValue();
- if (submittedValue != null) {
- inputValue = submittedValue;
- } else {
- Object value = input.getValue();
- if (value != null) {
- inputValue = InputUtils.getConvertedStringValue(context, input, value);
- }
- }
-
- return inputValue;
- }
public void addPopupToAjaxRendered(FacesContext context, UIColorPicker component) {
AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
Set<String> ajaxRenderedAreas = ajaxContext.getAjaxRenderedAreas();