Update of /cvsroot/magicajax/magicajax/Core/UI/Controls
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26903/Core/UI/Controls
Modified Files:
AjaxPanel.cs
Log Message:
Fixed a visibility issue.
CONTROL_FINGERPRINTS are registered at OnLoad event in case an AjaxPanel has Visible property set to false.
Index: AjaxPanel.cs
===================================================================
RCS file: /cvsroot/magicajax/magicajax/Core/UI/Controls/AjaxPanel.cs,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** AjaxPanel.cs 18 Nov 2005 18:53:07 -0000 1.13
--- AjaxPanel.cs 19 Nov 2005 01:31:23 -0000 1.14
***************
*** 222,225 ****
--- 222,227 ----
this.AjaxCallConnection = this._ajaxCallConnection;
}
+
+ Page.RegisterHiddenField (ControlCollectionState.GetControlFingerprintsField(this.ClientID), String.Empty);
}
#endregion
***************
*** 322,327 ****
if (_controlState == null)
{
! // State expired
! Page.Response.Redirect (Page.Request.RawUrl);
}
--- 324,328 ----
if (_controlState == null)
{
! throw new MagicAjaxException(String.Format("The control fingerprints for AjaxPanel '{0}' is not rendered on page.", this.ClientID));
}
***************
*** 760,769 ****
{
SortedList controlIDHtmlHashes = new SortedList();
! string[] namevaluepairs = panelControlStates.Split(';');
! for (int i = 0; i < namevaluepairs.Length; i++)
{
! string namevaluepair = namevaluepairs[i];
! string[] namevalue = namevaluepair.Split('#');
! controlIDHtmlHashes.Add(string.Format("{0}_{1}", panelClientID, namevalue[0]), namevalue[1]);
}
--- 761,773 ----
{
SortedList controlIDHtmlHashes = new SortedList();
! if (panelControlStates != String.Empty)
{
! string[] namevaluepairs = panelControlStates.Split(';');
! for (int i = 0; i < namevaluepairs.Length; i++)
! {
! string namevaluepair = namevaluepairs[i];
! string[] namevalue = namevaluepair.Split('#');
! controlIDHtmlHashes.Add(string.Format("{0}_{1}", panelClientID, namevalue[0]), namevalue[1]);
! }
}
***************
*** 833,837 ****
else
{
! page.RegisterHiddenField(panelKey, serializedPanelStateHashes);
}
--- 837,843 ----
else
{
! // The hidden field is already registered at OnPreRender.
! // Set its value by javascript.
! page.RegisterStartupScript(panelKey + "VALUESET", String.Format("<script language='javascript'>AJAXCbo.SetFieldScript(\"{0}\",{1});</script>", panelKey, AjaxCallHelper.EncodeString(serializedPanelStateHashes)));
}
|