When a custom administrative servlet prints its output, you may want it to format object values into HTML output. The default administrative servlet ServiceAdminServlet
provides a method that may be called by subclasses to do this formatting:
protected String formatObject (Object pObject,
HttpServletRequest pRequest);
This formatting method takes several steps to format the object:
It checks whether the object is a component that implements
NameContextElement
. If so, then it returns an anchor tag that contains a link to that component.It checks whether the object implements
atg.nucleus.ValueFormatter
. If so, then it calls the object’sformatValue()
method and returns the result.If the object is of type
java.lang.Class
, then it returns an anchor tag that contains a link to the API documentation for that class.If the object is of type
java.lang.File
, then it returns an anchor tag that points to that file.Otherwise, it uses the object’s
toString()
method.
The default administrative servlet uses this method to format the values of the properties that it displays.