Custom Apps : Create Fully Custom Apps in the App Editor : Custom App Basics: Connect, Run and Render : Add Dependency Information
Add Dependency Information
In addition to invoking a mashable or mashup in the app implementation, you should add dependency information to the App Specification. Presto automatically generates dependency information for basic apps. For custom apps, you must add this manually.
You define dependency information in the <dependson> section of the App Specification. Presto uses this information when administrators deploy apps to new environments or upgrade to new Presto versions to ensure that all the artifacts and resources that the app uses are also deployed or updated.
Add a <resource> child and fill in the ID of the mashable or mashup and the operation name. The type is always service for a mashable or mashup.
<app id="SimpleInvoke" name="SimpleInvoke"
jsclass="Sample.SimpleInvoke"
minimizable="false" draggable="false"
height="200" width="200">
<title>Simple Invoke</title>
<description>Sample to invoke one mashable and render results in a simple table. This sample uses the sample mashable Yahoo local search which you must register in Presto before using this sample.</description>

<dependson>
<resource name="YahooLocalSearchREST" operation="getData"
type="service"/>
</dependson>

<properties/>
<presto-meta name="presto.desktopCompatible"
type="text">true</presto-meta>
<presto-meta name="presto.phoneCompatible"
type="text">false</presto-meta>
<presto-meta name="presto.tabletCompatible"
type="text">false</presto-meta>

<requires>
<require name="jquery-tmpl" type="library" version="1.0"/>
<require src="js/app.js" type="script"/>
<require src="css/app.css" type="css"/>
<require src="html/app.html" type="html"/>
</requires>
</app>
This completes the app, which is now ready to test.
Copyright © 2006-2015 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback