Ebase External Interface

Documentation home

 

See also:       Working with JSPs

Web Accessibility

 

The Ebase Xi external interface can be used to access and change values within an Ebase Xi form from a Java Servlet Page or JSP. This interface is implemented by the Java class UFSFormInterface and supplies a number of methods to enable an external program or JSP to access form data. For example:

 

General methods:

 

getFormInterface()  

 

static method to return the UFSFormInterface for the currently active form

 

 

Data access methods:

 

getCurrentPage()

 

returns the page name for the current page

getFieldValue(String fieldName)

returns the value of the requested field

setFieldValue(String fieldName, Object value)

changes the value of the field

getFormName()

returns the name of the form

getTextId(int textId)

returns the requested text in the language of the form

 

Accessibility methods: (see Web Accessibility)

 

isJavascriptEnabled()

 

returns false if the page is displayed without Javascript

 

..and many more. See the javadoc for this class for details.

 

Note that if you change a field value using this interface, Ebase Xi does not guarantee that the new value will be validated by the validation logic for the field - this is triggered only when data is entered by the end-user. Therefore, you have the responsibility of ensuring data integrity.

 

Here is an example of code to be inserted into a JSP to extract the current page name using the interface.

 

<%@ page language="java" import="com.ebasetech.ufs.kernel.*" %>

<% UFSFormInterface form = UFSFormInterface.getFormInterface(); %>

<% String currentPage = form.getCurrentPage(); %>

 

This example assumes that the requesting servlet or JSP is part of the same user session.