Hi!
I am trying to load data from a web service I made to a JMaki yahoo data table.
My code for data.jsp file below works fine displaying data when I add it as a script on my index.jsp page.
But when used in yahoo data table widget. Nothing appears. Can you help me on this....
<a:widget name="yahoo.dataTable"
service="data.jsp" />
Thanks,
April
-----------------------------------------------------------------------------------------------------------------------
// data.jsp file
<%@ page import="java.util.*" %>
<%
out.println("{columns : [" +
"{ label : 'officeID', id : 'officeid'}," +
"{ label : 'ActvLns', id : 'actvlns'}," +
"{ label :'nActvLns', id : 'nactvlns'}" +
"],");
out.println("rows : [");
entity.OfficeWebSvcService service = new entity.OfficeWebSvcService();
entity.OfficeWebSvc port = service.getOfficeWebSvcPort();
java.util.List<java.lang.Object> OfficeIDs = port.getOfcIds();
for (int i = 0; i < OfficeIDs.size(); i++) {
int arg0 = 0;
arg0 = Integer.parseInt(OfficeIDs.get(i).toString());
java.util.List<java.lang.Object> list = port.getOfc(arg0);
out.print("{ officeid: '" + list.get(0).toString() + "'," +
"actvlns: '" + list.get(2).toString() + "'," +
"nactvlns: '" + list.get(3).toString() + "'}");
if (i < OfficeIDs.size()-1)
out.println(",");
else
out.println();
}
out.println("] }");
%>