Announcement

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

    Server-side handling of AdvancedCriteria

    SmartClient Version: v9.1p_2014-07-06/Pro Deployment (built 2014-07-06)

    We have a few questions involving server-side handling of AdvancedCriteria.

    We have an AdvancedCriteria persisted in JSON that we need to convert into an com.isomorphic.criteria.AdvancedCriteria for server-side use, specifically, we'd like to get the same AdvancedCriteria that DSRequest.getAdvancedCriteria() returns us.

    Question 1:

    I followed up on another thread I saw in the forum (http://forums.smartclient.com/showthread.php?t=24731) about a helper method for constructing AdvancedCriteria on the server from JSON, but I will re-post that question here for completeness. We are curious if the following comment by isomorphic still applies, "At the moment, we don't have a helper method that just does this for you. You'd need to use any off-the-shelf JSON parser, then traverse the structure using the com.isomorphic.criteria helper classes to construct AdvancedCriteria."?

    Question 2:

    Once we have the com.isomorphic.criteria.AdvancedCriteria loaded on the server-side from JSON, is there any support on the server-side for resolution of criteria that involves RelativeDate criteria? For advanced criteria coming in from the DSRequest.getAdvancedCriteria(), the RelativeDate criterion is already resolved. Is this something that would happen automatically once we construct the com.isomorphic.criteria.AdvancedCriteria on the server-side?

    Question 3:

    Can PDFs and Charts being generated completely server-side without any user interaction? For example, if we have a scheduling process that emails reports on a defined schedule, can we generate PDF's and Charts to attach to those emails without client interaction?

    Thanks

    #2
    1. As we noted in the other thread, this is still true.

    2. No, relative dates are resolved client-side before sending criteria to the server, and there is no server-side system for resolving them

    3. You can do so without client interaction by driving a "headless" web browser via systems like Selenium RC, but there is no way to do so without a browser.

    Comment


      #3
      Thanks for the response.

      For 2, do you have any recommendations for us resolving the relative dates server-side?

      Comment


        #4
        Not really. The docs have a solid spec of what to do, but it's a fairly large piece of code to write with many edge cases.

        The best thing to do, across all 3 questions you posed, is to rework things so that the browser is still involved if that's possible.

        Comment

        Working...
        X