com.groiss.wf.html
Class HTMLUtils

java.lang.Object
  extended by com.groiss.wf.html.HTMLUtils

public class HTMLUtils
extends java.lang.Object

Some utility methods for building HTML GUIs


Field Summary
static java.lang.String SELECTLIST_LIST
           
static java.lang.String SELECTLIST_TABLE
           
 
Constructor Summary
HTMLUtils()
           
 
Method Summary
 Page agentSelectList(javax.servlet.http.HttpServletRequest req)
          Deprecated. use selectUserOrRole(HttpServletRequest)
static Link getDocumentsLink(ActivityInstance si)
           
static Link getDocumentsLink(ActivityInstance si, java.lang.String comingFrom)
           
static java.util.List getFormLinkList(ActivityInstance ai, int mode, java.lang.String comingFrom, java.lang.String target, boolean buttonsInToolbar, boolean withToolbar)
           
static java.lang.String getFormLinks(ActivityInstance ai, int mode, java.lang.String comingFrom, java.lang.String target)
           
static Link getNotesLink(ActivityInstance ai)
           
static Persistent getObject(javax.servlet.http.HttpServletRequest req)
          This method returns a persistent object when the request contains a parameter "object" with a value in the form <classname>:<oid>.
static Persistent getObject(javax.servlet.http.HttpServletRequest req, java.lang.String key)
           
static Persistent getObject(java.lang.String obj)
           
static java.util.List getObjectList(javax.servlet.http.HttpServletRequest req, java.lang.String key)
          Get list of objects (from multiple selection list) stored in request under key
 Page refreshWorklist(javax.servlet.http.HttpServletRequest req)
           
static Page refreshWorklist(javax.servlet.http.HttpServletRequest req, Application appl)
          Returns a page that redirects to the current worklist of this application
 Page roleList(javax.servlet.http.HttpServletRequest req)
           
static Page selectList(javax.servlet.http.HttpServletRequest req)
          Shows a list of objects for selection in form of a selectlist
static Page selectList2(javax.servlet.http.HttpServletRequest req)
          Shows a list of objects for selection in form of a selectlist
static Page selectTable(javax.servlet.http.HttpServletRequest req)
          Shows a list of objects for selection in form of a table
static Page selectUserOrRole(javax.servlet.http.HttpServletRequest req)
           
static Page showEmptyForm(DMSForm f, java.lang.String buttons, javax.servlet.http.HttpServletRequest req)
           
static Page showForm(javax.servlet.http.HttpServletRequest req)
           
static Page showForm(javax.servlet.http.HttpServletRequest req, ActivityInstance ai, java.lang.String formid, int mode)
           
static Page showForm(javax.servlet.http.HttpServletRequest r, ActivityInstance ai, java.lang.String formid, int mode, java.lang.String buttons)
           
static Link showSubformLink(javax.servlet.http.HttpServletRequest req, java.lang.String title, java.lang.String subformid, int width, int height, java.lang.String tablehandler)
           
static Link showSubformLink(javax.servlet.http.HttpServletRequest req, java.lang.String title, java.lang.String subformid, int width, int height, java.lang.String tablehandler, java.lang.String actions)
           
static Link showSubformLink(javax.servlet.http.HttpServletRequest req, java.lang.String title, java.lang.String subformid, int width, int height, java.lang.String tablehandler, java.lang.String actions, java.lang.String defaultAction)
           
static Link showSubformLink(javax.servlet.http.HttpServletRequest req, java.lang.String title, java.lang.String subformid, int width, int height, java.lang.String tablehandler, java.lang.String actions, java.lang.String defaultAction, java.lang.String page)
           
static void showWorklist(javax.servlet.http.HttpServletRequest r, javax.servlet.http.HttpServletResponse res, com.dec.avw.core.Application appl, int type, java.lang.String worklist, java.lang.String functions)
          sends the worklist to the browser.
 Page userList(javax.servlet.http.HttpServletRequest req)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SELECTLIST_TABLE

public static final java.lang.String SELECTLIST_TABLE
See Also:
Constant Field Values

SELECTLIST_LIST

public static final java.lang.String SELECTLIST_LIST
See Also:
Constant Field Values
Constructor Detail

HTMLUtils

public HTMLUtils()
Method Detail

refreshWorklist

public static Page refreshWorklist(javax.servlet.http.HttpServletRequest req,
                                   Application appl)
Returns a page that redirects to the current worklist of this application

Parameters:
req - the HTTP request
appl - the application

showWorklist

public static void showWorklist(javax.servlet.http.HttpServletRequest r,
                                javax.servlet.http.HttpServletResponse res,
                                com.dec.avw.core.Application appl,
                                int type,
                                java.lang.String worklist,
                                java.lang.String functions)
                         throws java.lang.Exception
sends the worklist to the browser.

Parameters:
r - the HTTP request
res - the HTTP response
appl - the application
type - the type: 0..user, 1..role, 2..suspension list
worklist - a worklist implementation (implements com.groiss.wf.html.Worklist)
functions - a space-separated list of function ids
Throws:
java.lang.Exception

showForm

public static Page showForm(javax.servlet.http.HttpServletRequest req)
                     throws java.lang.Exception
Throws:
java.lang.Exception

showForm

public static Page showForm(javax.servlet.http.HttpServletRequest req,
                            ActivityInstance ai,
                            java.lang.String formid,
                            int mode)
                     throws java.lang.Exception
Throws:
java.lang.Exception

showForm

public static Page showForm(javax.servlet.http.HttpServletRequest r,
                            ActivityInstance ai,
                            java.lang.String formid,
                            int mode,
                            java.lang.String buttons)
                     throws java.lang.Exception
Throws:
java.lang.Exception

showEmptyForm

public static Page showEmptyForm(DMSForm f,
                                 java.lang.String buttons,
                                 javax.servlet.http.HttpServletRequest req)
                          throws java.lang.Exception
Throws:
java.lang.Exception

selectList

public static Page selectList(javax.servlet.http.HttpServletRequest req)
                       throws java.lang.Exception
Shows a list of objects for selection in form of a selectlist

Throws:
java.lang.Exception

selectTable

public static Page selectTable(javax.servlet.http.HttpServletRequest req)
                        throws java.lang.Exception
Shows a list of objects for selection in form of a table

Throws:
java.lang.Exception

selectList2

public static Page selectList2(javax.servlet.http.HttpServletRequest req)
                        throws java.lang.Exception
Shows a list of objects for selection in form of a selectlist

Throws:
java.lang.Exception

agentSelectList

@Deprecated
public Page agentSelectList(javax.servlet.http.HttpServletRequest req)
                     throws java.lang.Exception
Deprecated. use selectUserOrRole(HttpServletRequest)

Throws:
java.lang.Exception

roleList

public Page roleList(javax.servlet.http.HttpServletRequest req)
              throws java.lang.Exception
Throws:
java.lang.Exception

userList

public Page userList(javax.servlet.http.HttpServletRequest req)
              throws java.lang.Exception
Throws:
java.lang.Exception

selectUserOrRole

public static Page selectUserOrRole(javax.servlet.http.HttpServletRequest req)
                             throws java.lang.Exception
Throws:
java.lang.Exception

getObject

public static Persistent getObject(javax.servlet.http.HttpServletRequest req)
                            throws java.lang.Exception
This method returns a persistent object when the request contains a parameter "object" with a value in the form <classname>:<oid>. The method returns null if no such parameter is present or the object is not in the database. if the oid is 0 it returrns a new instance of the class.

Parameters:
req -
Returns:
a persistent object or null
Throws:
java.lang.Exception

getObject

public static Persistent getObject(javax.servlet.http.HttpServletRequest req,
                                   java.lang.String key)
                            throws java.lang.Exception
Throws:
java.lang.Exception

getObject

public static Persistent getObject(java.lang.String obj)
                            throws java.lang.Exception
Throws:
java.lang.Exception

getDocumentsLink

public static Link getDocumentsLink(ActivityInstance si)
                             throws java.lang.Exception
Returns:
a link to the document folder
Throws:
java.lang.Exception

getDocumentsLink

public static Link getDocumentsLink(ActivityInstance si,
                                    java.lang.String comingFrom)
                             throws java.lang.Exception
Parameters:
comingFrom - the url for the back button in the document table
Returns:
a link to the document folder
Throws:
java.lang.Exception

getNotesLink

public static Link getNotesLink(ActivityInstance ai)
                         throws java.lang.Exception
Returns:
a link to the notes of a process
Throws:
java.lang.Exception

getFormLinks

public static java.lang.String getFormLinks(ActivityInstance ai,
                                            int mode,
                                            java.lang.String comingFrom,
                                            java.lang.String target)

getFormLinkList

public static java.util.List getFormLinkList(ActivityInstance ai,
                                             int mode,
                                             java.lang.String comingFrom,
                                             java.lang.String target,
                                             boolean buttonsInToolbar,
                                             boolean withToolbar)
Returns:
links to the forms

showSubformLink

public static Link showSubformLink(javax.servlet.http.HttpServletRequest req,
                                   java.lang.String title,
                                   java.lang.String subformid,
                                   int width,
                                   int height,
                                   java.lang.String tablehandler)
                            throws java.lang.Exception
Throws:
java.lang.Exception

showSubformLink

public static Link showSubformLink(javax.servlet.http.HttpServletRequest req,
                                   java.lang.String title,
                                   java.lang.String subformid,
                                   int width,
                                   int height,
                                   java.lang.String tablehandler,
                                   java.lang.String actions)
                            throws java.lang.Exception
Throws:
java.lang.Exception

showSubformLink

public static Link showSubformLink(javax.servlet.http.HttpServletRequest req,
                                   java.lang.String title,
                                   java.lang.String subformid,
                                   int width,
                                   int height,
                                   java.lang.String tablehandler,
                                   java.lang.String actions,
                                   java.lang.String defaultAction)
                            throws java.lang.Exception
Throws:
java.lang.Exception

showSubformLink

public static Link showSubformLink(javax.servlet.http.HttpServletRequest req,
                                   java.lang.String title,
                                   java.lang.String subformid,
                                   int width,
                                   int height,
                                   java.lang.String tablehandler,
                                   java.lang.String actions,
                                   java.lang.String defaultAction,
                                   java.lang.String page)
                            throws java.lang.Exception
Throws:
java.lang.Exception

getObjectList

public static java.util.List getObjectList(javax.servlet.http.HttpServletRequest req,
                                           java.lang.String key)
                                    throws java.lang.Exception
Get list of objects (from multiple selection list) stored in request under key

Parameters:
req -
key -
Throws:
java.lang.Exception

refreshWorklist

public Page refreshWorklist(javax.servlet.http.HttpServletRequest req)
                     throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2001-2006 Groiss Informatics GmbH. All Rights Reserved.