-<html>\r
-<head>\r
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> \r
- <title>The source code</title>\r
- <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
- <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
-</head>\r
-<body onload="prettyPrint();">\r
- <pre class="prettyprint lang-js"><div id="cls-Ext.form.Hidden"></div>/**\r
- * @class Ext.form.Hidden\r
- * @extends Ext.form.Field\r
- * A basic hidden field for storing hidden values in forms that need to be passed in the form submit.\r
- * @constructor\r
- * Create a new Hidden field.\r
- * @param {Object} config Configuration options\r
- * @xtype hidden\r
- */\r
-Ext.form.Hidden = Ext.extend(Ext.form.Field, {\r
- // private\r
- inputType : 'hidden',\r
-\r
- // private\r
- onRender : function(){\r
- Ext.form.Hidden.superclass.onRender.apply(this, arguments);\r
- },\r
-\r
- // private\r
- initEvents : function(){\r
- this.originalValue = this.getValue();\r
- },\r
-\r
- // These are all private overrides\r
- setSize : Ext.emptyFn,\r
- setWidth : Ext.emptyFn,\r
- setHeight : Ext.emptyFn,\r
- setPosition : Ext.emptyFn,\r
- setPagePosition : Ext.emptyFn,\r
- markInvalid : Ext.emptyFn,\r
- clearInvalid : Ext.emptyFn\r
-});\r
-Ext.reg('hidden', Ext.form.Hidden);</pre> \r
-</body>\r
-</html>
\ No newline at end of file
+<!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="submit" 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&hidden;_field_1=value+from+hidden+field&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',
+
+ // private
+ inputType : 'hidden',
+ hideLabel: true,
+
+ initComponent: function(){
+ 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);
+ },
+
+ // These are all private overrides
+ initEvents: Ext.emptyFn,
+ setSize : Ext.emptyFn,
+ setWidth : Ext.emptyFn,
+ setHeight : Ext.emptyFn,
+ setPosition : Ext.emptyFn,
+ setPagePosition : Ext.emptyFn,
+ markInvalid : Ext.emptyFn,
+ clearInvalid : Ext.emptyFn
+});
+</pre>
+</body>
+</html>