NAMESPACE: packages/actionMexample/Views

View extends BootstrapView

This is a default View file. You see many references here and in components for style classes. Documentation for styles you can see under themes/example/styles

public properties
$components namespace Access your components through this variable. Built-in components can be accessed also directly from the view, but your custom components always through this object.
$theme
public function tab1()

Deprecated: Function create_function() is deprecated in /var/www/docs.appzio.com/public/wp-content/plugins/wp-gfm/markdown.php on line 301

Deprecated: Function create_function() is deprecated in /var/www/docs.appzio.com/public/wp-content/plugins/wp-gfm/markdown.php on line 302

View will always need to have a function called tab1. View can include up to five tabs, named simply tab2 etc. Advantage with tabs are, that all tabs are loaded when action is updated, so you can navigate between tabs without doing any refreshes. To navigate to another tab, define OnClick in the following way: $this->getOnclickTab(2);

View should always return a class, with at least one of these defined:

$this->layout->header[]

$this->layout->scroll[]

$this->layout->footer[]

$this->layout->onload[]

$this->layout->control[]

Each of these sections must be an array and the array can only include objects. Be careful with types, returning any other types will throw an error in the client.

Data from controller is accessed using $this->getData(‘fieldname’,’array’);

Data from controller must have type defined. This is to avoid data type errors which can happen rather easily without type casting.

links

public function getDivs()

Deprecated: Function create_function() is deprecated in /var/www/docs.appzio.com/public/wp-content/plugins/wp-gfm/markdown.php on line 301

Deprecated: Function create_function() is deprecated in /var/www/docs.appzio.com/public/wp-content/plugins/wp-gfm/markdown.php on line 302

Divs are containers that are loaded when action is refreshed and can be activated and hidden without actually refreshing the view. This makes it possible to build very complex interactions that don’t require turnaround to the server, thus providing much more responsive interface for the user.

Div’s are always named and referred by their names, so the getDivs must return an object with named divs inside of it. To show a div, you you use OnClickShowDiv.

In our example the showing of the div is handled by component getPhoneNumberField like this: $this->getOnclickShowDiv('countries',$clickparams)

public function addField_page1($field)

Deprecated: Function create_function() is deprecated in /var/www/docs.appzio.com/public/wp-content/plugins/wp-gfm/markdown.php on line 301

Deprecated: Function create_function() is deprecated in /var/www/docs.appzio.com/public/wp-content/plugins/wp-gfm/markdown.php on line 302

Model passes the fields that are configured using the webform (simple checkbox whether they are enabled or not) and adds them directly on the $this->layout->scroll[].

variable

$field
public function getDivider()

Deprecated: Function create_function() is deprecated in /var/www/docs.appzio.com/public/wp-content/plugins/wp-gfm/markdown.php on line 301

Deprecated: Function create_function() is deprecated in /var/www/docs.appzio.com/public/wp-content/plugins/wp-gfm/markdown.php on line 302

Simple small helper for providing a divider element.

public function setTopShadow()

Deprecated: Function create_function() is deprecated in /var/www/docs.appzio.com/public/wp-content/plugins/wp-gfm/markdown.php on line 301

Deprecated: Function create_function() is deprecated in /var/www/docs.appzio.com/public/wp-content/plugins/wp-gfm/markdown.php on line 302

Sets a small shadow on top of the view.