导航

ext 4.2 Form 的getvalues()方法

Posted on 2013-12-25 10:08  小强有毒  阅读(355)  评论(0)    收藏  举报
[asString], [dirtyOnly], [includeEmptyText], [useDataValues] ) : String/Object

Retrieves the fields in the form as a set of key/value pairs, using their getSubmitData() method to collect the values. If multiple fields return values under the same name those values will be combined into an Array. This is similar to getFieldValues except that this method collects only String values for submission, while getFieldValues collects type-specific data values (e.g. Date objects for date fields.)

(返回表单中的所有组件的值,并且以键(Field的name)值(Field的值)方式存起来,默认返回对象)

Parameters

  • asString : Boolean (optional) (如果为true,参数会被以键值对的方式进行拼接成一段String,格式同请求后面的参数方式一样,如:ooxx.do?userName=xx&pwd=oo)

    If true, will return the key/value collection as a single URL-encoded param string.

    Defaults to: false

  • dirtyOnly : Boolean (optional)(如果为true,只返回有值的)

    If true, only fields that are dirty will be included in the result.

    Defaults to: false

  • includeEmptyText : Boolean (optional)

    If true, the configured emptyText of empty fields will be used.

    Defaults to: false

  • useDataValues : Boolean (optional)

    If true, the getModelData method is used to retrieve values from fields, otherwise the getSubmitData method is used.

    Defaults to: false

Returns

  • String/Object
    以上为官方的英文文档,个人英文不好。标注下参数的意思