Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.richfaces.renderkit;
 
 
 import  javax.faces.application.ResourceDependencies;
 import  javax.faces.application.ResourceDependency;
 import  javax.faces.component.UIComponent;
 import  javax.faces.context.FacesContext;
 import  javax.faces.context.ResponseWriter;
import  javax.faces.convert.Converter;
@ResourceDependencies({ @ResourceDependency(name = "base-component.reslib", library = "org.richfaces", target = "head"),
        @ResourceDependency(name = "jquery.watermark.js", library = "org.richfaces", target = "head"),
        @ResourceDependency(name = "placeholder.js", library = "org.richfaces", target = "head"),
        @ResourceDependency(name = "placeholder.css", library = "org.richfaces") })
public abstract class PlaceholderRendererBase extends RendererBase {
    public static final String RENDERER_TYPE = "org.richfaces.PlaceholderRenderer";
    @Override
    public void encodeEnd(FacesContext context, UIComponent componentthrows IOException {
        AbstractPlaceholder placeholder = (AbstractPlaceholdercomponent;
        // skip direct rendering for nested usage (workaround for RF-12589)
        if (placeholder.getSelector() == null || placeholder.getSelector().isEmpty()) {
            return;
        }
        super.encodeEnd(contextcomponent);
    }
    @Override
    public void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent componentthrows IOException {
        super.doEncodeEnd(writercontextcomponent);
    }
    public String getConvertedValue(FacesContext facesContextAbstractPlaceholder placeholder) {
        final Object value = placeholder.getValue();
        Converter converter = InputUtils.findConverter(facesContextplaceholder"value");
        if (converter != null) {
            return converter.getAsString(facesContextplaceholdervalue);
        } else {
            return value != null ? value.toString() : "";
        }
    }
New to GrepCode? Check out our FAQ X