Bakhtawar Khan:
ya.....I am new to liferay so it will be better if u provide me steps to do that.
just take the jar from the lib of the portlet on which you had created the service.xml and paste it in the liferay-portal/tomcat/lib/ext then
write the following lines in your view.jsp page
here XXX means your entity Name Defined in service.xml
1
2<%
3int count = XXXLocalServiceUtil.getXXXsCount();
4List<XXX> resultList = XXXLocalServiceUtil.getXXXs(0, count);
5%>
6
7<table border="1" width="80%">
8<tr>
9<th>ID</th>
10<th>Name Of Canadidate </th>
11<th>Phone</th>
12<th>DOB</th>
13
14</tr>
15<%
16for (XXX res : resultList) {
17%>
18<tr>
19<td><%= res.getId() %></td>
20<td><%= res.getName() %></td>
21<td><%= res.getPhone() %></td>
22<td><%= res.getDob() %></td>
23</tr>
24
25<%
26}
27%>
28</table>
the above code will retreive the data
in the tablular format
it works for me every time
Regards,
Rewati Raman
Please sign in to flag this as inappropriate.