/// <summary> /// Store widget and variable data in the viewstate /// </summary> public override void StoreViewState() { base.StoreViewState(); ViewStateAttributes.SetInViewState("inParamColumn", inParamColumn, ""); ViewStateAttributes.SetInViewState("varLctableRecordsId", varLctableRecordsId, ""); ViewStateAttributes.SetInViewState("wttxtTableRecordsId_Mandatory", ((IWidgetRuntimeProperties)this.FindControl("wttxtTableRecordsId")).Mandatory, false); ViewStateAttributes.EnsureNotEmpty(); RemoveStoreViewStateWebScreenStack(this); }
/// <summary> /// Restore widget and variable data from the viewstate /// </summary> protected override void FetchViewState() { base.FetchViewState(); if (IsViewStateEmpty) { return; } try { inParamColumn = (string)ViewStateAttributes.GetFromViewState("inParamColumn", ""); varLctableRecordsId = (string)ViewStateAttributes.GetFromViewState("varLctableRecordsId", ""); ((IWidgetRuntimeProperties)this.FindControl("wttxtTableRecordsId")).Mandatory = (bool)ViewStateAttributes.GetFromViewState("wttxtTableRecordsId_Mandatory", false); } catch (Exception e) { throw new Exception("Error Deserializing ViewState", e); } }
/// <summary> /// Store visibility information of the web block and input widgets in the viewstate /// </summary> protected override void StoreInputsAndWebBlockVisibility() { ViewStateAttributes.EnsureNotEmpty(); }
/// <summary> /// Store widget and variable data in the viewstate /// </summary> public override void StoreViewState() { base.StoreViewState(); ViewStateAttributes.EnsureNotEmpty(); RemoveStoreViewStateWebScreenStack(this); }
public short NegotiateTabIndexesRecursively(short tabindex, Control rootCtrl, bool setTabIndex) { bool bAssignTabIndex = false; WebControl ctrl = null; HtmlControl htmlCtrl = null; foreach (Control child in rootCtrl.Controls) { if (child is INegotiateTabIndexes) { tabindex = ((INegotiateTabIndexes)child).NegotiateTabIndexes(tabindex, setTabIndex); continue; } if (typeof(WebControl).IsInstanceOfType(child)) { ctrl = (WebControl)child; bAssignTabIndex = false; if (ctrl is OutSystems.HubEdition.WebWidgets.TextBox | ctrl is OutSystems.HubEdition.WebWidgets.CheckBox | ctrl is OutSystems.HubEdition.WebWidgets.RadioButton | ctrl is OutSystems.HubEdition.WebWidgets.DropDownList) { bAssignTabIndex = true; } else if (ctrl is System.Web.UI.WebControls.LinkButton | ctrl is System.Web.UI.WebControls.Button | ctrl is System.Web.UI.WebControls.HyperLink | ctrl is System.Web.UI.WebControls.ListBox) { bAssignTabIndex = true; } else if (ctrl is PlaceholderContainer) { INegotiateTabIndexes placeholderOwner = (INegotiateTabIndexes)Utils.GetOwnerOfControl(ctrl); tabindex = placeholderOwner.NegotiateTabIndexesRecursively(tabindex, ctrl, setTabIndex); continue; } short settedTabIndex = 0; if (bAssignTabIndex && setTabIndex) { object b = htTabIndexGroups[ctrl.ID]; if (b != null) { string groupid = b.ToString(); if (htTabIndexGroupsTI[groupid] == null) { htTabIndexGroupsTI[groupid] = tabindex++; } ViewStateAttributes.SetTabIndex(ctrl, Convert.ToInt16(htTabIndexGroupsTI[groupid]), out settedTabIndex); } else { ViewStateAttributes.SetTabIndex(ctrl, tabindex, out settedTabIndex); // Increase tabindex if it was not overiden if (tabindex == settedTabIndex) { tabindex++; } } } tabindex = Math.Max(tabindex, ++settedTabIndex); } else if (child is HtmlControl && setTabIndex) { htmlCtrl = (HtmlControl)child; if (htmlCtrl is System.Web.UI.HtmlControls.HtmlInputFile) { htmlCtrl.Attributes.Add("tabIndex", Convert.ToString(tabindex++)); } } if (child.Controls.Count > 0) { tabindex = NegotiateTabIndexesRecursively(tabindex, child, setTabIndex); } } return(tabindex); }
/// <summary> /// Store visibility information of the web block and input widgets in the viewstate /// </summary> protected override void StoreInputsAndWebBlockVisibility() { ControlVisibility.StoreChildControlVisibility("wttxtTableRecordsId"); ViewStateAttributes.EnsureNotEmpty(); }