Does anyone know where to find documentation on displaying ResultSet results in a JSP/GSP page?
The results are in a GroovyRowResult object being returned to the GSP.
Here is how I'm displaying it now.
<g:if test="${results.size() > 0}">
<table>
<g:each in="${results}" var="GroovyRowResult" status="index">
<g:set var="result" value="${GroovyRowResult}" />
<g:if test="${index == 0}">
<tr>
<g:each in="${result.keySet()}" var="key" status="key_index">
<g:if test="${key_index == 0}">
<th id="t${key_index}" class="staticTHcol">${key.trim()}</th>
</g:if>
<g:else>
<th id="t${key_index}">${key.trim()}</th>
</g:else>
</g:each>
</tr>
</g:if>
<tr>
<g:each in="${result.values()}" var="value" status="index2">
<g:if test="${index2 == 0}">
<td headers="t${index2}" class="staticTDcol">${value}</td>
<g:set var="record_id" value="${value}" />
</g:if>
<g:else>
<td headers="t${index2}" class="nonStaticTDcol">
<g:textField name="${record_id}" value="${value}" onfocus="setDefaultValue('${value}');" onblur="updateValue(this,'${record_id}')" />
</td>
</g:else>
</g:each>
</tr>
</g:each>
</table>
No Results
I am not using any ORM technologies, only pure JDBC. I have the basics down (limiting rows returned, pagination and basic layout of the results). Now I need to get into more advanced features like sorting and so forth.
I'm using the latest version of Grails and wonder if there is a plugin that might be able to get me some of this functionality. Or maybe someone knows of a good JS extension or library that might be able to work for this.