Announcement

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

    Can you create a server-side ( isomorphic ) AdvancedCriteria from a AdvancedCriteria

    v9.1p_2014-03-18/Pro Deployment (built 2014-03-18)

    Is there a way to create a server-side ( isomorphic ) AdvancedCriteria from a string, or json, or some representation of a client side AdvancedCriteria. I'm creating AdvancedCriteria in the client and storing the advanced criteria as a string. Is there a way to convert this string into a isomorphic AdvancedCriteria server-side. To be more general, is there a way to store an AdvancedCriteria in a database via client and retrieved it server side.

    Thanks.

    #2
    Yes, see the server-side API AdvancedCriteria.decodeClientCriteria(). This API expects the criteria to be encoded using JSONEncoder in the logicalDateConstructor mode.

    Comment


      #3
      Is there any way in V9.1 to do this ?

      Comment


        #4
        You would have to write your own equivalent of decodeClientCriteria(). Note that most of the nuances are around dates and especially relative dates - if you don't happen to have any dates, then just a normal JSON serialize and deserialize will work.

        Comment


          #5
          Is there a way to do this using v9.1 ?

          Comment


            #6
            Sorry for duplicate post - thanks for reply

            Comment

            Working...
            X