Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

      4. Save the file and restart .

Adding a Custom Button to the Designer Tool Bar

Adding a custom button to the  tool bar can be accomplished with the frevvo.form.edit.toolbar.buttons context parameter in the web.xml file. The value of the parameter is a JSON string that determines which buttons are visible in the toolbar. This context parameter is not optional - if it is not present there will be no buttons in the designer toolbar. 

Here is an example of how to edit the web.xml file to add the configuration parameter to add a custom Test Form button to the toolbar. The comment shows example JSON to add a new button. You can specify an id, a class and a title.  Be sure to rezip the frevvo.war file, as described above, when the changes are complete. 

Code Block
<context-param>
		<param-name>frevvo.form.edit.toolbar.buttons</param-name>
		<param-value>{"buttons":[{"id":"e-preview-form"},{"id":"e-edit-form"},{"id":"e-rules-form"},{"id":"e-formactions-form"},{"id":"e-docactions-form"},{"id":"cancel-top"},{"id":"commit-top"}]}</param-value>
		<!--
		Example JSON to add a new toolbar button.
		<param-value>{"id":"e-test-form","class":"e-test-form e-toolbar-icon","title":"click to test the form"}</param-value>
		-->
		<description>Which edit mode toolbar buttons are rendered in the form designer</description>
</context-param>
This will generate something like this:
Code Block
<a id="{id}" title="{title}" class="{class}" href="#" onclick="return CustomWizard.show('{id}');"></a>

CustomWizard.show(id) calls your code. Make sure it is defined. The FrevvoCustomActions, as shown below, is an example:

Code Block
var CustomWizard = {
	show: function (id) {
		if (parent.FrevvoCustomActions)
			parent.FrevvoCustomActions.doAction (id);
		else if (FrevvoCustomActions)
			FrevvoCustomActions.doAction (id);
	}
}

 

Branding CSS

OEM partners can use the context parameter, frevvo.oem.branding.class to name a css class that will be placed onto the body of the  UI pages (form designer, etc.). Set the context parameter, frevvo.oem.branding.class  to oem in the web.xml file. The web.xml  file is located in <frevvo-home>\WEB-INF\web.xml after the <frevvo-home>\tomcat\webapps\frevvo.war file is unzipped to a temporary directory. Refer to Installation Tasks for the steps to unzip and repackage frevvo.war after parameters in web.xml and any other files have been edited.

...