form
| Name space |
rialto.widget |
| FILE |
rialtoEngine\javascript\components\containers\form.js |
| NAME |
form |
| INHERITS |
AbstractContainer
|
| VERSION |
0.86 |
| update |
|
| DESCRIPTION |
This object create a form |
The form allow comunication with the server. It can be use by two way. In a asynchrone mode with XMLHTTPRequest or hidden iframe that allow remote acces to the server without refreshing the all page.
The other way is more traditional and use get or post method.
CONSTRUCTOR
| Name |
Type |
Description |
Default |
| Name |
String |
Name of the form |
|
| url |
String |
url to call on submit action |
|
| parent |
String or reference |
Reference of an HTML or a javascript element parent of the form html element |
|
| objPar.method |
String |
method to use for the form submit (post/get) |
get |
| objPar.boolWithFenWait |
boolean |
if set to true will display a wait popup during the load |
true |
| objPar.boolAsynch |
boolean |
using asynchronous call (ajax,iFrame) |
true |
| objPar.imgBtonSubmit |
object |
reference of an object(image or button ...) that will submit the form after click |
|
| objPar.callBackObjectOnSuccess |
object |
object who have the onsucces callback method |
|
| objPar.onSuccess |
function |
onsucces callback method |
|
| objPar.canBeCancel |
boolean |
if set to true, the request can be abort |
true |
| objPar.boolIframe |
boolean |
if true use iframe instead of xmlHTTPRequest |
false |
| objPar.parameters |
Object |
object of parameter{name1:valu1,...nameN:valueN} that will be add to the querry string |
|
Example:
var FORM1 = new rialto.widget.Form('FORM1','servRechPat',fenRechdemoExForm,{method:'post',boolWithIframe:true,idCont:CADRE.id,imgBtonSubmit:null,parameters:{login:'toto'}});
PUBLIC METHODS
addBtonSubmit
add the object that will submit thr form onclick
Parameters:
object imgBtonSubmit:reference of an object(image or button ...) that will submit the form after click
addParameter
add parameter to the object parameters
Parameters:
array tab:tab is [name,value] where name is the name parameter and value his value
addBtonSubmit
add the object that will submit thr form onclick
Parameters:
buildQueryString
build the querry string by parsing the elements of the form and the object parameters
Parameters:
onSubmitForm
this method return a boolean that indicate if submit must be perform or not
Parameters:
The code must be redefine after the instanciation of the component. By default this method does nothing.
resetForm
this method reset the form elements
Parameters:
submitForm
this method submit the form
Parameters:
setURL
to change the url to call
Parameters:
String newUrl:new url of the form