Developer Home
MAX Overview
API Reference
Download
| MAX XML Reference
Note : the XML Schema (What is a XML Schema?) for the MAX XML Language reference ce can be found here :
http://www.upvise.com/developer/max.xsd
| Tag Name |
Attributes |
Description |
| <max> |
id
version |
the root element of a MAX application |
| <title> |
|
set the title of the application |
| <description> |
|
a description for the application |
|
<category> |
|
category of the application |
|
<datasrc> |
id |
defines a new data source for the application |
| <webservice> |
type="query|rss" |
sets the URL of the web service for this data source. |
|
<field> |
type="primarykey|string|integer|date"
values="value1:label1|value2:label2|...." |
defines a field in a data source |
| <page> |
id
nextprevious="true" |
declares a page, representing one screen on the phone |
|
<query> |
id
type="select|insert|update|delete|rss"
mode="aynchronous|synchronous|offline" |
defines a data query on a data source to be used in a page. |
|
<title> |
icon="star|new" |
set the title of the page |
|
<item> |
id
href
onclick
type="text|select|checkbox|numeric|decimal|email|phonenumber|date"
label="shortlabel|longlabel|editboxlabel"
options="value1:label1|value2:label2|..."
selected="true|false"
visible="true|false"
icon="star|new|delete|checked" |
Defines an item in a list or in a menu |
|
<textarea> |
id
onclick
visible="true|false"
|
Defines a text area of HTML formated content. Takes the entire page. |
|
<menu> |
|
defines a set of menu items for the page |
<max>
This is the root tag for the MAX File. It defines a MAX application. A <max>
element contains
Attributes:
- id="companyid.appid" (mandatory)
- Uniquely identifies a MAX app amongst all others.
Its value must be in the form companyid.appid. companyid identifies
your company is assigned to you by Upvise at your request. appid. The system companyid
is reserved by the Upvise client to defined system applications, such as system.home,
system.settings. See the list of system MAX applications.
- version="major.minor.build" (mandatory)
- Set the version number for this MAX app. It allows automatic MAX application deployment to the Upvise client on mobile phones.
<title>
The title tag directly under the max tag defines the name of the application as it appears in the user list of applications on the phone.
This element is mandatory.
<description>
gives a short description of the MAX app. it is used when uplaoding the MAX app to the Upvise catalog of apps.
This element is optional.
<category>
Used by the MAX app catalog to categorize the application. Values can be :
Essentials, News & Reference or Productivity.
This element is optional.
<datasrc>
Declares a new data source for the MAX application. Parent tag is <max>. Multiple
<datasrc> tags can be declared.
Child elements:
Attributes:
- id (mandatory)
- The datasource id. Must be unique amongst all other datasources. Used to build queries.
See <query> tag.
<webservice>
the content of this tag is the absolute URL of the web service associated with the
data source. Support the {UWS.BASE}, {UWS.PUBLIC} and {UWS.USER} variable pointing
to Upvise base web services servers.
The following attributes are supported:
- type="query|rss" (mandatory)
- use type=query for UWS Web service URL providing delta sync. use type=rss for a
plain read only RSS feed.
This element is optional. If not specified, the datasource data are only local and
cannot be fed or synchronized with a server.
<field>
Defines a field for the data source. Content of this tag is the field name, it must
contains only a to z characters. Field names are used when defining queries in a
<query> tag.
The following attribute is supported:
- type="primarykey|string|integer|date" (mandatory)
-
You can have only one primarykey field in a data source. Its name MUST BE id. Primary key are of type string.
- values="value1:label1|value2|label2|...." (optional)
- Defines an optional list of value, label pairs which restraint the possible
values for the field. Only integer values are supported. You can then display the
associated label instead of the actual value when performing data binding
using the following syntax : {data.fieldname.displayvalue}.
<page>
Declares a new page for the MAX application. A page contains:
A page supports the following attributes:
- id (mandatory)
- Identifier of the page. Must be unique amongst all other pages. Used to navigate to other pages using the href attribute of the
<item> tag.
- nextprevious="true" (optional)
- Enables next / previous page navigation using the left / right arrow keys.
<query>
Defines a query to be used with the current page. value of the tag is a url in the
format : datasourceid?field1=value1&field2=value2 .....
Attributes:
- id (mandatory)
-
identifier for the query, must be unique amongst all other queries in the current
page. Used to perform data binding {queryid.fieldname} for select
queries, and in the the query.execute() function in for update/insert/delete
queries.
- type="select|insert|update|delete|rss|sendget|sendpost" (mandatory)
- Defines the type of the query. Queries of type select and
rss are used to perform databinding on other elements during the
page rendering. insert, update and delete queries are performed
only against local datasources and are called using the queryid.execute() script in onclick
attribute on a <item> element.
sendget and sendpost
queries are used to send data to any URL by HTTP GET or POST and are also called
using a query.execute() script.
- mode="asynchronous|synchronous|offline" (optional)
- Defines the behavior of the query in case an HTTP request to the
<webservice> of the datasource is required. asynchronous
queries are executed after page execution, ie it is not blocking. Synchronous
queries are executed before the page rendering, ie blocking. offline
queries never connect to the web service and not blocking Default is asynchronous
is no mode is specified.
<title> (under the page element)
its content set the page title which appears on the top of the screen.
Attributes:
- icon="new|star" (optional)
- Displays an star or new icon in the right part of the title.
<item>
This is one of the most imporant visual tags in the MAX language: It is basically
a list item in a <page> element or an menu item inside a <menu> element.
When clicked, a item can have the following behavior:
- navigate to annother page using the href attribute
- execute some script, such as insert, update or delete queries, or manipulate the
DOM (Document Object Model) of the Upvise client.
- popups a edit box (attribute type=text) or change its content bycling throught possibles
option values (attribute type="select" and options attribute)
The tag content contains the text to displayed for the item.
Attributes:
- id (optional)
- identifies the item. Used by the {this.id}
variable or by the item.edit() script function
- href="pageid|max://appid/pageid" (optional)
- Defines a link for this item. A link can be another page in the current MAX application,
in this case href="pageid", where pageid is the
id attribute of the <page> in the current app. It can
also be another page in another MAX application, href="max://maxid/pageid".
maxid is the id attribute of the other <max>
application, and pageid the id attribute of the target
<page>. If no pageid is specified, it opens the first
page of the target MAX application. For example href="max://system.home"
goes to the home screen of the Upvise client.
- onclick="some script" (optional)
- contains some script to be executed when the user presses the center button of the phone
on this item. The onclick script is always exeucted because the navigation to the
href link occurs, if any. If the script contains some function which already navigates
to a page, the navigation to the href link does not occur. See the
Script Reference.
- type="text|select|checkbox|numeric|decimal|phonenumber|date" (optional)
- by default <item> text content is readonly. If a type atribute is set, the
text content of the item is editable. See below the editable
item section
, combo box item section and
check box item section
for more details.
- label="shortlabel|longlabel|editboxlabel" (optional)
- Contains a label description, displayed left to the item content when a
type attribute is present. A shortlabel is displayed when
the text content is not empty, left to it. a longlabel can be displayed
instrad of the shortlabel when the item text content is empty and
finaly and editboxlabel is used in the dialog box title for modifying
the content, Both longlabel and editboxlabel are
optional.
- options="value1:label1|value2:label2|...." (optional)
- This attribute is to be used when type="select" is specified. it contains a pipe
separated list of couple (value:label) containing all possibles values for the combo
box item.
- selected="true|false" (optional)
- if present, the current <item> is selected when the page is displayed. If
not present, the first item in the list is selected. possibles values are true or
false, but the value of the attribute can contain script variables,
dynamically resolved to true or false as well.
- visible="true|false" (optional)
-
if visible=false, the item is not displayed in the list or in the menu, but
it is still scriptable using the item.edit() function. By default, items are visible.
- icon="new|star" (optional)
- Displays an star or new icon in the right part of the item. This is useful
as a visual indication for action such as adding new items or the user's saved or
starred items.
Editable item
To define an editable item, use the type="text" attribute. if you
want to further restrict the kind of data the user can enter, use:
- type="numeric" for positive/negative numeric numbers (+-0 to 9)
- type="decimal" for positive/negative decimal numbers
- type="phonenumber" for entering phone numbers
- type="date" to enter a date
You can also the optional label attribute to display a label left to the
item text.
When the user presses the enter button on the phone, a edit box dialog appear and
allows to modify the item text content. If the user modifies the content, the
onclick script and then the href link are executed.
Combo box item
To define a combo box, use type="select" and set in the
options attribute all posssibles values and labels for the combo
box. Use also the optional label attribute to display a label left
to the combo box.
When the user presses the enter button on the phone, the text of the item cycles
through all possibles values for the combo box. After each change of the content
the onclick script is executed if any. You can use the
{this.text} script variable in the onclick attribute of
the item to retrieve the current value of the item.
Check box item
To define a checkbox use type=checkbox. Use also the optional label
attribute to display a label left to the checkbox.
A checkbox appears instead of the text content. To set a checked state, set the
item text content to 1, or 0 for unchecked.
When the user presses the enter button on the phone, the state of the checkbox toggles
between checked and unchecked. After each change of the state, the onclick script
is executed if any.
<textarea>
Displays an text area containing the HTML formated content of this element in the
entire phone screen. Only one <textarea> element is authorized within a <page> element and cannot be mixed with <item>
elements.
Attributes:
- id (optional)
-
identifies the item. used by the {this.id}
variable or by the item.edit() script function
- onclick="some script" (optional)
-
contains some script to be executed when the user clicks on an hyperlink in the
HTML content. You can use the {document.selectedlink}
variable inside the onclick attribute to retrieve the href
attribute of the selected hyperlink and implement a custom behavior, such as navigation
to another page. See Variable Reference and
Script Reference for more information.
- visible="true|false"
(optional)
-
if visible=false, the item is not displayed in the list or in the menu, but it is
still scriptable using the item.edit() function. By default, items are visible.
-
|