01.06.2013 Views

OpenEdge Development: Mobile Applications - Product ...

OpenEdge Development: Mobile Applications - Product ...

OpenEdge Development: Mobile Applications - Product ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

setItemTemplate( ) method<br />

setItemTemplate( ) method<br />

Specifies the format for items in all list views created during the JavaScript session.<br />

These settings can be overridden for specific list views by setListView( ). In<br />

addition, the __format__ parameter can be overridden for specific items by<br />

addItem( ).<br />

Return type: null<br />

Applies to: progress.ui.UIHelper class<br />

Syntax<br />

progress.ui.UIHelper.setItemTemplate( ‘string’)<br />

string<br />

An HTML string.<br />

It is not necessary to call setItemTemplate( ) unless:<br />

• You are not using a jQuery <strong>Mobile</strong> environment, or<br />

• You are using a jQuery <strong>Mobile</strong> environment, but you want to change the default<br />

settings (see below)<br />

<strong>OpenEdge</strong> <strong>Mobile</strong> provides a default item template for a jQuery <strong>Mobile</strong> environment.<br />

The following code fragment shows the default template values:<br />

progress.ui.UIHelper.setItemTemplate = '{__format__}';<br />

As shown in the preceding example, the template uses the following substitution<br />

parameters:<br />

• {__id__} — The internal ID of the record<br />

• {__page__} — The name attribute of the object pased as a parameter to<br />

setDetailPage( ), which defines the form for each individual list item<br />

• {__format__} — The format property of the object pased as a parameter to<br />

setListView( ) or (optionally) to addItem( ), which identifies the fields to be<br />

included for each item in the list view<br />

See also: setListView( ) method, addItem( ) method<br />

248 <strong>OpenEdge</strong> ® <strong>Development</strong>: <strong>Mobile</strong> <strong>Applications</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!