Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Setting filterOperator via ds.xml

    Is it valid to set the filter Operator in the datasource xml definition?

    e.g:
    <field name="firstName" type="text" required="true" filterOperator="iContains"></field>

    I noticed that it works this way but it seems not to be documented. (Or i have not found it)

    Or should i stick with:
    firstNameField.setFilterOperator(OperatorId.ICONTAINS);

    I would prefer the first way, if possible, because that way i do not need to change code in many classes.
    Last edited by escrea; 23 Jul 2014, 05:37.

    #2
    This approach - setting a component-specific property on a DataSourceField - is considered an unsupported hack since other DataBoundComponents will also receive the property, and may implement behaviors in the future based on that setting, and those behaviors may be things you don't actually want.

    So whether to risk it is pretty much up to you. You may be able to find some other way to avoid pervasive code changes.

    Comment

    Working...
    X