Class Index | File Index

Classes


Class Alfresco.component.FormManager

Extends Alfresco.component.Base
FormManager component.

Component that helps the management on a form on a page.

Set options to customise:
- the label of the submit button
- the failure message if form submission failed
- the page that the user shall visit after the form was submitted or cancelled

...or override it's onFormContentReady method to perform additional customisation.
Defined in: alfresco.js
Constructor Summary
Constructor Attributes Constructor Name and Description
 
Alfresco.component.FormManager(htmlId, components)
FormManager constructor.
Field Summary
Field Attributes Field Name and Description
 
Object container for initialization options
Fields borrowed from class Alfresco.component.Base:
modules, services, widgets
Method Summary
Method Attributes Method Name and Description
 
Override this method to make the user visit this url if no preferred urls was given for a form and
 
navigateForward(submitted)
Decides to which page we shall navigate after form submission or cancellation
 
Event handler called when the "beforeFormRuntimeInit" event is received
 
onCancelButtonClick(type, args)
Called when user clicks on the cancel button.
 
onFormContentReady(layer, args)
Event handler called when the "formContentReady" event is received
 
Handler called when the form submitoperation failed
 
Handler called when the form was submitted successfully
 
Fired by YUI when parent element is available for scripting.
 
Override this method to and return true for urls that matches pages on your site that is considered to be
Methods borrowed from class Alfresco.component.Base:
attachLinkClickListeners, bind, createYUIButtons, destroy, fire, invokeAction, msg, onComponentLoaded, onComponentsLoaded, onReadyWrapper, refresh, setMessages, setOptions
Constructor Detail
Alfresco.component.FormManager(htmlId, components)
FormManager constructor.
Parameters:
{String} htmlId
The HTML id of the parent element
components
Returns:
{Alfresco.component.FormManager} The new FormManager instance
Field Detail
{object} options
Object container for initialization options
Method Detail
{string} getSiteDefaultUrl()
Override this method to make the user visit this url if no preferred urls was given for a form and
there was no page visited before the user came to the form page.
Returns:
{string} The url to make the user visit if no other alternatives have been found

navigateForward(submitted)
Decides to which page we shall navigate after form submission or cancellation
Parameters:
{boolean} submitted
True if the form was submitted successfully

onBeforeFormRuntimeInit(layer, args)
Event handler called when the "beforeFormRuntimeInit" event is received
Parameters:
layer
args

onCancelButtonClick(type, args)
Called when user clicks on the cancel button.
Parameters:
type
args

onFormContentReady(layer, args)
Event handler called when the "formContentReady" event is received
Parameters:
layer
args

onFormSubmitFailure(response)
Handler called when the form submitoperation failed
Parameters:
response
The response from the submission

onFormSubmitSuccess(response)
Handler called when the form was submitted successfully
Parameters:
response
The response from the submission

onReady()
Fired by YUI when parent element is available for scripting.
Template initialisation, including instantiation of YUI widgets and event listener binding.

{boolean} pageUsesAjaxState(url)
Override this method to and return true for urls that matches pages on your site that is considered to be
pages that use ajax states (places a "#" to add runtime values to the browser location bar).
The browser will do a history.go(-1) for these pages so that the these pages gets a chance of loading the state
the page had before this form was visited.
Parameters:
url
Returns:
{boolean} True if the url is recognised as a page that uses ajax states (adds values after "#" on the url)

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Feb 16 2012 12:24:24 GMT-0000 (GMT)