...
Code Block |
---|
if (S.value.length > 0) { eval('x=' + http.get('http://<hostname>/customers/?pattern=' + S.value)); C.options = x.customers; ID.options = x.ids; } |
This rule populates the dropdown Customers based on the list of customers returned by the GET method that is invoked by the rule. When a rule invokes http.get(), it also sets the Accept header in the request to 'application/json'. This causes the implementation to provide the JSON representation of the customer list. In this example, we return two JSON arrays: an array of names and an array of IDs. These arrays are used to populate the two dropdowns in the example - the Customer Names dropdown and the hidden Customer IDs dropdown. Try typing a search string (e.g. A). This will return the list of customers whose names start with A. Select a customer from the list. The second rule in this form ensures that the hidden Customer ID field is in sync with the selected customer.
The Form action for this form is set to the URI template: <nowiki>httphttp://<hostname>/frevvo/web/user/gallery/app/_73zHwep_EduZgK0BUzi1Ug/formtype/__AKE4PgqEdusGKt5_HoCDw?_method=POST&customer={ID}</nowiki>. As described in the [[#Multi_page_forms|Multi Page Forms]] section above, when the user clicks submit, the URI template above will be resolved based on the selected customer ID and the browser will be redirected to the resulting URI, which is simply that of the next form with a query parameter (customer=02, for example). This form is described below.
'''Customer Information''' This form is described in the [[#Updating_a_document|Updating a document]] section above. It GETs the XML representation for a specific customer using the third method in the table above, initializes the form with that information and displays it to the user. When submitted, the updated customer information is automaticlly PUT to the same [resolved] URI using the fourth method in the table above.
'''Create Customer''' This form is described in the [[#Creating_a_new_document|Creating a new document]] section above. When instantiated, it does a POST to the Read URI using the second method in the table above. This causes the server to create a new customer and return the URI of that customer. frevvo will automatically follow this URI, GET the representation of the customer and display the form (presumably with empty values). When the user enters all required fields and submits the form, frevvo will automatically PUT the resulting XML document to the URI for the newly created customer thereby updating the customer.
...
You can find further discussion of this example on the frevvo blog. The relevant articles are: [http://www.frevvo.com/blog/?p=26 Part 1] and [http://www.frevvo.com/blog/?p=32 Part 2]. Other articles that may be of interest are [http://www.frevvo.com/blog/?p=23 How do I use my brand new WOA?] and [http://www.frevvo.com/blog/?p=35 Ajax+REST: the next killer app?].===
PaperVision® / ImageSilo® Connector
...
frevvo Live Forms supports direct connectivity with Digitech Systems' PaperVision® and ImageSilo® document management products. This Connector allows you to save submissions to the PaperVision® and ImageSilo® document management repository as PDF, TIFF, .JPG and .GIF format.====
Installation Instructions
...
If you are using Live Forms Online there is nothing to install. If you are using Live Forms In-house:#
- copy <frevvo install dir>\frevvo\ext\connectors\pve.war to <frevvo install dir>\frevvo\tomcat\webapps
...
- If your are sending your form submissions to ImageSilo https://login.imagesilo.com then the connector requires no further configuration
...
- If you are submitting to a local installation of PaperVision then edit the connector's web.xml to configure the local URL path. Replace login.imagesilo.com with the host:port of your PaperVison installation.
Edit <frevvo installdir>/frevvo/webapps/pve/WEB-INF/web.xml
Code Block |
---|
...
<context-param> |
...
<param-name>frevvo.pve.login.url</param-name> |
...
<param-value>https://login.imagesilo.com/HTTPInterface.asp</param-value> </context-param> |
...
In your browser, go to: '''<nowiki>http://<server-name>[:port]/pve/test</nowiki>'''. You should see a message "Your PVE Connector request was successfully handled." This means the connector is properly installed.
...