Hi,
If i want to directly get a JDBC result set and give it to ig:gridView to render the data.
What should i give in the jsp/xhtml page for the column names?
For eg:
<ig:gridView dataSource=" < binding to result set data model>"
<ig:column >
<h:outputText value="#{DATA_ROW.<column name ?>}"
</ig:column>
My question is what goes after DATA_ROW. is it column name ?
Thanks
Jansun
Hello Jansun,
As you are working with ResultSetDatamodel and I hope following is the way you are working with:
[Table in DataBase] ---> [JDBC]-->result set--->ResultSetDataModel--->assign to gris as datasource
Now, for column name for grid, you need to put the fields (table column in database) as follows:
..<DATA_ROW.firstName>.. Where firstName is the column in the table in database.
Hope you get the idea..
Roshan
Thanks Roshan,
I tried that and it worked fine. But is it possible to avoid having DB table column names in JSP/ xhtml. ?
Can i get like DATA_ROW.string[1] -> will it call result set .getString(1); ?
Is it possible to write JSP/xhtml without column names and still get data like from first column or second column
<h:outputText value="#{DATA_ROW.string[1]}" />
// or something like this which can get first column output as string
</ig:column >
I am not aware of any such way. I never had tried to do this.. so not sure if you could do this. I will look for this and will let you know if get success..