13693261870
2022-09-16 354b3dbfbffb3df45212a2a44dbbf48b4acc2594
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>The source code</title>
  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  <style type="text/css">
    .highlight { display: block; background-color: #ddd; }
  </style>
  <script type="text/javascript">
    function highlight() {
      document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
    }
  </script>
</head>
<body onload="prettyPrint(); highlight();">
  <pre class="prettyprint lang-js"><span id='Ext-form-field-Hidden'>/**
</span> * A basic hidden field for storing hidden values in forms that need to be passed in the form submit.
 *
 * This creates an actual input element with type=&quot;submit&quot; in the DOM. While its label is
 * {@link #hideLabel not rendered} by default, it is still a real component and may be sized according
 * to its owner container's layout.
 *
 * Because of this, in most cases it is more convenient and less problematic to simply
 * {@link Ext.form.action.Action#params pass hidden parameters} directly when
 * {@link Ext.form.Basic#submit submitting the form}.
 *
 * Example:
 *
 *     new Ext.form.Panel({
 *         title: 'My Form',
 *         items: [{
 *             xtype: 'textfield',
 *             fieldLabel: 'Text Field',
 *             name: 'text_field',
 *             value: 'value from text field'
 *         }, {
 *             xtype: 'hiddenfield',
 *             name: 'hidden_field_1',
 *             value: 'value from hidden field'
 *         }],
 *
 *         buttons: [{
 *             text: 'Submit',
 *             handler: function() {
 *                 this.up('form').getForm().submit({
 *                     params: {
 *                         hidden_field_2: 'value from submit call'
 *                     }
 *                 });
 *             }
 *         }]
 *     });
 *
 * Submitting the above form will result in three values sent to the server:
 *
 *     text_field=value+from+text+field&amp;hidden;_field_1=value+from+hidden+field&amp;hidden_field_2=value+from+submit+call
 *
 */
Ext.define('Ext.form.field.Hidden', {
    extend:'Ext.form.field.Base',
    alias: ['widget.hiddenfield', 'widget.hidden'],
    alternateClassName: 'Ext.form.Hidden',
 
<span id='Ext-form-field-Hidden-cfg-inputType'>    // private
</span>    inputType : 'hidden',
<span id='Ext-form-field-Hidden-cfg-hideLabel'>    hideLabel: true,
</span><span id='Ext-form-field-Hidden-cfg-hidden'>    hidden: true,
</span>    
<span id='Ext-form-field-Hidden-method-initComponent'>    initComponent: function() {
</span>        this.formItemCls += '-hidden';
        this.callParent();    
    },
    
<span id='Ext-form-field-Hidden-method-isEqual'>    /**
</span>     * @private
     * Override. Treat undefined and null values as equal to an empty string value.
     */
    isEqual: function(value1, value2) {
        return this.isEqualAsString(value1, value2);
    },
 
<span id='Ext-form-field-Hidden-method-initEvents'>    // These are all private overrides
</span>    initEvents: Ext.emptyFn,
<span id='Ext-form-field-Hidden-method-setSize'>    setSize : Ext.emptyFn,
</span><span id='Ext-form-field-Hidden-method-setWidth'>    setWidth : Ext.emptyFn,
</span><span id='Ext-form-field-Hidden-method-setHeight'>    setHeight : Ext.emptyFn,
</span><span id='Ext-form-field-Hidden-method-setPosition'>    setPosition : Ext.emptyFn,
</span><span id='Ext-form-field-Hidden-method-setPagePosition'>    setPagePosition : Ext.emptyFn,
</span><span id='Ext-form-field-Hidden-method-markInvalid'>    markInvalid : Ext.emptyFn,
</span><span id='Ext-form-field-Hidden-method-clearInvalid'>    clearInvalid : Ext.emptyFn
</span>});
</pre>
</body>
</html>