Announcement

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

    How to set Criteria for Databound component field with a value of NULL?

    How do I set a criteria of null?

    Code:
    Criteria criteria = new Criteria();
    criteria.addCriteria("Field", null);
    listGrid.setCriteria(criteria);

    In eclipse: "Error: The method addCriteria(String, String) is ambiguous for the type Criteria."

    #2
    Does anyone have an answer to this?

    Comment


      #3
      Perhaps I haven't been clear enough. I want to only see records in a ListGrid which are Null in a particular field. How can a criteria be set to do this?

      If this can't be done, why? Can it be added in a nightly build?

      Comment


        #4
        Well I've come up with a compromise. It took alot of time but it works, for anyone who cares. My server is PHP based and was only designed to handle simple criteria. I wrote PHP code to process Advanced Criteria and used the OperatorId IS_NULL. I wanted to use the Criteria for Databound Drag n Drop between to ListGrids (ie. I wanted the server to set a field to NULL when dropped on a particular ListGrid). I then overwrote the addRecordDropHandler, cancelled the default behaviour, and send an update transaction with "null" as the field attribute.

        Comment

        Working...
        X