org.experlog.openeas.api.demo
Class DemoAction

java.lang.Object
  extended by org.experlog.openeas.api.Action
      extended by org.experlog.openeas.api.demo.DemoAction
All Implemented Interfaces:
ESAction

public class DemoAction
extends Action

Author:
gibello

Constructor Summary
DemoAction()
           
 
Method Summary
 boolean serverSide()
          Server-side actions can only be executed in a template Other actions can also be passed in an HTTP parameter called "Action" This makes server-side actions safer, but less flexible.
 boolean service(Session s, ServletRequest r, java.lang.Object info)
          The core of the Action.
 
Methods inherited from class org.experlog.openeas.api.Action
addDataObject, addDataSet, processRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DemoAction

public DemoAction()
Method Detail

serverSide

public boolean serverSide()
Server-side actions can only be executed in a template Other actions can also be passed in an HTTP parameter called "Action" This makes server-side actions safer, but less flexible.

Specified by:
serverSide in interface ESAction
Specified by:
serverSide in class Action
See Also:
Action.serverSide()

service

public boolean service(Session s,
                       ServletRequest r,
                       java.lang.Object info)
                throws java.lang.Exception
The core of the Action. Here, execute a sql query on a table called "DemoAction" (to be created). Example: CREATE TABLE DemoAction(name varchar(20)); INSERT INTO DemoAction VALUES("Bill"); INSERT INTO DemoAction VALUES("John"); The result is returned as a dataset whose name is specified by the "dsname" HTTP parameter (default: "DEMOACTION") A "where" clause can be specified using the "cond" HTTP parameter. Example: $Action org.experlog.openeas.api.demo.DemoAction $LoopOnResults DEMOACTION r $r:name$ <br/> $EndLoop

Specified by:
service in class Action
Throws:
java.lang.Exception
See Also:
Action.service(org.experlog.openeas.api.Session, org.experlog.openeas.api.ServletRequest, java.lang.Object)