public class DefaultHTMLCallback extends Object implements HTMLCallback
ERROR_ATTIBUTE_VALUE_INVALID, ERROR_ATTRIBUTE_NOT_SUPPORTED, ERROR_CONNECTING, ERROR_CSS_ATTIBUTE_VALUE_INVALID, ERROR_CSS_ATTRIBUTE_NOT_SUPPORTED, ERROR_CSS_NOT_FOUND, ERROR_ENCODING, ERROR_IMAGE_BAD_FORMAT, ERROR_IMAGE_NOT_FOUND, ERROR_NO_BASE_URL, ERROR_NO_CLOSE_TAG, ERROR_TAG_NOT_SUPPORTED, ERROR_UNEXPECTED_CHARACTER, ERROR_UNEXPECTED_TAG_CLOSING, ERROR_UNRECOGNIZED_CHAR_ENTITY, FIELD_PASSWORD, FIELD_TEXT, LINK_FORBIDDEN, LINK_REGULAR, LINK_VISTED, STATUS_CANCELLED, STATUS_COMPLETED, STATUS_CONNECTED, STATUS_DISPLAYED, STATUS_ERROR, STATUS_NONE, STATUS_PARSED, STATUS_REDIRECTED, STATUS_REQUESTED
Constructor and Description |
---|
DefaultHTMLCallback() |
Modifier and Type | Method and Description |
---|---|
String |
fieldSubmitted(HTMLComponent htmlC,
TextArea ta,
String actionURL,
String id,
String value,
int type,
String errorMsg)
Called whenever a field is submitted to a form.
|
String |
getAutoComplete(HTMLComponent htmlC,
String actionURL,
String id)
Called on form creation and enabled implementations of this method to return a value to preset in a form field.
|
int |
getLinkProperties(HTMLComponent htmlC,
String url)
Returns properties about the given link to indicate to HTMLComponent how to render it
Note that this method is always called NOT on the EDT thread.
|
boolean |
linkClicked(HTMLComponent htmlC,
String url)
Called when a link is clicked.
|
void |
pageStatusChanged(HTMLComponent htmlC,
int status,
String url)
Called when the page status has been changed
|
boolean |
parsingError(int errorId,
String tag,
String attribute,
String value,
String description)
Called when encountering an error while parsing the HTML document.
|
void |
titleUpdated(HTMLComponent htmlC,
String title)
Called when the page's title is updated
|
public void titleUpdated(HTMLComponent htmlC, String title)
titleUpdated
in interface HTMLCallback
htmlC
- The HTMLComponent that triggered the eventtitle
- The new titlepublic boolean parsingError(int errorId, String tag, String attribute, String value, String description)
parsingError
in interface HTMLCallback
errorId
- The error ID, one of the ERROR_* constantstag
- The tag in which the error occured (Can be null for non-tag related errors)attribute
- The attribute in which the error occured (Can be null for non-attribute related errors)value
- The value in which the error occured (Can be null for non-value related errors)description
- A verbal description of the errorpublic void pageStatusChanged(HTMLComponent htmlC, int status, String url)
pageStatusChanged
in interface HTMLCallback
htmlC
- The HTMLComponent in which the status change occuredstatus
- The new status, one of the STATUS_* constantsurl
- The URL of the pagepublic String fieldSubmitted(HTMLComponent htmlC, TextArea ta, String actionURL, String id, String value, int type, String errorMsg)
fieldSubmitted
in interface HTMLCallback
htmlC
- The HTMLComponent in which this event occuredta
- The TextArea/TextField of this fieldactionURL
- The action URL of the formid
- The ID of the fieldvalue
- The value enteredtype
- The type of the field, one of the FIELD_* constantserrorMsg
- The error message if any error occured (i.e. input validation error) or null if no error occuredpublic String getAutoComplete(HTMLComponent htmlC, String actionURL, String id)
getAutoComplete
in interface HTMLCallback
htmlC
- The HTMLComponent in which this event occuredactionURL
- The action URL of the formid
- The ID of the fieldpublic int getLinkProperties(HTMLComponent htmlC, String url)
getLinkProperties
in interface HTMLCallback
htmlC
- The HTMLComponenturl
- The Link URLpublic boolean linkClicked(HTMLComponent htmlC, String url)
linkClicked
in interface HTMLCallback
htmlC
- The HTMLComponenturl
- The Link URL