Hi All,
I have small problem with view datas in h:dataTable item. I have native query which is working properly in database and in
java:
The method in
EJB returns a List of elements. This method looks like this:
I want to show result of this query in dataTableItem, but I don`t know how to get to this values. I tried to do something like this (FCP is the method in
JSF ManagedBean that returns mentioned list):
but this shows me only references as the result in table.
FCP method in JSF ManagedBean looks like this:
This solution is working properly when I have a query like this:
, with one SUM element.
Then correct datas are in the table and there is no problem.
My question is: how to get datas, no references from the result list when I have two or more SUM elements in a query?
I tried use code like this:
but then I have an EJB exception: there is no properties like first_class_price and second_class_price.
I tried to change the query for this:
and then in JSF I used a code like this:
but I have the same EJB exception tkat properties p1 and p2 doesn`t exists
.
I am new in Java EE and I can`t handle with this. Maybe there is another way to solve my problem? Maybe I shouldn`t use h:dataTableItem?
Thanks for your replies.