Class ClientBehaviorSupportImpl
- java.lang.Object
-
- org.apache.tapestry5.internal.services.ClientBehaviorSupportImpl
-
- All Implemented Interfaces:
ClientBehaviorSupport
public class ClientBehaviorSupportImpl extends java.lang.Object implements ClientBehaviorSupport
-
-
Constructor Summary
Constructors Constructor Description ClientBehaviorSupportImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFormFragment(java.lang.String clientId, boolean alwaysSubmit, java.lang.String showFunctionName, java.lang.String hideFunctionName)Adds a new client-side Tapestry.FormFragment object.voidaddFormFragment(java.lang.String clientId, boolean alwaysSubmit, java.lang.String showFunctionName, java.lang.String hideFunctionName, java.lang.String visibilityBoundFunctionName)Adds a new client-side Tapestry.FormFragment object.voidaddFormFragment(java.lang.String clientId, java.lang.String showFunctionName, java.lang.String hideFunctionName)Adds a new client-side Tapestry.FormFragment object.voidaddFormInjector(java.lang.String clientId, Link link, InsertPosition insertPosition, java.lang.String showFunctionName)Adds a new client-side Tapestry.FormInjector object.voidaddValidation(Field field, java.lang.String validationName, java.lang.String message, java.lang.Object constraint)Collects field validation information.voidaddZone(java.lang.String clientId, java.lang.String showFunctionName, java.lang.String updateFunctionName)Adds a new client-side Tapestry.Zone object.voidlinkZone(java.lang.String linkId, java.lang.String elementId, Link eventLink)Sets the client-side onclick handler for an <a> element to perform an Ajax update of a zone.
-
-
-
Constructor Detail
-
ClientBehaviorSupportImpl
public ClientBehaviorSupportImpl()
-
-
Method Detail
-
addZone
public void addZone(java.lang.String clientId, java.lang.String showFunctionName, java.lang.String updateFunctionName)
Description copied from interface:ClientBehaviorSupportAdds a new client-side Tapestry.Zone object. Zones are linked to a an element (typically, a <div>). A Zone may have handlers used to initially show it, or to highlight it when its content changes. Such handlers are referenced by name, as functions of the Tapestry.ElementEffect object.- Specified by:
addZonein interfaceClientBehaviorSupport- Parameters:
clientId- client-side id of the element that will be updated by the zoneshowFunctionName- name of the function used to initially show the zone (if not visible), or null for defaultupdateFunctionName- name of function used to highlight the function after an update, or null for default
-
linkZone
public void linkZone(java.lang.String linkId, java.lang.String elementId, Link eventLink)
Description copied from interface:ClientBehaviorSupportSets the client-side onclick handler for an <a> element to perform an Ajax update of a zone. Starting in Tapestry 5.4, this can be accomplished by adding a "data-update-zone" attribute to the element. The attribute value may be^or the id of the zone's client element.- Specified by:
linkZonein interfaceClientBehaviorSupport- Parameters:
linkId- id of the link to Ajax enableelementId- id of an element that has been previously registered as a Zone
-
addFormFragment
public void addFormFragment(java.lang.String clientId, java.lang.String showFunctionName, java.lang.String hideFunctionName)
Description copied from interface:ClientBehaviorSupportAdds a new client-side Tapestry.FormFragment object. FormFragment's are used to make parts of a client-side form visible or invisible, which involves interactions with both the server-side and client-side validation.- Specified by:
addFormFragmentin interfaceClientBehaviorSupport- Parameters:
clientId- client-side id of the element that will be made visible or invisibleshowFunctionName- name of function (of the Tapestry.ElementEffect object) used to make the SubForm visible, or null for the defaulthideFunctionName- name of the function used to make the SubForm invisible, or null for the default
-
addFormFragment
public void addFormFragment(java.lang.String clientId, boolean alwaysSubmit, java.lang.String showFunctionName, java.lang.String hideFunctionName)
Description copied from interface:ClientBehaviorSupportAdds a new client-side Tapestry.FormFragment object. FormFragment's are used to make parts of a client-side form visible or invisible, which involves interactions with both the server-side and client-side validation.- Specified by:
addFormFragmentin interfaceClientBehaviorSupport- Parameters:
clientId- client-side id of the element that will be made visible or invisiblealwaysSubmit- if true, the fragment ignores client-side visiblility and always submits its valuesshowFunctionName- name of function (of the Tapestry.ElementEffect object) used to make the SubForm visible, or null for the defaulthideFunctionName- name of the function used to make the SubForm invisible, or null for the default
-
addFormFragment
public void addFormFragment(java.lang.String clientId, boolean alwaysSubmit, java.lang.String showFunctionName, java.lang.String hideFunctionName, java.lang.String visibilityBoundFunctionName)
Description copied from interface:ClientBehaviorSupportAdds a new client-side Tapestry.FormFragment object. FormFragment's are used to make parts of a client-side form visible or invisible, which involves interactions with both the server-side and client-side validation. This implementation has been removed in 5.4; it throws anUnsupportedOperationException.- Specified by:
addFormFragmentin interfaceClientBehaviorSupport- Parameters:
clientId- client-side id of the element that will be made visible or invisiblealwaysSubmit- if true, the fragment ignores client-side visiblility and always submits its valuesshowFunctionName- name of function (of the Tapestry.ElementEffect object) used to make the SubForm visible, or null for the defaulthideFunctionName- name of the function used to make the SubForm invisible, or null for the defaultvisibilityBoundFunctionName- name of the function used to bound the isDeepVisible search, or null for the default
-
addFormInjector
public void addFormInjector(java.lang.String clientId, Link link, InsertPosition insertPosition, java.lang.String showFunctionName)
Description copied from interface:ClientBehaviorSupportAdds a new client-side Tapestry.FormInjector object. FormInjectors are used to extend an existing Form with new content.- Specified by:
addFormInjectorin interfaceClientBehaviorSupport- Parameters:
clientId- client-side id of the element that identifiess where the new content will be placedlink- action request link used to trigger the server-side object, to render the new contentinsertPosition- where the new content should go (above or below the element)showFunctionName- name of function (of the Tapestry.ElementEffect object) used to make the new element visible, or null for the default
-
addValidation
public void addValidation(Field field, java.lang.String validationName, java.lang.String message, java.lang.Object constraint)
Description copied from interface:ClientBehaviorSupportCollects field validation information.- Specified by:
addValidationin interfaceClientBehaviorSupport- Parameters:
field- for which validation is being generatedvalidationName- name of validation method (see Tapestry.Validation in tapestry.js)message- the error message to display if the field is invalidconstraint- additional constraint value, or null for validations that don't require a constraint
-
-