When a custom administrative servlet prints its output, you might want it to format object values into HTML output. The default administrative servlet ServiceAdminServlet
provides a method that can 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, it returns an anchor tag that contains a link to that component.It checks whether the object implements
atg.nucleus.ValueFormatter
. If so, it calls the object’sformatValue()
method and returns the result.If the object is of type
java.lang.Class
, 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
, 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.