Package org.apache.juneau.console
Interface Handled<T>
- Type Parameters:
T- The builder type.
- All Known Implementing Classes:
CardSpec,DetailTab,PageSpec,RibbonItem,RowDetail,SwitcherDef.Section,SwitcherDef.View,TableSpec
public interface Handled<T>
Mixin for element builders that can carry a client object-model block: handler actions, lifecycle bindings and
handler subscriptions. Implementers supply
modelBlock() and self().
Example:
CardSpec.
- Since:
- 10.0.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault TAdds a click action calling a named handler.default TAdds a click action with a payload.default TAdds a fully specified action.Returns the element's model block.default TBinds a lifecycle event to a named handler.default Ton(String event, HandlerRef handler) Binds a lifecycle event.self()Returns this builder.default TSubscribes a named handler to a topic.default Tsubscribe(String topic, HandlerRef handler) Subscribes a handler to a topic.
-
Method Details
-
modelBlock
Returns the element's model block.- Returns:
- The block; never
null .
-
self
Returns this builder.- Returns:
- This object.
-
action
Adds a click action calling a named handler.- Parameters:
id- The action id.icon- The icon name.handler- The handler name.- Returns:
- This object.
-
action
Adds a click action with a payload.- Parameters:
id- The action id.icon- The icon name.handler- The handler name.payload- The payload.- Returns:
- This object.
-
action
Adds a fully specified action.- Parameters:
a- The action.- Returns:
- This object.
-
on
Binds a lifecycle event to a named handler.- Parameters:
event- The event.handler- The handler name.- Returns:
- This object.
-
on
Binds a lifecycle event.- Parameters:
event- The event.handler- The handler.- Returns:
- This object.
-
subscribe
Subscribes a named handler to a topic.- Parameters:
topic- The topic; may hold{rowKey},{tabId},{cardId}.handler- The handler name.- Returns:
- This object.
-
subscribe
Subscribes a handler to a topic.- Parameters:
topic- The topic.handler- The handler.- Returns:
- This object.
-