Versions Compared

Key

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

...

Note

After the upload, the command prompt now includes the name of the uploaded form (''../forms/TitleDepartment'').

Source Code Example

Java DocsDoc

Creating a Form/Flow

You can use the forms> create command to create a new form or a flow. You first select the application to which you want to add the new form, list its forms, and then create the form.

...

You can edit the form in the designer as if you had logged in through the UI. Make any changes you want to the form, and then click Finish or Cancel to exit the designer. You return to the UI login page.

Source Code Examples

Java DocsDoc

Using a Form/Flow

Once you've selected a form, you can use it; this is, you can run the form as an end-user would. See the Editing a Form/Flow topic above for instruction on selecting a form. Then simply type use at the command prompt and press Enter.  opens the form or flow in your browser.

Code Block
localhost:8082/david@monahan.com/apps/DTM July 2011/forms/Address Book> use

Using form: http://localhost:8082/frevvo/web/tn/monahan.com/user/david/app/_W0jPga4rEeCMGZK99v93jw/formtype/_fNScEK4rEeC
MGZK99v93jw?embed=true&_method=post&apikey=IIGGTVxO1DtiDmUSnIiLzmXQjd6SGJ5c%252FpLVUNm%252FKE8AWzjV0xakncsLKl2aocCYxj3lH
uYWNr5q4Su8O%252FQlyQ%253D%253D

localhost:8082/david@monahan.com/apps/DTM July 2011/forms/Address Book>

Source Code Example

Java DocsDoc

Display a List of the Controls in a Form

...

Source Code Example

Java Docs===

Downloading and Uploading an XSD

...

You can download and upload the schema (XSD file) for a form. In the frevvo UI, you download a form schema from the application page when you're editing an application; you upload a schema from the schema page.====

Download

...

To download a form schema, you first select the form you want and then use the '''[form name]> schema''' command command.<pre>

Code Block
localhost:8082/maggie@monahan.com/apps/Sand Box> forms

...


-----------------------------------------------------------------------------------------

...


URL ! http://localhost:8082/frevvo/web/tn/monahan.com/api/formtypes

...


    # | UPDATED                 | KIND | READONLY | VISIBILITY   | NAME

...


    1 | 2011-08-10T10:47:24.210 | FORM | false    | PUBLICTENANT | Order Form

...


-----------------------------------------------------------------------------------------

...


localhost:8082/maggie@monahan.com/apps/Sand Box/forms> select 1

...


-----------------------------------------------------------------------------------------

...


            ID | _bQdBsLSPEeCTSNrzu9T5_w!_PpnhcbSPEeCTSNrzu9T5_w!maggie

...


           URL | http://localhost:8082/frevvo/web/tn/monahan.com/api/formtype/_bQdBsLSPEeCTSNrzu9T5_w!_PpnhcbSPEeC

...

 TSNrzu9T5_w!maggie

...


       UPDATED | 2011-08-10T10:47:24.210

...


          NAME | Order Form
   DESCRIPTION | Mail Order Form
          KIND | FORM
      READONLY | false
    VISIBILITY | PUBLICTENANT
-----------------------------------------------------------------------------------------

...


localhost:8082/maggie@monahan.com/apps/Sand Box/forms/Order Form> schema

...


Downloaded formtype schema: D:\downloads\OrderForm_7212269303367570502_form.xsd

...


localhost:8082/maggie@monahan.com/apps/Sand Box/forms/Order Form>

...

[http://static.frevvo.com/resources/docs/site/4.1.5/com.frevvo.forms.cli/xref/com/frevvo/forms/cli/shell/FormTypeEntryShell.html Source Code Example]

[http://static.frevvo.com/resources/docs/com.frevvo.forms.java-4.1.4-javadoc/com/frevvo/forms/client/FormTypeEntry.html Java Doc]

==== Upload ====

TBD

[http://static.frevvo.com/resources/docs/site/4.1.5/com.frevvo.forms.cli/xref/com/frevvo/forms/cli/shell/SchemaFeedShell.html Source Code Example]

[http://static.frevvo.com/resources/docs/com.frevvo.forms.java-4.1.4-javadoc/com/frevvo/forms/client/SchemaFeed.html Java Doc]

=== Creating a Form Instance from XML ===

...

Source Code Example

Java Doc

Upload

TBD

Source Code Example

Java Doc

Creating a Form Instance from XML

After you select a form in an application, you can use the [form-name]> newXml command to create an instance of the form and fill the form with data values from an XML file. You can then submit the form, or reset it to remove the XML data.<pre>

Code Block
localhost:8082/david@monahan.com/apps/DTM July 2011/forms> select 3

...


-----------------------------------------------------------------------------------------

...


             ID | _hEahgK5GEeCMGZK99v93jw!_W0jPga4rEeCMGZK99v93jw!david

...


            URL | http://localhost:8082/frevvo/web/tn/monahan.com/api/formtype/_hEahgK5GEeCMGZK99v93jw!_W0jPga4rEeCMGZK99v93jw!david

...


        UPDATED | 2011-08-08T11:29:18.522

...


           NAME | TitleDepartment
    DESCRIPTION | Edit the form to change this description.
           KIND | FORM
       READONLY | false
     VISIBILITY | PUBLICTENANT
-----------------------------------------------------------------------------------------

...


localhost:8082/david@monahan.com/apps/DTM July 2011/forms/TitleDepartment> newXml d:\downloads\Maggie-FormData.xml

...


-----------------------------------------------------------------------------------------

...


FORM instance #1 [name=TitleDepartment, url=http://localhost:8082/frevvo/web/tn/monahan.com/user/david/app/_W0jPga4rEeCM

...


GZK99v93jw/form/_SwqY48UMEeCW_YwbL7w9ig?typeId=_hEahgK5GEeCMGZK99v93jw&locale=&embed=true&apikey=lF4OpTMA66sWnh7Z6i0tfT%

...


252BVZJd72Q91e2GaqWNwTmcP1kRYuNeW%252Bk1CC9%252BSdXGWNKQcoNY7FyU2WdcYtRs95w%253D%253D]

...


-----------------------------------------------------------------------------------------

...


localhost:8082/david@monahan.com/apps/DTM July 2011/forms/TitleDepartment/Instance #1> ?list

...



Name     Abbr     ArgNum     Descr
print               0        PRINT this instance URL (e.g. 'print')

...


reset               0        RESET this form instance (e.g. 'reset')

...


submit              0        SUBMIT this form instance (e.g. 'submit')

...



localhost:8082/david@monahan.com/apps/DTM July 2011/forms/TitleDepartment/Instance #1>

</pre>If you paste the form URL into your browser address bar, you can open the form instance and see the XML values in the form fields. You can Submit of Cancel the form from the browser, or you can use '''Instance #1> submit''' or '''Instance #1> reset''' from the command line.[[Image:Api-pix_FormFromXML.png]][http://static.frevvo.com/resources/docs/site/4.1.5/com.frevvo.forms.cli/xref/com/frevvo/forms/cli/shell/FormTypeEntryShell.html Source Code Example]

[http://static.frevvo.com/resources/docs/com.frevvo.forms.java-4.1.4-javadoc/com/frevvo/forms/client/FormTypeEntry.html Java Doc]

===  or Instance #1> reset from the command line.

Image Added

Source Code Example

Java Doc

Using a Custom XSD in a Form

...

You can use an XSD schema file to populate a form with controls. You can add the entire XSD schema to the form or individual controls. This example uses the API to upload a custom schema to an applicatio, add one of the top-level XSD elements to a form and then shows the result in the designer UI.====

Upload a custom XSD

...

The first step is to upload a custom XSD into an application. The following commands will list the existing schemas in the current application and then upload a new one (this assumes that there is an XSD named purchaseorder.xsd located in the /xsd folder):<pre>

Code Block
localhost:8080/admin@test/apps/Sand Box> schemas

...


-----------------------------------------------------------------------------------------

...


URL ! http://localhost:8080/frevvo/web/tn/test/api/schemas

...

 
    # | NAME                                   | DESCRIPTION
-----------------------------------------------------------------------------------------

...


localhost:8080/admin@test/apps/Sand Box> up /xsd/purchaseorder.xsd

...


-----------------------------------------------------------------------------------------

...


            ID | _XX4VQQvREeGt8aM2YoQyaQ!_-4fOMQvQEeGt8aM2YoQyaQ!admin

...

 
           URL | http://localhost:8080/frevvo/web/tn/test/api/schema/_XX4VQQvREeGt8aM2YoQyaQ!_-4fOMQvQEeGt8aM2YoQyaQ!admin

...


       UPDATED | 2011-11-10T14:22:44.754-05:00

...

 
          NAME | http://tempuri.org/po.xsd

...

 
   DESCRIPTION | http://tempuri.org/po.xsd

...


-----------------------------------------------------------------------------------------

...


localhost:8080/admin@test/apps/Sand Box/schemas/http://tempuri.org/po.

...

xsd> 

Upload Source Code ]

Now, the purchaseorder.xsd has been upload and you can verify that this is the case by going directly to the frevvo UI  UI in Applications->Schemas.====


Add an new XSD data source to a form

...

First, let's create a new form.<pre>

Code Block
localhost:8080/admin@test/apps/Sand Box/schemas/http://tempuri.org/po.

...

xsd> exit

...


Schema http://tempuri.org/po.xsd successfully uploaded

...


localhost:8080/admin@test/apps/Sand Box/schemas> exit

...


localhost:8080/admin@test/apps/Sand Box> forms

...


-----------------------------------------------------------------------------------------

...


URL ! http://localhost:8080/frevvo/web/tn/test/api/formtypes?ownerId=_-4fOMQvQEeGt8aM2YoQyaQ!admin

...


  # | UPDATED                  | KIND    | READONLY | VISIBILITY    | NAME

...



-----------------------------------------------------------------------------------------

...


localhost:8080/admin@test/apps/Sand Box/forms> create PurchaseOrder

...


-----------------------------------------------------------------------------------------

...


            ID | _leQIIAvTEeGt8aM2YoQyaQ!_-4fOMQvQEeGt8aM2YoQyaQ!admin

...

 
           URL | http://localhost:8080/frevvo/web/tn/test/api/formtype/_leQIIAvTEeGt8aM2YoQyaQ!_-4fOMQvQEeGt8aM2YoQyaQ!admin

...


       UPDATED | 2011-11-10T14:38:37.863

...

 
          NAME | PurchaseOrder 
   DESCRIPTION | Edit the form to change this description. 
          KIND | FORM 
      READONLY | false 
    VISIBILITY | PRIVATE
-----------------------------------------------------------------------------------------

...


localhost:8080/admin@test/apps/Sand Box/forms/PurchaseOrder> 

</pre>Now that we have a new form, we need to add a new XSD data source to the form using the API, which is the equivalent to adding a new data source in the designer by clicking the '''Data Sources''' panel  panel and then clicking '''New from XSD''' as  as shown in the following screenshots.

[[Image:api-pix_Form-fromXSD-1.png]]frevvo displays Image Added

 displays the available schemas in the current application. You can then click [[Image:Add.png]] to Image Added to select the XSD you want to use. frevvo adds  adds it to the Data Sources panel.[[Image:api-pix_Form-fromXSD-2.png]]


Image Added

Here is how to add a new data source using the API.<pre>

Code Block
localhost:8080/admin@test/apps/Sand Box/forms/PurchaseOrder> docs

...


-----------------------------------------------------------------------------------------

...



URL ! http://localhost:8080/frevvo/web/tn/test/api/doctypes?ownerId=_leQIIAvTEeGt8aM2YoQyaQ!_-4fOMQvQEeGt8aM2YoQyaQ!admin

...


    # | NAME                                   | DESCRIPTION

...

 
1 | http://www.frevvo.com/schemas/_leQIIAvTEeGt8aM2YoQyaQ#form | null

...



-----------------------------------------------------------------------------------------

...


localhost:8080/admin@test/apps/Sand Box/forms/PurchaseOrder/docs>

...

 

There should be only one element in the docs feed for the default, from-palette schema. Now we need to add the '''purchaseOrder''' element purchaseOrder element from the '''http://tempuri.org/po.xsd''' XSD  XSD targetNamespace to the form:<pre>

Code Block
localhost:8080/admin@test/apps/Sand Box/forms/PurchaseOrder/docs> add purchaseOrder http://tempuri.org/po.xsd

...


DocumentType (http:

...

/

...

/

...

tempuri.

...

org/

...

po.xsd#purchaseOrder) added to form PurchaseOrder
localhost:8080/admin@test/apps/Sand Box/forms/PurchaseOrder/docs>

Source Code

Let's open the designer to see the result:<pre>

Code Block
localhost:8080/admin@test/apps/Sand Box/forms/PurchaseOrder/docs> exit

...


localhost:8080/admin@test/apps/Sand Box/forms/PurchaseOrder> edit

...


Editing form: http://localhost:8080/frevvo/web/tn/test/user/admin/app/_-4fOMQvQEeGt8aM2YoQyaQ/formtype/_leQIIAvTEeGt8aM2YoQyaQ?edit=true&embed=true&_method=post&apikey=bxZrlQFZvJ%252Fj02XW1RpzECYR0i7Fu3fbdBSDDn4XovH2wLbv9H8FagSHYFOUEk%252F%252FcMlX08rSOAnPE0HHk8TQFQ%253D%253D

...


localhost:8080/admin@test/apps/Sand Box/forms/PurchaseOrder> 

...

Note

It is not possible to auto-generate controls from '''Data Sources''' schemas. So the form designer would still have to perform this step manually.

Click [[Image:Add.png]] next to '''form''' to Image Added next to form to add all the controls to the new form, or click the individual controls you want. frevvo adds them to the form. Click '''Finish''' when Finish when you're done to exit the UI.

[[Image:api-pix_Form-fromXSD-3.png]Image Added]

You can now use the new form from the command line.<pre>

Code Block
localhost:8080/admin@test/apps/Sand Box/forms/PurchaseOrder> use

...


Using form: http://localhost:8080/frevvo/web/tn/test/user/admin/app/_-4fOMQvQEeGt8aM2YoQyaQ/formtype/_leQIIAvTEeGt8aM2YoQyaQ?embed=true&_method=post&apikey=bxZrlQFZvJ%252Fj02XW1RpzECYR0i7Fu3fbdBSDDn4XovH2wLbv9H8FagSHYFOUEk%252F%252FcMlX08rSOAnPE0HHk8TQFQ%253D%253D

...


localhost:8080/admin@test/apps/Sand Box/forms/PurchaseOrder>

...