src/main/java/de/ipb_halle/molecularfaces/component/molplugin/MarvinJSComponent.java
/*
	 * webservices.js needs to be included if we use the viewer.
	 * 
	 * The usual trouble with loading resources dynamically: We cannot use
	 * isReadonly() in the constructor of the component, because the attribute from
	 * the view has not been applied to this component yet. That is why it is done
	 * in the {@link PostAddToViewEvent}.
	 */
webservices.js needs to be included if we use the viewer.

The usual trouble with loading resources dynamically: We cannot use
isReadonly() in the constructor of the component, because the attribute from
the view has not been applied to this component yet. That is why it is done
in the  PostAddToViewEvent.
webservices . js needs to be included if we use the viewer . The usual trouble with loading resources dynamically : We cannot use isReadonly () in the constructor of the component because the attribute from the view has not been applied to this component yet . That is why it is done in the PostAddToViewEvent .
private void processPostAddToViewEvent() {
		boolean useWebServices = webXml.isContextParamTrue(WEBXML_MARVINJS_WEBSERVICES, getFacesContext());
		if (isReadonly() && useWebServices) {
			getResourceLoader().addScriptExtToHead(baseDir + "/js/webservices.js");
		}
	}
private void processPostAddToViewEvent ( ) { boolean useWebServices = webXml . isContextParamTrue ( WEBXML_MARVINJS_WEBSERVICES , getFacesContext ( ) ) ; if ( isReadonly ( ) && useWebServices ) { getResourceLoader ( ) . addScriptExtToHead ( baseDir + "/js/webservices.js" ) ; } }
webservices.js needs to be included if we use the viewer.
webservices . js needs to be included if we use the viewer .