Looking for something that's not here? Let us know: support@tiggzi.com
Documentation‎ > ‎Services‎ > ‎Using on a screen‎ > ‎

Mapping Input and Output to UI

To start mapping UI to service or service to UI, open the Data Mapping tab:


To map UI to service, click on Request Mapping button. To map service to UI, click on Response Mapping button:


To create mappings, simply select the component property and drag it to service property. For example, in this example, Text property of component searchText is mapped to services q property:


The connection can be started from either the page side or the service side. A little green check will indicate whether a particular connection can be created. If connection is not possible, a red stop icon will be shown.

To delete a connection, select the connection and click the Delete button or the red icon:



Custom JavaScript

When doing input or output mapping, you always have a chance to write custom JavaScript before the mapping is done. 
  • For input mapping, the custom JavaScript will be invoked before the value is mapped to the request parameter
  • For output mapping, the custom JavaScript will be invoked before the value is mapped to the screen UI
When doing input mapping, click Add... button in JavaScript column:


When doing output mapping, click Add JavaScript button:



A JavaScript editor will open:


  • value
    • When doing input mapping, that's the value entered on the screen
    • When doing output mapping, that's the value returned by the service
  • element - is a jQuery Mobile element (component) which is being mapped.
  • At the end, a return statement is required to return the new value to the mapping.

You write any JavaScript here, you can use jQuery or any custom JavaScript.