private void RenderSelectBox(ComponentController paComponentController, InputInfoRow lcInputInfoRow, String paActiveValue) { MetaDataBlock lcOptionList; MetaDataElement lcOptionItem; lcOptionList = (new MetaDataBlockCollection(lcInputInfoRow.AdditionalInfo))[0]; if (lcOptionList != null) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_PluginMode, "sumoselect"); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, lcInputInfoRow.InputName.ToLower()); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_OriginalValue, paActiveValue); paComponentController.RenderBeginTag(HtmlTag.Select); for (int lcCount = 0; lcCount < lcOptionList.MetaDataElementCount; lcCount++) { lcOptionItem = lcOptionList[lcCount]; if (String.Equals(lcOptionItem[0], paActiveValue, StringComparison.OrdinalIgnoreCase)) { paComponentController.AddAttribute(HtmlAttribute.Selected, "true"); } paComponentController.AddAttribute(HtmlAttribute.Value, lcOptionItem[0]); paComponentController.RenderBeginTag(HtmlTag.Option); paComponentController.Write(lcOptionItem.Name); paComponentController.RenderEndTag(); } paComponentController.RenderEndTag(); } }
private void RenderLabel(ComponentController paComponentController, InputInfoRow lcInputInfoRow) { paComponentController.AddAttribute(HtmlAttribute.Style, lcInputInfoRow.LabelCss); paComponentController.AddElementType(ComponentController.ElementType.InputLabel); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.Write(clLanguageManager.GetText(lcInputInfoRow.InputLabel)); paComponentController.RenderEndTag(); }
private void RenderTitle(ComponentController paComponentController, InputInfoRow lcInputInfoRow) { paComponentController.AddElementType(ComponentController.ElementType.InputTitle); paComponentController.AddAttribute(HtmlAttribute.Style, lcInputInfoRow.ElementCss); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.Write(clLanguageManager.GetText(lcInputInfoRow.DefaultValue)); paComponentController.RenderEndTag(); }
private void RenderInputBoxStatic(ComponentController paComponentController, InputInfoRow lcInputInfoRow, String paActiveValue) { paComponentController.AddAttribute(HtmlAttribute.Style, lcInputInfoRow.InputCss); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, lcInputInfoRow.InputName.ToLower()); paComponentController.AddElementType(ComponentController.ElementType.InputBox); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.Write(paActiveValue); paComponentController.RenderEndTag(); }
private void RenderInputBoxTextBox(ComponentController paComponentController, InputInfoRow paInputInfoRow, String paActiveValue, bool paMultiline) { String lcInputType; if (paInputInfoRow.MaxLimit > 0) { paComponentController.AddAttribute(HtmlAttribute.Maxlength, paInputInfoRow.MaxLimit.ToString()); } if (!paInputInfoRow.InputName.StartsWith(ctVirtualColumnPrefix)) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, paInputInfoRow.InputName.ToLower()); } paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_InputMode, paInputInfoRow.InputMode.Trim()); if (IsAttributeSet(paInputInfoRow, InputInfoAttribute.DelimitedList)) { paActiveValue = paActiveValue.Replace(ctMultilineDelimiter, ctCR); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Mode, "delimited"); } if (IsAttributeSet(paInputInfoRow, InputInfoAttribute.Mandatory)) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Mandatory, "true"); } if (IsAttributeSet(paInputInfoRow, InputInfoAttribute.Identifier)) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_IdentifierColumn, "true"); } if (IsAttributeSet(paInputInfoRow, InputInfoAttribute.KeyField)) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_KeyField, "true"); } if (IsAttributeSet(paInputInfoRow, InputInfoAttribute.DataMirror)) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_MirrorColumn, paInputInfoRow.LinkColumn); } if (IsAttributeSet(paInputInfoRow, InputInfoAttribute.Persist)) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Persist, "true"); } if ((clForceReadOnlyMode) || (IsAttributeSet(paInputInfoRow, InputInfoAttribute.ReadOnly))) { paComponentController.AddAttribute(HtmlAttribute.ReadOnly, "true"); } if (!String.IsNullOrEmpty(paInputInfoRow.QueryName)) { if (paInputInfoRow.QueryName.Contains(".")) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_QueryName, paInputInfoRow.QueryName); } else { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_QueryName, paInputInfoRow.InputGroup + "." + paInputInfoRow.QueryName); } } paComponentController.AddAttribute(HtmlAttribute.Style, paInputInfoRow.InputCss); paComponentController.AddAttribute(HtmlAttribute.Name, paInputInfoRow.InputName); paComponentController.AddElementType(ComponentController.ElementType.InputBox); if (!IsAttributeSet(paInputInfoRow, InputInfoAttribute.Password)) { if (IsAttributeSet(paInputInfoRow, InputInfoAttribute.DynamicNumber)) { paActiveValue = clLanguageManager.ConvertNumber(paActiveValue); } paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_OriginalValue, paActiveValue); paComponentController.AddAttribute(HtmlAttribute.Value, paActiveValue); lcInputType = "text"; } else { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_OriginalValue, General.Base64Encode(paActiveValue)); lcInputType = "password"; } if (paMultiline) { paComponentController.RenderBeginTag(HtmlTag.Textarea); paComponentController.Write(paActiveValue); } else { //if (IsAttributeSet(lcInputInfoRow, InputInfoAttribute.Password)) paComponentController.AddAttribute(HtmlAttribute.Type, "password"); //else paComponentController.AddAttribute(HtmlAttribute.Type, "text"); paComponentController.AddAttribute(HtmlAttribute.Type, lcInputType); paComponentController.RenderBeginTag(HtmlTag.Input); } paComponentController.RenderEndTag(); }