Class SweetDevRia.Zone
RIA Zone
Defined in: Zone.js.
Constructor Attributes | Constructor Name and Description |
---|---|
SweetDevRia.Zone(id, loadAtStartup, url, refreshDelay, addInputs)
|
Field Attributes | Field Name and Description |
---|---|
<static> |
SweetDevRia.Zone.REDIRECT_EVENT
This event type is fire when the zone is redirected
|
<static> |
SweetDevRia.Zone.REFRESH_EVENT
This event type is fire when the zone is refreshed
|
Method Attributes | Method Name and Description |
---|---|
afterCallServer(newUrl, params)
This method is called after having processed a call to the server for this zone content
To be overridden !!
|
|
afterOnCallServer(evt)
This method is called after processing the server response
|
|
afterOnZoneRedirect(evt)
This method is called after processing the server redirection demand
|
|
afterZoneRedirect(newUrl, params)
This method is called after having processed a redirect to the server for this zone content
To be overridden !!
|
|
beforeCallServer(newUrl, params)
This method is called before processing a call to the server for this zone content
To be overridden !!
|
|
beforeOnCallServer(evt)
This method is called before processing the server response
To be overridden !!
|
|
beforeOnZoneRedirect(evt)
This method is called before processing the server redirection demand
To be overridden !!
|
|
beforeZoneRedirect(newUrl, params)
This method is called before processing a redirect to the server for this zone content
To be overridden !!
|
|
callServer(newUrl, paramsMap, stack)
Call the server
|
|
<private> |
Cancel this zone context as the current one
|
Cancel the timer on the zone
|
|
<private> |
destroy()
Destroy a zone and free all of its resources
|
<private> |
Format the URL according to the addInputs value
|
<private> |
formatMapParams(map)
Format the URL according to the map parameters
|
<private> |
Free every resource contained in the zone.
|
Returns the submit inputs name sent additionally to the request, comma separated
|
|
Return the context id for this zone
|
|
Returns the refresh delay of the zone
|
|
getUrl()
Returns the url of the zone
|
|
<static> |
SweetDevRia.Zone.launchTimer(zone)
Launch a timer for the specified zone
|
<private> |
onCallServer(evt)
Callback method for a zone refresh
|
onLoaded()
This method is called after zone be loaded
To be overridden !!
|
|
onZoneRedirect(evt)
Event called after a zone refresh if server ask for a redirection
|
|
<static> |
SweetDevRia.Zone.refreshZones(zones)
Refresh multiple zones
|
Starts the timer on the zone
|
|
setAddInputs(addInputs)
Set a list of inputs name to submit
|
|
<private> |
Set this zone context as the current one
|
setRefreshDelay(newDelay)
Changes the refresh delay of the zone
Do NOT launch the timer
|
|
setUrl(url)
Changes the url of the zone
Do NOT reload the zone
|
|
<private> <static> |
SweetDevRia.Zone.timerRefresh(zoneId)
Function automatically called when the delay ends to trigger the server call.
|
zoneRedirect(The, paramsMap, stack)
Zone redirection : The content of URL will be feeded by the url urlRedirection
|
Class Detail
SweetDevRia.Zone(id, loadAtStartup, url, refreshDelay, addInputs)
- Parameters:
- {String} id
- The id of the zone element defined in the page
- {boolean} loadAtStartup
- Whether the zone will be initiated loaded or not
- {String} url
- The url of this zone. undefined for none (body content).
- {int} refreshDelay
- The delay of refresh of this zone, in millis. 0 for no refresh delay.
- {String} addInputs
- A list of comma separated input name to submit.
Field Detail
<static>
SweetDevRia.Zone.REDIRECT_EVENT
This event type is fire when the zone is redirected
<static>
SweetDevRia.Zone.REFRESH_EVENT
This event type is fire when the zone is refreshed
Method Detail
afterCallServer(newUrl, params)
This method is called after having processed a call to the server for this zone content
To be overridden !!
- Parameters:
- {String} newUrl
- an optional new url to set on the zone
- {Map} params
- parameter map to send to server, optional
afterOnCallServer(evt)
This method is called after processing the server response
- Parameters:
- {RiaEvent} evt
- Event containing the new zone content To be overridden !!
afterOnZoneRedirect(evt)
This method is called after processing the server redirection demand
- Parameters:
- {RiaEvent} evt
- Event containing the redirection demand To be overridden !!
afterZoneRedirect(newUrl, params)
This method is called after having processed a redirect to the server for this zone content
To be overridden !!
- Parameters:
- {String} newUrl
- an optional new url for redirection
- {Map} params
- parameter map to send to server, optional
{boolean}
beforeCallServer(newUrl, params)
This method is called before processing a call to the server for this zone content
To be overridden !!
- Parameters:
- {String} newUrl
- an optional new url to set on the zone
- {Map} params
- parameter map to send to server, optional
- Returns:
- True if this method can be called, else false.
{boolean}
beforeOnCallServer(evt)
This method is called before processing the server response
To be overridden !!
- Parameters:
- {RiaEvent} evt
- Event containing the new zone content
- Returns:
- True if this method can be called, else false.
{boolean}
beforeOnZoneRedirect(evt)
This method is called before processing the server redirection demand
To be overridden !!
- Parameters:
- {RiaEvent} evt
- Event containing the redirection demand
- Returns:
- True if this method can be called, else false.
{boolean}
beforeZoneRedirect(newUrl, params)
This method is called before processing a redirect to the server for this zone content
To be overridden !!
- Parameters:
- {String} newUrl
- an optional new url for redirection
- {Map} params
- parameter map to send to server, optional
- Returns:
- True if this method can be called, else false.
callServer(newUrl, paramsMap, stack)
Call the server
- Parameters:
- {String} newUrl
- an optional new url to set on the zone
- {Map} paramsMap
- parameter map of key/value to send to server, optional.
- {boolean} stack
- boolean indicating whether the server request must be stacked (not processed right away). Optional.
<private>
cancelAsContext()
Cancel this zone context as the current one
cancelTimer()
Cancel the timer on the zone
<private>
destroy()
Destroy a zone and free all of its resources
<private>
{String}
formatInputParams()
Format the URL according to the addInputs value
- Returns:
- the url params formatted with the addInputs parameters (key=value&key=value)
<private>
{String}
formatMapParams(map)
Format the URL according to the map parameters
- Parameters:
- {Map} map
- the map to format the key/value
- Returns:
- the url params formatted with the map parameters (key=value&key=value)
<private>
garbageCollector()
Free every resource contained in the zone.
Called at the begining of a zone refresh. (free nested components)
getAddInputs()
Returns the submit inputs name sent additionally to the request, comma separated
- Returns:
- the submit inputs name sent additionally to the request, comma separated
{String}
getContextId()
Return the context id for this zone
- Returns:
- the context id for this zone
getRefreshDelay()
Returns the refresh delay of the zone
- Returns:
- the refresh delay of the zone
getUrl()
Returns the url of the zone
- Returns:
- the url targetted by the zone
<static>
SweetDevRia.Zone.launchTimer(zone)
Launch a timer for the specified zone
- Parameters:
- {Zone} zone
- the zone to start a timer on.
<private>
onCallServer(evt)
Callback method for a zone refresh
- Parameters:
- {RiaEvent} evt
- Event containing the new zone content
onLoaded()
This method is called after zone be loaded
To be overridden !!
onZoneRedirect(evt)
Event called after a zone refresh if server ask for a redirection
- Parameters:
- evt
<static>
SweetDevRia.Zone.refreshZones(zones)
Refresh multiple zones
- Parameters:
- {String} zones
- Comma separated ids of the zones to refresh
restartTimer()
Starts the timer on the zone
setAddInputs(addInputs)
Set a list of inputs name to submit
- Parameters:
- {String} addInputs
- the list of inputs name to submit, comma separated
<private>
setAsContext()
Set this zone context as the current one
setRefreshDelay(newDelay)
Changes the refresh delay of the zone
Do NOT launch the timer
- Parameters:
- {int} newDelay
- the new refresh delay of the zone
setUrl(url)
Changes the url of the zone
Do NOT reload the zone
- Parameters:
- {String} url
- the new url targetted by the zone
<private> <static>
SweetDevRia.Zone.timerRefresh(zoneId)
Function automatically called when the delay ends to trigger the server call.
- Parameters:
- zoneId
zoneRedirect(The, paramsMap, stack)
Zone redirection : The content of URL will be feeded by the url urlRedirection
- Parameters:
- {urlRedirection} The
- url containing the new zone content
- paramsMap
- stack