|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ebasetech.ufs.kernel.UFSFormInterface
public class UFSFormInterface
This class represents the external interface to a running Ebase form. It allows information to be extracted from the form for use by other programs or Java Server Pages (JSPs) running within the same web application. It also allows form field values to be changed.
Example of instantiating UFSFormInterface from a JSP is :
<%@ page language="java" import="com.ebasetech.ufs.kernel.*"%>
<% UFSFormInterface form = UFSFormInterface.getFormInterface(); %>
Information can then be extracted from the form and presented on the page. For example, to display the current page name :
Page name: <%=form.getCurrentPage()%>
Constructor Summary | |
---|---|
UFSFormInterface(com.ebasetech.ufs.runtime.HeadlessUserState headlessUserState)
UFSFormInterface constructor - internal use only |
Method Summary | |
---|---|
void |
addScratchPadObject(java.lang.String name,
java.lang.Object obj)
Add an object to the scratchpad area |
java.lang.String |
calculateFontSize(java.lang.String sizeString)
Deprecated. from V4.0 with no replacement. Zoom options are not applicable in V4.0. Returns the value of sizeString |
void |
commitTransaction()
Commits the current transaction and starts a new transaction. |
void |
deleteAllRows(java.lang.String tableFieldName)
Delete all rows from a table |
com.ebasetech.xi.api.Client |
getClientApi()
Returns the Api Client object that provides information about the browser client. |
java.lang.String |
getCurrentPage()
|
java.lang.String |
getFieldValue(java.lang.String fieldName)
Returns the string value of the field requested, or null if the field does not exist in the form. |
com.ebasetech.ufs.beans.FormBean |
getForm()
|
com.ebasetech.xi.api.WebForm |
getFormApi()
Returns the Api WebForm object that provides access to the form Api. |
static UFSFormInterface |
getFormInterface()
Returns the current UFSFormInterface object to external callers. |
java.lang.String |
getFormName()
returns the name of the form |
com.ebasetech.ufs.kernel.FormSession |
getFormSessionContext()
Returns the FormSession context object for the user session. |
com.ebasetech.ufs.runtime.HeadlessUserState |
getHeadlessUserState()
|
com.ebasetech.ufs.kernel.FormInterfaceLogger |
getLogger()
|
java.lang.String |
getMessageText(java.lang.String project,
int messageId,
java.util.Vector parms)
Returns a message text. |
java.lang.Object[] |
getPages(boolean allPages)
Returns a list of the form's pages - in order as much as possible |
java.lang.String |
getRelativeFieldName(java.lang.String fieldName)
|
java.lang.String |
getRelativePageName(java.lang.String pageName)
|
java.lang.String |
getRelativeTextId(java.lang.String textId)
|
java.lang.Object |
getScratchPadObject(java.lang.String name)
Get an object from the scratchpad area |
com.ebasetech.ufs.scripts.ScriptContext |
getScriptContext()
|
javax.servlet.http.HttpSession |
getSessionContext()
Returns the HttpSession context object for the user session. |
com.ebasetech.xi.api.EbaseSystem |
getSystem()
Returns the Api System object that provides access to common services and information. |
TableDataInterface |
getTableData(java.lang.String tableFieldName)
|
java.lang.String |
getText(int textId)
Deprecated. getText(textId, namespace) should be used. |
java.lang.String |
getText(java.lang.String textId,
java.lang.String namespace)
returns the text for the corresponding textid in the form's language |
int |
getZoomAmount()
Deprecated. from V4.0 with no replacement. The zoom facility is no longer supported. |
void |
insertRow(java.lang.String tableFieldName,
boolean empty)
Insert a new row to a table. |
boolean |
isBatchMode()
Returns true if the system is operating in batch mode. |
boolean |
isDisplayInColour()
Deprecated. from V4.0 with no replacement. The ability to suppress colour is no longer supported. |
boolean |
isJavascriptEnabled()
can Javascript be used with this browser connection |
boolean |
isUseStylesheets()
Deprecated. from V4.0 with no replacement. Output is always rendered using CSS regardless of whether this is supported by the browser. |
void |
logFormError(java.lang.String errorMsg)
Log an error message. |
void |
logFormInfo(java.lang.String infoMsg)
Log an information message. |
void |
removeScratchPadObject(java.lang.String name)
Remove an object from the scratchpad area |
void |
rollbackTransaction()
Rolls back the current transaction and starts a new transaction. |
void |
setErrorMessage(int messageNo,
java.util.Vector messageParameters)
Add an error message to the current control. |
void |
setErrorMessage(java.lang.String messageText)
Add a simple error message to the current control where the error message text is supplied as messageText. |
void |
setFieldList(java.lang.String fieldName,
java.util.Vector values)
Use this method to dynamically add a list to a form field. |
void |
setFieldValue(java.lang.String fieldName,
java.lang.Object value)
Sets a new value for the specified type. |
void |
setHeadlessUserState(com.ebasetech.ufs.runtime.HeadlessUserState hadlessUserState)
|
void |
setScriptContext(com.ebasetech.ufs.runtime.EventScriptContext scriptContext)
|
void |
setTableData(java.lang.String tableFieldName,
TableDataInterface tableData)
|
void |
setWarningMessage(int messageNo,
java.util.Vector messageParameters)
Add an warning message to the current control. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UFSFormInterface(com.ebasetech.ufs.runtime.HeadlessUserState headlessUserState)
Method Detail |
---|
public com.ebasetech.ufs.runtime.HeadlessUserState getHeadlessUserState()
public java.lang.String getCurrentPage()
public java.lang.String getFieldValue(java.lang.String fieldName)
public java.lang.String getFormName()
public java.lang.Object[] getPages(boolean allPages)
public java.lang.String getText(int textId)
textId
- is the unique text id numberpublic java.lang.String getText(java.lang.String textId, java.lang.String namespace)
textId
- is the unique text id stringnamespace
- is the text namespace and should be one of 'Local', 'Shared' or 'System'public void setErrorMessage(int messageNo, java.util.Vector messageParameters) throws com.ebasetech.ufs.kernel.FormException
com.ebasetech.ufs.kernel.FormException
public void setErrorMessage(java.lang.String messageText) throws com.ebasetech.ufs.kernel.FormException
com.ebasetech.ufs.kernel.FormException
public void setFieldList(java.lang.String fieldName, java.util.Vector values) throws com.ebasetech.ufs.kernel.FormException
com.ebasetech.ufs.kernel.FormException
public void setFieldValue(java.lang.String fieldName, java.lang.Object value) throws com.ebasetech.ufs.kernel.FormException
com.ebasetech.ufs.kernel.FormException
public void setWarningMessage(int messageNo, java.util.Vector messageParameters) throws com.ebasetech.ufs.kernel.FormException
com.ebasetech.ufs.kernel.FormException
public void addScratchPadObject(java.lang.String name, java.lang.Object obj)
public java.lang.Object getScratchPadObject(java.lang.String name)
public void removeScratchPadObject(java.lang.String name)
public void setScriptContext(com.ebasetech.ufs.runtime.EventScriptContext scriptContext)
public java.lang.String getRelativeFieldName(java.lang.String fieldName)
public java.lang.String getRelativePageName(java.lang.String pageName)
public java.lang.String getRelativeTextId(java.lang.String textId)
public TableDataInterface getTableData(java.lang.String tableFieldName) throws com.ebasetech.ufs.kernel.FormException
com.ebasetech.ufs.kernel.FormException
public void setTableData(java.lang.String tableFieldName, TableDataInterface tableData) throws com.ebasetech.ufs.kernel.FormException
com.ebasetech.ufs.kernel.FormException
public void insertRow(java.lang.String tableFieldName, boolean empty) throws com.ebasetech.ufs.kernel.FormException
tableFieldName
- field name for an existing tableempty
- true if the row should be marked as empty. see documentation for insertRow FPL command.
FormException
- will throw a FormException if tableFieldName is not a tablepublic void deleteAllRows(java.lang.String tableFieldName) throws com.ebasetech.ufs.kernel.FormException
tableFieldName
- field name for an existing table
FormException
- will throw a FormException if tableFieldName is not a tablepublic boolean isJavascriptEnabled()
public int getZoomAmount()
public boolean isDisplayInColour()
public boolean isUseStylesheets()
public java.lang.String calculateFontSize(java.lang.String sizeString)
public javax.servlet.http.HttpSession getSessionContext()
public com.ebasetech.ufs.kernel.FormSession getFormSessionContext()
public void logFormError(java.lang.String errorMsg)
public void logFormInfo(java.lang.String infoMsg)
public boolean isBatchMode()
public void rollbackTransaction() throws com.ebasetech.ufs.kernel.FormTransactionException
com.ebasetech.ufs.kernel.FormTransactionException
public void commitTransaction() throws com.ebasetech.ufs.kernel.FormTransactionException
com.ebasetech.ufs.kernel.FormTransactionException
public java.lang.String getMessageText(java.lang.String project, int messageId, java.util.Vector parms) throws com.ebasetech.ufs.kernel.FormException
com.ebasetech.ufs.kernel.FormException
public com.ebasetech.ufs.beans.FormBean getForm()
public com.ebasetech.xi.api.WebForm getFormApi()
WebForm
object that provides access to the form Api.
WebForm
public com.ebasetech.xi.api.Client getClientApi()
Client
object that provides information about the browser client.
Client
public com.ebasetech.xi.api.EbaseSystem getSystem()
System
object that provides access to common services and information.
System
public com.ebasetech.ufs.kernel.FormInterfaceLogger getLogger()
public static UFSFormInterface getFormInterface()
public void setHeadlessUserState(com.ebasetech.ufs.runtime.HeadlessUserState hadlessUserState)
public com.ebasetech.ufs.scripts.ScriptContext getScriptContext()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |