vegui. client. class.js

This is the library for the vegUIClient widget that represents the front end for the PHP based vegUIServe back-end

API documentation for vegUIServe may be found at http://doc.vegui.org/veguiserve

Summary
This is the library for the vegUIClient widget that represents the front end for the PHP based vegUIServe back-end
defines the protocol type in which the client receives data from the server
wrapper for parseInt, because its too long and i need it a lot ;D
Returns node attribute or default value
An extended vegUIManager object that can communicated with the VegUIServe server application (vegui PHP backend)
VegUIManager::init_bridge is called on creation
displayed an alert popup
Takes the uiop string received from the server and splits it up accordingly.
Execute userinterface operations
Execute userinterface operations by XML protocol
Sends a request to the server

Constants

User Interface Operations

VUI_UIOP_REQUESTsend request to server
VUI_UIOP_ROUTEroute operation to a certain module
VUI_UIOP_ALERTdisplay alert message

VUI_CLIENT_PROTOCOL

defines the protocol type in which the client receives data from the server

Possible values

’xml’XML is used as protocol (default)
’vegui’bitmask protocol with user interface operation calls is used

Functions

pi

function pi(str)

wrapper for parseInt, because its too long and i need it a lot ;D

vui_node_attr

function vui_node_attr(node,
name,
d)

Returns node attribute or default value

Parameters

Node nodenode
string nameattribute name
<variable d>default value

Returns

<variable>default value if no attribute of the specified name was found on the submitted node
<variable>attribute

VegUIClient

An extended vegUIManager object that can communicated with the VegUIServe server application (vegui PHP backend)

Hierarchy

extends VegUIManager

this elment inherits all methods and properties from VegUIManager

Summary
VegUIManager::init_bridge is called on creation
displayed an alert popup
Takes the uiop string received from the server and splits it up accordingly.
Execute userinterface operations
Execute userinterface operations by XML protocol
Sends a request to the server

Properties

Object Properties

Note

VegUIManager::init_bridge is called on creation

Functions

alert

this.alert = function(str)

displayed an alert popup

Bridge. execute

this.Bridge.execute = function(vreq)

Takes the uiop string received from the server and splits it up accordingly.  Then <exec_uiop> is called to execute the ui operations

exec_uiop_client

this.exec_uiop_client = this.exec_uiop = function(p)

Execute userinterface operations

Alias

exec_uiop()

Parameters

array parray holding operation data

Returns

int1 if there was an operation triggered
int0 if there was no operation triggered

exec_xml_client

this.exec_xml_client = this.exec_xml = function(xml)

Execute userinterface operations by XML protocol

Alias

exec_xml

Parameters

Node xmlnode

Returns

int1 if there was an operation triggered
int0 if there was no operation triggered

request

this.request = function(scriptName,
parameters,
method)

Sends a request to the server

Parameters

string scriptNamename of the script to execute
<string parameters>paramters to send with the request (&a=1&b=2)
<string method>request method, ie ‘POST’ or ‘GET’
function pi(str)
wrapper for parseInt, because its too long and i need it a lot ;D
function vui_node_attr(node,
name,
d)
Returns node attribute or default value
this.init_bridge = function()
initializes common VegUIBridge object that can be accessed by all spawned VegUIElements by accessing it over their Manager property
this.alert = function(str)
displayed an alert popup
this.Bridge.execute = function(vreq)
Takes the uiop string received from the server and splits it up accordingly.
this.exec_uiop_client = this.exec_uiop = function(p)
Execute userinterface operations
this.exec_xml_client = this.exec_xml = function(xml)
Execute userinterface operations by XML protocol
this.request = function(scriptName,
parameters,
method)
Sends a request to the server
Spawns and keeps track of all vegUI elements