In the groovy Controller Code I call the function:
def wiki =
{
def currentNode = params.nodePath
def conceptName = nodeService.retrieveConceptName (currentNode);
render (template:'wiki', model:[conceptName : conceptName])
}
In the service class I define the function retrieveConceptName:
def retrieveConceptName(currentNode)
{
groovy.sql.Sql sql = new groovy.sql.Sql(dataSource);
def row= sql.firstRow(" SELECT cname FROM Person WHERE FULLNAME= ?",[currentNode]);
return row;
}
In my output(wiki template(gsp view)) I get flowerbrackets along with field header , How to get only value of column and not the flower braces or field header?
You haven't shown the GSP code that displays the row, but I guess it looks like either ${it}
or ${row}
. If so, replace it with either
${it.cname}
or ${row.cname}