| org.apache.tapestry.ComponentResourcesCommon
Method Summary | |
Link | createActionLink(String action, boolean forForm, Object... context) Creates a component action request link as a callback for this component. | Link | createPageLink(String pageName, boolean override, Object... context) Creates a render request link to a specific page.
Parameters: pageName - the logical name of the page to link to Parameters: override - if true, the context is used even if empty (normally, the target page is allowedto passivate, providing a context, when the provided context is empty) Parameters: context - the activation context for the page. | Block | findBlock(String blockId) As with
ComponentResourcesCommon.getBlock(String) , but returns null if the block is not found. | Block | getBlock(String blockId) Returns a block from the component's template, referenced by its id. | String | getCompleteId() Returns a string consisting of the fully qualified class name of the containing page, and the
ComponentResourcesCommon.getNestedId() nested id of this component, separated by a colon. | String | getElementName() Returns the name of element that represents the component in its template, or null if the
element was a component type (in the Tapestry namespace). | String | getId() Returns the id of the component. | Locale | getLocale() Returns the locale for the page containing this component. | Log | getLog() Returns the log instance associated with the component (which is based on the component or
mixin's class name). | String | getNestedId() Return a string consisting the concatinated ids of all containing components, separated by
periods. | String | getPageName() Returns the logical name of the page containing this component. | boolean | isRendering() Returns true if the component is currently rendering, false otherwise. | boolean | triggerEvent(String eventType, Object[] context, ComponentEventHandler handler) Triggers a component event. |
createActionLink | Link createActionLink(String action, boolean forForm, Object... context)(Code) | | Creates a component action request link as a callback for this component.
Parameters: action - a name for the action associated with the link Parameters: forForm - if true, the link will be used as the action for an HTML form submission, whichmay affect what information is encoded into the link Parameters: context - additional objects to be encoded into the path portion of the link; each isconverted to a string an URI encoded |
createPageLink | Link createPageLink(String pageName, boolean override, Object... context)(Code) | | Creates a render request link to a specific page.
Parameters: pageName - the logical name of the page to link to Parameters: override - if true, the context is used even if empty (normally, the target page is allowedto passivate, providing a context, when the provided context is empty) Parameters: context - the activation context for the page. If omitted, the activation context isobtained from the target paget |
getCompleteId | String getCompleteId()(Code) | | Returns a string consisting of the fully qualified class name of the containing page, and the
ComponentResourcesCommon.getNestedId() nested id of this component, separated by a colon. I.e.,
"MyPage:foo.bar.baz". For a page, returns just the page's logical name.
This value is often used to obtain an equivalent component instance in a later request.
See Also: ComponentSource |
getElementName | String getElementName()(Code) | | Returns the name of element that represents the component in its template, or null if the
element was a component type (in the Tapestry namespace).
the element name |
getId | String getId()(Code) | | Returns the id of the component. The id will be unique within the component's immediate
container. For a page's root component, the value null is returned.
|
getLocale | Locale getLocale()(Code) | | Returns the locale for the page containing this component.
|
getLog | Log getLog()(Code) | | Returns the log instance associated with the component (which is based on the component or
mixin's class name).
See Also: ComponentModel.getLog |
getNestedId | String getNestedId()(Code) | | Return a string consisting the concatinated ids of all containing components, separated by
periods. In addition, nested ids are always all lower case. I.e., "foo.bar.baz". Returns null
for a page.
|
getPageName | String getPageName()(Code) | | Returns the logical name of the page containing this component. This is the short
name (it often appears in URLs)
the logical name of the page which contains this component |
isRendering | boolean isRendering()(Code) | | Returns true if the component is currently rendering, false otherwise. This is most often
used to determine if parameter values should be cached.
|
triggerEvent | boolean triggerEvent(String eventType, Object[] context, ComponentEventHandler handler)(Code) | | Triggers a component event. A search for an event handling method will occur, first in the
component, then its container, and so on. When a matching event handler method is located, it
is invoked. If the method returns a value, the value is passed to the handler (if handler is
null, then it is an error for a method to return a non-null vavlue).
Resolution of event type to event handler methods is case insensitive.
Parameters: eventType - event type (as determined from the request, or otherwise by design) Parameters: context - the context (as extracted from the request, or provided by the triggeringcomponent); these values may be provided to event handler methods via theirparameters (may be null) Parameters: handler - the handler to be informed of the result, or null if the event is a notificationthat does not support return values from event handler methods (the value true isallowed even if the handler is null). true if any event handler was invoked (even if no event handler method returns anon-null value) See Also: OnEventWorker See Also: OnEvent |
|
|