I should also take the opportunity to plug two additions under Genero 3.10 that help out in this area.
1. The XSLTtransformer class
http://4js.com/online_documentation/fjs-fgl-manual-html/#c_gws_xmlXSLTtransformer.html enables you to generate the HTML using XSLT transformations. Essentially use your 4gl to produce an XML document of unformatted data, and then apply an XSLT Transformation to it to produce the resultant HTML.
2. The WSHelper API
http://4js.com/online_documentation/fjs-fgl-manual-html/#r_gws_wshelper_apis.html provides three methods that are useful in interpreting what the RESTful Web Services receives in the request.