Beispiel #1
0
 /// <summary>
 /// Write the properties from the bag to the writer. This method can be overrided for advanced scenarios.
 /// </summary>
 /// <param name="jw">The writer.</param>
 protected override void WriteProperties(DextopJsWriter jw)
 {
     jw.AddProperty("field", field);
     jw.AddProperty("type", type);
     jw.DefaultProperty("min", min);
     jw.DefaultProperty("max", max);
     if (list!=null)
         jw.AddRawProperty("list", DextopUtil.Encode(list));
     jw.DefaultProperty("matcher", matcher);
     base.WriteProperties(jw);
 }
Beispiel #2
0
        /// <summary>
        /// Write the properties from the bag to the writer. This method can be overrided for advanced scenarios.
        /// </summary>
        /// <param name="jw">The writer.</param>
        protected override void WriteProperties(DextopJsWriter jw)
        {
            jw.AddProperty("name", name);
            jw.AddLocalizationProperty("fieldLabel", fieldLabel, ItemName + "FieldLabelText");
            jw.DefaultProperty("xtype", xtype);
            jw.AddLocalizationProperty("boxLabel", boxLabel, ItemName + "BoxLabelText");
            jw.DefaultProperty("anchor", anchor);
            jw.AddLocalizationProperty("emptyText", emptyText, ItemName + "EmptyText");
            jw.DefaultProperty("readOnly", readOnly);
            jw.DefaultProperty("allowBlank", allowBlank);
            jw.DefaultProperty("inputType", inputType);
            jw.DefaultProperty("vtype", vtype);
            jw.DefaultProperty("vtypeText", vtypeText);
            jw.DefaultProperty("flex", flex);
            jw.DefaultProperty("labelAlign", labelAlign);
            jw.DefaultProperty("margin", margin);
            jw.DefaultProperty("width", width);
            jw.DefaultProperty("style", style);
            jw.DefaultProperty("fieldStyle", fieldStyle);
            jw.DefaultProperty("cls", cls);
            jw.DefaultProperty("fieldCls", fieldCls);

            jw.AddRawProperty(xtype == "checkboxfield" ? "checked" : "value", String.Format("options.data['{0}']", name));

            base.WriteProperties(jw);
        }