Hello!
I just looked at the Headless Client Framework. I got things working.
I like its easy and clean design. I successfully called form-methods.
Is it right that it is not possible to call methods of "non-visible" forms?
How do I proceed when I want to call global methods?
Thanks for help.
Michael Wirz,
Munich
My working example jsp is
(Solution: hc_test, Form: hc_test, Method: hc_test)
<%@ page import = "java.util.*" %>
<%@ page import = "com.servoy.j2db.server.headlessclient.*" %>
<%@ page import = "com.servoy.j2db.dataprocessing.IDataSet" %>
<%@ page errorPage="errorpage.jsp" %>
<html>
<head>
<title>Servoy Headless Client Test</title>
</head>
<body>
<%
ISessionBean servoy_hc = (ISessionBean)session.getAttribute("servoy");
if (servoy_hc == null)
{
servoy_hc = HeadlessClientFactory.createSessionBean(request,"hc_test");
session.setAttribute("servoy",servoy_hc);
}
boolean ok = servoy_hc.setMainForm("hc_test");
String theTable = null;
theTable = (String)servoy_hc.executeMethod("hc_test", hc_test", new Object[]{new Integer(17)});
if (theTable!=null) out.println(theTable);
else out.println("theTable is null");
%>
</body>
</html>