This project is read-only.
1
Vote

Default values for bindings parameters

description

Hello,
We started using bindings for most of our web-controls, but it has one inconvenient thing: we have to duplicate records when control have optional parameters.
For example:
<element name="DropDown">
Html.DropDown(name: "@name", 
              caption: "@caption", 
              list: @list, 
              displayColumn: "@displayColumn", 
              valueColumn: "@valueColumn", 
              defaultValue: "@default")
</element>
<element name="DropDown">
Html.DropDown(name: "@name", 
              caption: String.Empty, 
              list: @list, 
              displayColumn: "Text", 
              valueColumn: "Value", 
              defaultValue: "@default")
</element>
 
It would be good to have ability adding default values for those parameters.
Something like that:
<element name ="DropDown" caption="String.Empty" displayColumn="Text">
Html.DropDown(name: "@name", 
              caption: "@caption", 
              list: @list, 
              displayColumn: "@displayColumn", 
              valueColumn: "@valueColumn", 
              defaultValue: "@default")
</element>
If parameter declared - use it's value, if not - use default from element-tag.

comments