Screens are loaded from files <screenName>.ui.xml. The default location of these files is "$webRoot/shared/ui", but this can be overridden in the server.properties file by specifying property "project.ui", like this:
project.ui: $webRoot/commonUI,$webRoot/userScreenIf a screen file is not found, a warning is logged and nothing is returned
static void
static void
addDynamicScreenGenerator(DynamicScreenGenerator dsg, String prefix)
static void
addDynamicScreenGenerator(DynamicScreenGenerator dsg, Pattern regex)
static void
void
processRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
static DynamicScreenGenerator
static DynamicScreenGenerator
removeDynamicScreenGenerator(String prefix)
static DynamicScreenGenerator
handleError, handleError
request
- HttpServletRequest
object that contains the request the client has made of the servlet.response
- HttpServletResponse
object that contains the response the servlet sends to the client.jakarta.servlet.ServletException
- if the request could not be handled.IOException
- if an input or output error is detected when the servlet handles request.DynamicScreenGenerator.getScreen(String)
method; only if that method returns null
will it proceed to use the normal system for obtaining screen instances. NOTE:
addDynamicScreenGenerator(DynamicScreenGenerator, String)
and addDynamicScreenGenerator(DynamicScreenGenerator, Pattern)
for APIs that are more likely to be suitablenull
for screens that you cannot provide an instance ofdsg
- A DynamicScreenGenerator to register as the defaultYou can add multiple DynamicScreenGenerators using this API. If two or more are registered with prefixes that match a given screen ID, the one added first wins. Eg, if you have prefixes "c" and "cust" registered, then the "customer" screen will be provided by whichever of those two DynamicScreenGenerators was registered first. Note that this "earliest first" basis also applies to DynamicScreenGenerators registered with a regexp; if you had a screen ID that matched both a prefix and a regexp, whichever one of the two registrations came first would be used - there is no priority given to one or the other styles of ID matching.
dsg
- A DynamicScreenGenerator to register as the defaultprefix
- A prefix String as described abovejava.util.regex.Pattern
You can add multiple DynamicScreenGenerators using this API. If two or more are registered with regular expressions that match a given screen ID, the one added first wins. This also applies to DynamicScreenGenerators registered with a simple prefix String.
dsg
- A DynamicScreenGenerator to register as the defaultregex
- A Pattern representing a regular expression to match against incoming screen IDs