Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tapestry5.internal.structure
Interface ComponentPageElementResources

All Superinterfaces:
  ContextValueEncoder, OperationTracker

All Known Implementing Classes:
  ComponentPageElementResourcesImpl

    public interface ComponentPageElementResources

extends ContextValueEncoder, OperationTracker

Provides access to common methods of various services, needed by implementations of `ComponentPageElement` and `InternalComponentResources`.

Method Summary
`
`<S,T> T`
` | `coerce(S input, java.lang.Class<T> targetType)` Performs a coercion from an input type to a desired output type.
`Link` | `createComponentEventLink(ComponentResources resources, java.lang.String eventType, boolean forForm, java.lang.Object... context)` Creates a link on behalf of a component.
`Link` | `createPageRenderLink(java.lang.Class pageClass, boolean override, java.lang.Object... context)` Creates a page render request link to render a specific page.
`Link` | `createPageRenderLink(java.lang.String pageName, boolean override, java.lang.Object... context)` Creates a page render request link to render a specific page.
`
`<T> PerThreadValue<T>`
` | `createPerThreadValue()` Wrapper around `PerthreadManager.createValue()`.
`org.slf4j.Logger` | `getEventLogger(org.slf4j.Logger componentLogger)` Returns the event logger for the provided component logger.
`Messages` | `getMessages(ComponentModel componentModel)` Used to obtain a `Messages` instance for a particular component.
`ComponentResourceSelector` | `getSelector()` Returns the selector associated with this resources.
`java.lang.Class` | `toClass(java.lang.String className)` Gets the Class instance for then give name.

Methods inherited from interface org.apache.tapestry5.services.ContextValueEncoder
`toClient, toValue`

Methods inherited from interface org.apache.tapestry5.ioc.OperationTracker
`invoke, run`

Method Detail

### getSelector

    ComponentResourceSelector getSelector()

  Returns the selector associated with this resources.

  Since:
    5.3

### getMessages

    Messages getMessages(ComponentModel componentModel)

  Used to obtain a `Messages` instance for a particular component. If the component extends from another component, then its localized properties will merge with its parent's properties (with the subclass overriding the super class on any conflicts).

  Parameters:
    `componentModel` -
  Returns:
    the message catalog for the component, in the indicated locale
  See Also:
    `ComponentMessagesSource`

### coerce

    <S,T> T coerce(S input,
                   java.lang.Class<T> targetType)

  Performs a coercion from an input type to a desired output type. When the target type is a primitive, the actual conversion will be to the equivalent wrapper type. In some cases, the TypeCoercer will need to search for an appropriate coercion, and may even combine existing coercions to form new ones; in those cases, the results of the search are cached.

  Type Parameters:
    `S` - source type (input)
    `T` - target type (output)
  Parameters:
    `input` -
    `targetType` - defines the target type
  Returns:
    the coerced value
  See Also:
    `TypeCoercer`

### toClass

    java.lang.Class toClass(java.lang.String className)

  Gets the Class instance for then give name.

  Parameters:
    `className` - fully qualified class name
  Returns:
    the class instance
  See Also:
    `ComponentClassCache`

### createComponentEventLink

    Link createComponentEventLink(ComponentResources resources,
                                  java.lang.String eventType,
                                  boolean forForm,
                                  java.lang.Object... context)

  Creates a link on behalf of a component.

  Parameters:
    `resources` - resources for the component
    `eventType` - type of event to create
    `forForm` - true if generating for a form submission
    `context` - additional event context associated with the link
  Returns:
    the link
  Since:
    5.1.0.0

### createPageRenderLink

    Link createPageRenderLink(java.lang.String pageName,
                              boolean override,
                              java.lang.Object... context)

  Creates a page render request link to render a specific page.

  Parameters:
    `pageName` - the logical name of the page to link to
    `override` - if true, the context is used even if empty (normally, the target page is allowed to passivate, providing a context, when the provided context is empty)
    `context` - the activation context for the page. If omitted, the activation context is obtained from the target page
  Returns:
    link for a render request to the targetted page
  Since:
    5.1.0.0

### createPageRenderLink

    Link createPageRenderLink(java.lang.Class pageClass,
                              boolean override,
                              java.lang.Object... context)

  Creates a page render request link to render a specific page. Using a page class, rather than a page name, is more refactoring safe (in the even the page is renamed or moved).

  Parameters:
    `pageClass` - identifies the page to link to
    `override` - if true, the context is used even if empty (normally, the target page is allowed to passivate, providing a context, when the provided context is empty)
    `context` - the activation context for the page. If omitted, the activation context is obtained from the target page
  Returns:
    link for a render request to the targetted page
  Since:
    5.1

### getEventLogger

    org.slf4j.Logger getEventLogger(org.slf4j.Logger componentLogger)

  Returns the event logger for the provided component logger. The event logger is based on the component logger's name (which matches the component class name) with a "tapestry..events." prefix.

  Parameters:
    `componentLogger` - provides base name for logger
  Returns:
    the logger

### createPerThreadValue

    <T> PerThreadValue<T> createPerThreadValue()

  Wrapper around `PerthreadManager.createValue()`.

  Since:
    5.2.0

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 The Apache Software Foundation.