addOptionIfSetAndNotDefault("text", getInputValue(context, watermark), options);
return options;
}
protected void writeInitFunction(FacesContext context, UIComponent component) throws IOException {
AbstractWatermark watermark = (AbstractWatermark) component;
ResponseWriter writer = context.getResponseWriter();
String clientId = watermark.getClientId(context);
final Map<String, Object> options = getOptions(context, watermark);
options.put("targetId", watermark.getTargetClientId(context));
writer.writeText(new JSObject("RichFaces.ui.Watermark", clientId, options).toScript(), null);
}