public class ERXAccessibleSubmitButton extends ERXSubmitButton
The default is to use the u (underline) element to identify the hot key in the button text. Use the accesskeyElement binding to specify a different element. The element can be decorated with other attributes, e.g.
accesskeyElement = "span style='text-decoration: underline;'";
You can have this class replace WOSubmitButton via ERXPatcher.setClassForName(ERXAccessibleSubmitButton.class, "WOSubmitButton"); or use it explicitly by name in your WOD. It works best (does the most work for you) if you use it with the value attribute. No self configuring is done if there is any content between the open and close tags.
ERXSubmitButton
Name | Description |
---|---|
accesskey | optional key for hot key, "" to disable hot key |
accesskeyElement | optional element name and decoration to wrap hot key character with in the button text |
value | the button text |
Modifier and Type | Field and Description |
---|---|
protected com.webobjects.appserver.WOAssociation |
_accesskey |
protected com.webobjects.appserver.WOAssociation |
_accesskeyElement |
_action, _actionClass, _directActionName, _shouldSubmitForm, STYLE_PREFIX
_disabled, _escapeHTML, _hidden, _name, _value
_associations, _class, _constantAttributeAssociations, _constantAttributesRepresentation, _dyneltName, _finishedInitialization, _generatedId, _id, _prefix, _rendered, _secure, _style, _suffix, _title, DontEscapeHTML, EscapeHTML
Constructor and Description |
---|
ERXAccessibleSubmitButton(String name,
NSDictionary<String,com.webobjects.appserver.WOAssociation> associations,
com.webobjects.appserver.WOElement template) |
Modifier and Type | Method and Description |
---|---|
protected String |
accesskey(com.webobjects.appserver.WOComponent component) |
protected String |
accesskeyElement(com.webobjects.appserver.WOComponent component) |
void |
appendAttributesToResponse(com.webobjects.appserver.WOResponse response,
com.webobjects.appserver.WOContext context)
Adds the accesskey binding as we took it out of the associations dictionary
|
void |
appendChildrenToResponse(com.webobjects.appserver.WOResponse response,
com.webobjects.appserver.WOContext context)
Adds styledValue between the open and close tags
|
void |
appendToResponse(com.webobjects.appserver.WOResponse response,
com.webobjects.appserver.WOContext context)
Records the accesskey for this button so other buttons on the page won't use it.
|
protected boolean |
hasUsedHotKey(com.webobjects.appserver.WOComponent component,
String hotKey) |
protected boolean |
isDisabled(com.webobjects.appserver.WOComponent component) |
protected void |
recordUsedHotKey(com.webobjects.appserver.WOComponent component,
String hotKey)
Records that hotKey is being used by a ERXAccessibleSubmitButton on this page.
|
protected String |
styledValue(com.webobjects.appserver.WOComponent component) |
protected NSMutableArray |
usedHotKeys(com.webobjects.appserver.WOComponent component) |
_appendCloseTagToResponse, _appendNameAttributeToResponse, _appendOpenTagToResponse, _appendTypeAttributeToResponse, appendIEButtonFixToResponse, elementName, invokeAction, isDisabledInContext, takeValuesFromRequest, toString, type
_appendDisabledAttributeToResponse, _appendValueAttributeToResponse, defaultEscapeHTML, escapeHTMLInContext, hasContent, hiddenInContext, isValueInInputValues, nameInContext, nameInContext, valueStringInContext
__otherQueryDictionaryInContext, __queryDictionaryInContext, _appendAttributesFromAssociationsToResponse, _appendClassAndIdToResponse, _appendTagAttributeAndValueToResponse, _frameworkNameInComponent, appendConstantAttributesToResponse, appendHiddenFieldToResponse, appendNonURLAttributesToResponse, appendURLAttributesToResponse, classInContext, computeActionStringInContext, computeQueryDictionaryInContext, constantAttributeAssociations, constantAttributesRepresentation, elementName, escapeHTML, idInContext, isRenderedInContext, nonUrlAttributeAssociations, prefixInContext, secureInContext, stringValueInContext, styleInContext, suffixInContext, titleInContext, urlAttributeAssociations
protected com.webobjects.appserver.WOAssociation _accesskey
protected com.webobjects.appserver.WOAssociation _accesskeyElement
public ERXAccessibleSubmitButton(String name, NSDictionary<String,com.webobjects.appserver.WOAssociation> associations, com.webobjects.appserver.WOElement template)
protected String accesskey(com.webobjects.appserver.WOComponent component)
component
- WOComponent to evaluate the associations inprotected String accesskeyElement(com.webobjects.appserver.WOComponent component)
component
- WOComponent to evaluate the associations inprotected boolean isDisabled(com.webobjects.appserver.WOComponent component)
component
- WOComponent to evaluate the associations intrue
if accesskey should not be generatedprotected String styledValue(com.webobjects.appserver.WOComponent component)
component
- WOComponent to evaluate the associations inpublic void appendToResponse(com.webobjects.appserver.WOResponse response, com.webobjects.appserver.WOContext context)
public void appendAttributesToResponse(com.webobjects.appserver.WOResponse response, com.webobjects.appserver.WOContext context)
public void appendChildrenToResponse(com.webobjects.appserver.WOResponse response, com.webobjects.appserver.WOContext context)
protected boolean hasUsedHotKey(com.webobjects.appserver.WOComponent component, String hotKey)
component
- WOComponent to evaluate the associations inhotKey
- the character to checktrue
if hotKey has been used by another ERXAccessibleSubmitButton on this pageprotected void recordUsedHotKey(com.webobjects.appserver.WOComponent component, String hotKey)
component
- WOComponent to evaluate the associations inhotKey
- the character to recordprotected NSMutableArray usedHotKeys(com.webobjects.appserver.WOComponent component)
component
- WOComponent to evaluate the associations inCopyright © 2002 – 2020 Project Wonder.