Showing posts with label view file to string variable. Show all posts
Showing posts with label view file to string variable. Show all posts

Tuesday, April 23, 2013

Grails get view.gsp file output to a string variable

def formValueHtml = g.include(view: "pdf/customerAndInvoiceProductDetails.gsp", model: [
      invoiceProductInstance: invoiceProductInstance,
      invoiceInstance: invoiceInstance,
      customerInstance: customerInstance
]);

Where  customerAndInvoiceProductDetails.gsp is a view file.
And  invoiceProductInstance is data object.