Hi,
I saw this example in displaytag website. It's Working Good. I have doubt, How to fetch the xml values and using displaytags i want to sort and pagination.
my xml like
<shipinfo>
<shipname> Naoo </shipname>
<shipcode> Naoo001 </shipcode>
</shipinfo>
<shipinfo>
<shipname> Titanic </shipname>
<shipcode> Tit001 </shipcode>
</shipinfo>
My expected output is
both records mentioned in the xml file should be displayed and also sorting and pagination also working.
Please give me some Idea.
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<%@ page import="java.util.*"%>
<%List testData = new ArrayList();
Map map1 = new TreeMap();
map1.put("shipname", "Noaa");
map1.put("shipcode", "No001");
testData.add(map1);
Map map2 = new TreeMap();
map2.put("shipname", "Arab Ship");
map2.put("shipcode", "ARAB001");
testData.add(map2);
session.setAttribute("test", testData);
%>
<
jsp:scriptlet> request.setAttribute( "testData", testData ); </jsp:scriptlet>
<display:table name="testData" id="test">
<display:column title="Ship Name" property="shipname" sortable="true" />
<display:column title="Ship Code" property="shipcode" sortable="true" />
</display:table>