src/main/java/de/ipb_halle/molecularfaces/component/molplugin/MarvinJSRenderer.java
/**
	 * Encodes the HTML part of the plugin editor into the writer. It consists of an
	 * &lt;iframe&gt; and a hidden &lt;input&gt; element.
	 * 
	 * @param context
	 * @param writer
	 * @param plugin
	 * @param iframeId      DOM id of the embedded &lt;iframe&gt; element
	 * @param hiddenInputId DOM id of the embedded hidden &lt;input&gt; element
	 */
Encodes the HTML part of the plugin editor into the writer. It consists of an
<iframe> and a hidden <input> element.


Encodes the HTML part of the plugin editor into the writer . It consists of an <iframe > and a hidden <input > element .
private void encodeEditorHTML(FacesContext context, ResponseWriter writer, MolPluginCore plugin, String iframeId,
			String hiddenInputId) throws IOException {
		String installPath = webXml.getContextParam(MarvinJSComponent.WEBXML_MARVINJS_BASE_URL, context, "");
		String embed = webXml.getContextParam(MarvinJSComponent.WEBXML_MARVINJS_WEBSERVICES, context, "").equalsIgnoreCase("true")
				? "/editorws.html"
				: "/editor.html";
		writer.startElement("iframe", plugin);
		writer.writeAttribute("id", iframeId, null);
		writer.writeAttribute("src", installPath + embed, null);
		writer.writeAttribute("style", "height:" + plugin.getHeight() + "px;width:" + plugin.getWidth() + "px;", null);
		writer.endElement("iframe");
		writer.startElement("input", plugin);
		writer.writeAttribute("type", "hidden", null);
		writer.writeAttribute("id", hiddenInputId, null);
		writer.writeAttribute("name", plugin.getClientId(), null);
		writer.writeAttribute("value", RendererUtils.convertValueToString(context, plugin, plugin.getValue()), "value");
		writer.endElement("input");
	}
private void encodeEditorHTML ( FacesContext context , ResponseWriter writer , MolPluginCore plugin , String iframeId , String hiddenInputId ) throws IOException { String installPath = webXml . getContextParam ( MarvinJSComponent . WEBXML_MARVINJS_BASE_URL , context , "" ) ; String embed = webXml . getContextParam ( MarvinJSComponent . WEBXML_MARVINJS_WEBSERVICES , context , "" ) . equalsIgnoreCase ( "true" ) ? "/editorws.html" : "/editor.html" ; writer . startElement ( "iframe" , plugin ) ; writer . writeAttribute ( "id" , iframeId , null ) ; writer . writeAttribute ( "src" , installPath + embed , null ) ; writer . writeAttribute ( "style" , "height:" + plugin . getHeight ( ) + "px;width:" + plugin . getWidth ( ) + "px;" , null ) ; writer . endElement ( "iframe" ) ; writer . startElement ( "input" , plugin ) ; writer . writeAttribute ( "type" , "hidden" , null ) ; writer . writeAttribute ( "id" , hiddenInputId , null ) ; writer . writeAttribute ( "name" , plugin . getClientId ( ) , null ) ; writer . writeAttribute ( "value" , RendererUtils . convertValueToString ( context , plugin , plugin . getValue ( ) ) , "value" ) ; writer . endElement ( "input" ) ; }
Encodes the HTML part of the plugin editor into the writer.
Encodes the HTML part of the plugin editor into the writer .
// inner <iframe> used for the plugin's rendering (aka the JavaScript target) // hidden <input>