src/main/java/de/ipb_halle/molecularfaces/component/molplugin/MolPaintJSRenderer.java
/**
	 * Encodes the HTML part of the plugin viewer into the writer. It consists of a
	 * &lt;div&gt; element that the Javascript plugin uses as rendering target.
	 * 
	 * @param context
	 * @param writer
	 * @param plugin
	 * @param divId         DOM id of the embedded &lt;div&gt; element
	 * @param hiddenInputId DOM id of the embedded hidden &lt;input&gt; element
	 */
Encodes the HTML part of the plugin viewer into the writer. It consists of a
<div> element that the Javascript plugin uses as rendering target.


Encodes the HTML part of the plugin viewer into the writer . It consists of a <div > element that the Javascript plugin uses as rendering target .
private void encodeViewerHTML(FacesContext context, ResponseWriter writer, MolPluginCore plugin, String divId,
			String hiddenInputId) throws IOException {
		writer.startElement("div", plugin);
		writer.writeAttribute("id", divId, null);
		writer.writeAttribute("style", generateDivStyle(plugin), null);
		writer.endElement("div");
		writer.startElement("input", plugin);
		writer.writeAttribute("type", "hidden", null);
		writer.writeAttribute("id", hiddenInputId, null);
		writer.writeAttribute("value", RendererUtils.convertValueToString(context, plugin, plugin.getValue()), "value");
		writer.endElement("input");
	}
private void encodeViewerHTML ( FacesContext context , ResponseWriter writer , MolPluginCore plugin , String divId , String hiddenInputId ) throws IOException { writer . startElement ( "div" , plugin ) ; writer . writeAttribute ( "id" , divId , null ) ; writer . writeAttribute ( "style" , generateDivStyle ( plugin ) , null ) ; writer . endElement ( "div" ) ; writer . startElement ( "input" , plugin ) ; writer . writeAttribute ( "type" , "hidden" , null ) ; writer . writeAttribute ( "id" , hiddenInputId , null ) ; writer . writeAttribute ( "value" , RendererUtils . convertValueToString ( context , plugin , plugin . getValue ( ) ) , "value" ) ; writer . endElement ( "input" ) ; }
Encodes the HTML part of the plugin viewer into the writer.
Encodes the HTML part of the plugin viewer into the writer .
// inner <div> is used for the plugin's rendering (aka the Javascript target) // hidden <input> without "name" attribute (prevents submission)