Interface IJQueryWidget
-
- All Known Subinterfaces:
IJQueryCultureWidget
- All Known Implementing Classes:
JQueryContainer,JQueryGenericContainer,JQueryGenericPanel,JQueryPanel
public interface IJQueryWidgetSpecifies that the implementingComponentclass will use aJQueryBehavior
This interface is for best practice purpose only. Adding theJQueryBehaviorto theComponentis still required but the use ofJQueryWidget#newWidgetBehavior(Component)can be made.
For instance:
public JQueryBehavior newWidgetBehavior(String selector) { return new JQueryBehavior(selector, "jquerymethod"); } protected void onInitialize() { super.onInitialize(); this.add(JQueryWidget.newWidgetBehavior(this)); }- Author:
- Sebastien Briquet - sebfz1
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classIJQueryWidget.JQueryWidgetstatic class
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JQueryBehaviornewWidgetBehavior(String selector)Gets a newJQueryBehaviorthat should be bound to theIJQueryWidgetobject.voidonBeforeRender(JQueryBehavior behavior)Called when theIJQueryWidgetis about to be rendered.voidonConfigure(JQueryBehavior behavior)Called immediately after the onConfigure method in a behavior.
-
-
-
Method Detail
-
onBeforeRender
void onBeforeRender(JQueryBehavior behavior)
Called when theIJQueryWidgetis about to be rendered.- Parameters:
behavior- theJQueryBehavior
-
onConfigure
void onConfigure(JQueryBehavior behavior)
Called immediately after the onConfigure method in a behavior. Since this is before the rendering
cycle has begun, the behavior can modify the configuration of the component (i.e.Options)- Parameters:
behavior- theJQueryBehavior
-
newWidgetBehavior
JQueryBehavior newWidgetBehavior(String selector)
Gets a newJQueryBehaviorthat should be bound to theIJQueryWidgetobject.- Parameters:
selector- the html selector (ie: '#myId')- Returns:
- the
JQueryBehavior
-
-