From: Argiris K. <be...@us...> - 2005-12-22 01:26:39
|
Update of /cvsroot/magicajax/magicajax/Core/UI/Controls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10239/Core/UI/Controls Modified Files: AjaxPanel.cs AjaxZone.cs Log Message: -Moved the ExcludedFlags property of AjaxZone to AjaxPanel. -Some renaming of methods for MagicAjaxModule Index: AjaxPanel.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/Controls/AjaxPanel.cs,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** AjaxPanel.cs 22 Dec 2005 01:15:20 -0000 1.43 --- AjaxPanel.cs 22 Dec 2005 01:26:25 -0000 1.44 *************** *** 53,56 **** --- 53,88 ---- } + public enum ExcludeFromPostFlag + { + /// <summary> + /// Post all elements + /// </summary> + None = 0, + /// <summary> + /// Do not post ViewState + /// </summary> + ViewState = 1, + /// <summary> + /// Do not post the control fingerprints hidden fields + /// </summary> + Fingerprints = 2, + /// <summary> + /// Do not post the custom hidden fields of the user + /// </summary> + UserHidden = 4, + /// <summary> + /// Do not post any hidden field + /// </summary> + AllHidden = 7, + /// <summary> + /// Do not post any (non-hidden) form element + /// </summary> + FormElements = 8, + /// <summary> + /// Do not post any element + /// </summary> + AllElements = 15 + } + /// <summary> /// Works like Panel but the controls it contains are rendered on the page by sending *************** *** 83,86 **** --- 115,119 ---- private AjaxCallConnectionType _ajaxCallConnection = AjaxCallConnectionType.Asynchronous; + private ExcludeFromPostFlag _excludeFlags = ExcludeFromPostFlag.None; private ArrayList _addedControls = new ArrayList(); private ArrayList _removedControls = new ArrayList(); *************** *** 111,114 **** --- 144,150 ---- /// Default is AjaxCallConnectionType.Asynchronous. /// </summary> + [Bindable(false), + Category("Behaviour"), + DefaultValue(AjaxCallConnectionType.Asynchronous)] public AjaxCallConnectionType AjaxCallConnection { *************** *** 118,121 **** --- 154,172 ---- #endregion + #region ExcludeFlags + /// <summary> + /// Defines the form elements that will be excluded from the POST data. + /// Default is ExcludeFromPostFlag.None. + /// </summary> + [Bindable(false), + Category("Behaviour"), + DefaultValue(ExcludeFromPostFlag.None)] + public ExcludeFromPostFlag ExcludeFlags + { + get { return _excludeFlags; } + set { _excludeFlags = value; } + } + #endregion + #endregion *************** *** 323,326 **** --- 374,386 ---- break; } + + if (_excludeFlags == ExcludeFromPostFlag.None) + { + this.Attributes.Remove ("ExcludeFlags"); + } + else + { + this.Attributes["ExcludeFlags"] = ((int)_excludeFlags).ToString(); + } } Index: AjaxZone.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/Controls/AjaxZone.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AjaxZone.cs 22 Dec 2005 01:15:20 -0000 1.2 --- AjaxZone.cs 22 Dec 2005 01:26:25 -0000 1.3 *************** *** 5,40 **** namespace MagicAjax.UI.Controls { - public enum ExcludeFromPostFlag - { - /// <summary> - /// Post all elements - /// </summary> - None = 0, - /// <summary> - /// Do not post ViewState - /// </summary> - ViewState = 1, - /// <summary> - /// Do not post the control fingerprints hidden fields - /// </summary> - Fingerprints = 2, - /// <summary> - /// Do not post the custom hidden fields of the user - /// </summary> - UserHidden = 4, - /// <summary> - /// Do not post any hidden field - /// </summary> - AllHidden = 7, - /// <summary> - /// Do not post any (non-hidden) form element - /// </summary> - FormElements = 8, - /// <summary> - /// Do not post any element - /// </summary> - AllElements = 15 - } - /// <summary> /// Summary description for AjaxZone. --- 5,8 ---- *************** *** 42,70 **** public class AjaxZone : AjaxPanel { - private ExcludeFromPostFlag _excludeFlags = ExcludeFromPostFlag.None; - - [Bindable(false), - Category("Behaviour"), - DefaultValue(ExcludeFromPostFlag.None)] - public ExcludeFromPostFlag ExcludeFlags - { - get { return _excludeFlags; } - set { _excludeFlags = value; } - } - - protected override void SetAjaxAttributes() - { - base.SetAjaxAttributes (); - - if (_excludeFlags == ExcludeFromPostFlag.None) - { - this.Attributes.Remove ("ExcludeFlags"); - } - else - { - this.Attributes["ExcludeFlags"] = ((int)_excludeFlags).ToString(); - } - } - protected override void OnLoad(EventArgs e) { --- 10,13 ---- |