⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dynamicform.js

📁 javascript 很酷的类库
💻 JS
📖 第 1 页 / 共 5 页
字号:
    errorsPreamble:"The following errors were found.",    //>	@attr	dynamicForm.showTitlesWithErrorMessages     (boolean : false : [IRW])    //          Indicates whether on validation failure, the error message displayed to the    //          user should be prepended with the title for the item.    //      @group  validation    //      @visibility external    //<    // This property is referenced by 'formItem.getErrorHTML()'//    showTitlesWithErrorMessages : false,    //>	@attr	dynamicForm.hiliteRequiredFields		(boolean : true : IRW)    // Indicates whether the titles of required items in this form should use the special    // prefix and suffix specified by the next two properties, instead of the standard    // prefix and suffix.    //      @group  formTitles    //      @visibility external    //<	hiliteRequiredFields:true,        //>	@attr	dynamicForm.requiredTitlePrefix		(string : "<B>" : IRW)    // The string prepended to the title of every required item in this form if    // highlightRequiredFields is true.    //      @group  formTitles    //      @visibility external    //<	requiredTitlePrefix:"<B>",        //>	@attr	dynamicForm.requiredRightTitlePrefix (string : "<B>:&nbsp;" : IRW)    // The string prepended to the title of every required item in this form if    // highlightRequiredFields is true and the titleOrientation property is set to "right".    //      @group  formTitles    //      @visibility external    //<	requiredRightTitlePrefix:"<B>:&nbsp;",    //>	@attr	dynamicForm.requiredTitleSuffix		(string : " :</B>" : [IRW])    // The string appended to the title of every required item in this form if    // highlightRequiredFields is true.                                            //      @group  formTitles    //      @visibility external    //<	requiredTitleSuffix:"&nbsp;:</B>",        //>	@attr	dynamicForm.requiredRightTitleSuffix (string : "</B>" : [IRW])    // The string appended to the title of every required item in this form if    // highlightRequiredFields is true and the titleOrientation property is set to "right".    //      @group  formTitles    //      @visibility external    //<	requiredRightTitleSuffix:"</B>",    // Hovers    // ---------------------------------------------------------------------------------------        // Turn off standard form item hover handling - we're doing our own custom handing instead.    canHover:false,        //> @attr dynamicForm.itemHoverDelay (number : 500 : [IRW])    // If the user rolls over an item, how long a delay before we fire any hover action / show    // a hover for that item?    // @see FormItem.hoverDelay    // @group Hovers    // @visibility external    //<    itemHoverDelay:500,        //> @attr dynamicForm.itemHoverWidth (measure : null : [IRW])    // A default width for hovers shown for items    // @see FormItem.hoverWidth    // @group Hovers    // @visibility external    // @example itemHoverHTML    //<        //> @attr dynamicForm.itemHoverHeight (measure : null : [IRW])    // A default height for hovers shown for items    // @see FormItem.hoverHeight    // @group Hovers    // @visibility external    //<        //> @attr dynamicForm.itemHoverAlign (Alignment  : null : [IRW])    // Text alignment  for hovers shown for items    // @see FormItem.hoverAlign    // @group Hovers    // @visibility external    //<        //> @attr dynamicForm.itemHoverVAlign (measure : null : [IRW])    // Vertical text alignment for hovers shown for items    // @see FormItem.hoverVAlign    // @group Hovers    // @visibility external    //<        //> @attr dynamicForm.itemHoverStyle (CSSStyleName  : "formHover" : [IRW])    // CSS Style for hovers shown for items    // @see FormItem.hoverStyle    // @group Hovers    // @visibility external    //<    itemHoverStyle:"formHover",        //> @attr dynamicForm.itemHoverOpacity (number : null : [IRW])    // Opacity for hovers shown for items    // @see FormItem.hoverOpacity    // @group Hovers    // @visibility external    //<        //> @attr dynamicForm.itemHoverRect (object : null : [IRWA])    // Object of the form <code>{left:[value], top:[value], width:[value], height:[value]}</code>    // for specifying an explicit position for the item hovers to appear.    // @see FormItem.hoverRect    // @group Hovers    // @visibility internal    //<        // Sizing	// --------------------------------------------------------------------------------------------    // we can't perfectly control the drawn sizes of all form elements, hence by default we    // show overflow.  Our defaultHeight acts as a minimum.	overflow:isc.Canvas.VISIBLE,    defaultHeight:20,	    // Validation	// --------------------------------------------------------------------------------------------    //>	@attr	dynamicForm.errors		(array : null : [IRW])    //          A property list of itemName:errorMessage pairs, specifying the set of error messages    //          displayed with the corresponding form elements. Each errorMessage may be either a    //          single string or an array of strings.    // @group validation    //      @visibility external    //<    //>	@attr	dynamicForm.validateOnChange	(boolean : false : IRW)	//		If true, form fields will be validated when each item's "change" handler is fired	//		as well as when the entire form is submitted or validated.<br>    //      Note that this property can also be set at the item level to enable finer granularity    //      validation in response to user interaction - if true at either level, validation    //      will occur on change.    // @group validation    // @visibility external    // @see FormItem.validateOnChange    //<    	validateOnChange:false,    //>	@attr	dynamicForm.unknownErrorMessage	(string : "Invalid value" : [IRW])    //          The error message for a failed validator that does not specify its own errorMessage.    //      @group validation, i18nMessages    //      @visibility external    //<                                       	unknownErrorMessage : "Invalid value",    // Focus	// --------------------------------------------------------------------------------------------    //>	@attr	dynamicForm.autoFocus		(boolean : false : IRW)	// If true, when the form is drawn, focus will automatically be put into the first focusable    // element in the form.<br>    // Note that to put focus in a different item you can explicitly call     // <code>dynamicForm.focusInItem(<i>itemName</i>)</code>	// @group focus	    // @visibility external    // @see focusInItem()	//<	autoFocus:false,						    //>	@attr	dynamicForm.selectOnFocus	(boolean : false : IRW)    // If this property is set to true, whenever a text based field in this form     // (+link{class:TextItem}, +link{class:TextAreaItem}) is given focus programmatically     // (see +link{DynamicForm.focusInItem()}), all text within the item will be selected.<br>    // May be overridden at the form item level.	// @group focus	    // @visibility external	//<	selectOnFocus:false,    //> @attr   dynamicForm.canFocus    (boolean : true : IRWA)    // DynamicForms are considered to have focus if any of their form items have focus.    // Note that setting <code>dynamicForm.canFocus</code> to false will have no effect on    // whether form items within the form may recieve focus. This property will only govern    // whether the form may recieve focus if the form contains no focusable items.    // @group focus    // @visibility external    //<    // Focus behaviour for forms is a little different than for other elements.    // o _canFocus() always returns true if the form contains any focusable items    //   (required to allow programmatic focus() on the form / proper keyboard event handling)    // o Set _useNativeTabIndex to false - we don't want the form to ever have native focus (instead    //   native focus will always go to the form items).    //   Note - we don't want to set tabIndex to -1, as the form items will default to having their    //   form's tabIndex as their own tabIndex.    // o Set _useFocusProxy to false - same reason as setting _useNativeTabIndex to false.    // o Override focus() to call focusInItem() (below)    // o Override _focusChanged() to blur the focus item on a blur() call (below)    // - see also comments on form item tabIndex in formItem.js    canFocus : true,    _useNativeTabIndex:false,    _useFocusProxy:false,            // AutoComplete	// --------------------------------------------------------------------------------------------    //>	@attr	dynamicForm.autoComplete   (AutoComplete : null : IRW)    // Whether to do inline autoComplete in text fields within this form.    // <p>    // Can be individually enabled per TextItem, or if enabled for the form as a whole, can    // be disabled for individual items.    //    // @see formItem.autoComplete    // @group autoComplete    // @visibility autoComplete    //<    //autoComplete:null     null is the same as "none": no-autoComplete        //>	@attr	dynamicForm.uniqueMatch   (boolean : true : IRW)    // When autoComplete is enabled, whether to offer only unique matches to the user.    // <p>    // Can be individually enabled per TextItem, or if set for the form as a whole, can    // be set differently for individual items.    //    // @see formItem.uniqueMatch    // @group autoComplete    // @visibility autoComplete    //<    uniqueMatch:true,            // Spellcheck:    //>@attr    DynamicForm.browserSpellCheck   (boolean : true : IRW)    // If this browser has a 'spellCheck' feature for text-based form item elements, should    // it be used for items in this form? Can be overridden at the item level via     // +link{FormItem.browserSpellCheck}    // @visibility internal    //<    // Only supported in Moz        // NOTE:  Property exposed on our publict forum here:     //   http://forums.smartclient.com/showthread.php?p=552#post552    // Comment in that post "not publically documented as not supported cross browser"    browserSpellCheck:true,        // Direct Submit    // --------------------------------------------------------------------------------------------    //>	@attr dynamicForm.validationURL		(URL : null : IRW)    // validationURL can be set to do server-side validation against a different URL from where    // the form will ultimately save, as part of an incremental upgrade strategy for Struts and    // Struts-like applications.      // <P>    // If set, calling +link{method:DynamicForm.submit()} causes an RPC to be sent to this URL to    // perform server-side validation of the form values.  If the validation fails, the    // validation errors returned by the server are rendered in the form.  If the validation    // succeeds, the form is submitted to the URL specified by +link{attr:DynamicForm.action}.    // <p>    // The form values are available on the server as request parameters (just like a normal form    // submit) and also as the values of a DSRequest sent as an RPC alongside the normal    // submit.    // <p>    // The expected response to this request is a DSResponse sent via the RPC mechanism.  If    // validation is successful, an empty response with the STATUS_SUCCESS status code is    // sufficient.  If there are validation errors, the DSResponse should have the status set to     // STATUS_VALIDATION_ERROR and the errors should be set on the response via the    // addError()/setErrorReport() API on DSResponse.  See the javadoc for DSResponse for    // details.    // <P>    // See the Struts examples in <code>[webroot]/examples/struts</code> for usage examples.    //    // @group validation    // @visibility external    // @see DynamicForm.saveData()    // @see DynamicForm.submit()    //<    //>	@attr dynamicForm.disableValidation		(boolean : null : IRW)    //    // If set to true, client-side validators will not run on the form when validate() is    // called.  Server-side validatiors (if any) will still run on attempted save.    //    // @group validation    // @visibility external    // @see DynamicForm.saveData()    // @see DynamicForm.submit()    //<    //> @attr dynamicForm.cancelParamName (String : "org.apache.struts.taglib.html.CANCEL" : IRW)    // The name of the special field sent to the server as part of +link{method:DynamicForm.cancel()}    // @visibility external    //<    cancelParamName: "org.apache.struts.taglib.html.CANCEL",    //> @attr dynamicForm.cancelParamValue (String : "cancel" : IRW)    // The value of the special field sent to the server as part of +link{method:DynamicForm.cancel()}    // @visibility external    //<    cancelParamValue: "cancel",    //>	@attr	dynamicForm.action		(string : "#" : IRW)    // The URL to which the form will submit its values.    // <p>    // <b>NOTE:</b> this is used only in the very rare case that a form is used to submit data    // directly to a URL.  Normal server contact is through RPCManager.<br>    // See +link{DynamicForm.canSubmit} for more on this.    //    // @see group:operations    // @see class:RPCManager    //    //      @visibility external    //      @group  submitting    //<    //	XXX SHOULD SUPPORT [APP], [ISOMORPHIC], etc. special directories    // Note: if this property is modified from the class default, and saveData() is called,     // the rpcManager code will perform its request as a direct submission to the action URL     // by setting request.directSubmit    action:"#",    //>	@attr	dynamicForm.target		(string : null : IRWA)    // The name of a window or frame that will receive the results returned by the form's    // action. The default null indicates to use the current frame.    // <p>    // <b>NOTE:</b> this is used only in the very rare case that a form is used to submit data    // directly to a URL.  Normal server contact is through    // +link{group:dataBoundComponentMethods,DataBound Component Methods}.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -