Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.3 final
    • Fix Version/s: 2.3-M2
    • Component/s: Converters
    • Labels:
      None

      Description

      I want to use a specific view for my object to render xml (or json or others)
      Sample :
      class MyClass{
      String param1
      String param2
      Set param3
      }

      I want to render only param1 and 2 .
      At this time, Ican create an object view :
      class MyClassView1 {
      String param1
      String param2
      mapping =

      {table 'tableOfMyClass'}

      }

      class MyClassView2

      { ... }

      But why not :

      class MyClass{
      ...
      static rendering1 =

      { param1 param2 }

      static rendering2 =

      { param2 param3 }

      }

      or better, create a outside class to do this mechanism.

      Thanks a lot.

        Activity

        Hide
        Graeme Rocher added a comment -

        I don't think this is necesary with the new rendering stuff:

        http://hudson.grails.org/job/grails_docs_2.3.x/lastSuccessfulBuild/artifact/build/docs/guide/webServices.html#REST

        We have multiple ways to customize rendering (via GSP, include/excludes, writing your own renderer etc.) without need to introduce complexity of defining views via a class

        Show
        Graeme Rocher added a comment - I don't think this is necesary with the new rendering stuff: http://hudson.grails.org/job/grails_docs_2.3.x/lastSuccessfulBuild/artifact/build/docs/guide/webServices.html#REST We have multiple ways to customize rendering (via GSP, include/excludes, writing your own renderer etc.) without need to introduce complexity of defining views via a class

          People

          • Assignee:
            Graeme Rocher
            Reporter:
            Jonathan Lebrun
          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Last Reviewed:

              Development