|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wamblee.wicket.behavior.CompositeBehavior
org.wamblee.wicket.jquery.AbstractJQueryBehavior<ConfigType>
public class AbstractJQueryBehavior<ConfigType>
Abstract JQuery hehavior class that makes it easy to write jQuery behaviors:
isPageAllowed()
. By default, the behavior may be attached to
pages. Behaviors that should not be allowed to be attached to pages should
override this method.
The second parameter is obtained through a call to
getConfigurationJavascript()
.
Constructor Summary | |
---|---|
AbstractJQueryBehavior(java.lang.String aFunction,
org.apache.wicket.behavior.IBehavior... aBehaviors)
Constructs the behavior. |
Method Summary | |
---|---|
void |
bind(org.apache.wicket.Component aComponent)
|
protected java.lang.String |
getConfigurationJavascript()
Returns a javascript object that is passed as second argument to the ready function. |
protected ConfigType |
getConfigurationObject()
Gets the configuration object to use. |
protected flexjson.JSONSerializer |
getCustomSerializer()
Returns the serializer to use. |
protected boolean |
isPageAllowed()
Determines whether the behavior is allowed to be attached toa page. |
void |
renderHead(org.apache.wicket.markup.html.IHeaderResponse aResponse)
|
Methods inherited from class org.wamblee.wicket.behavior.CompositeBehavior |
---|
add, afterRender, beforeRender, detach, exception, getStatelessHint, isEnabled, isTemporary, onComponentTag |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractJQueryBehavior(java.lang.String aFunction, org.apache.wicket.behavior.IBehavior... aBehaviors)
aFunction
- Function to be invoked from the ready handler. This function
is invoked with a CSS selector that identifies the component.aBehaviors
- Behaviors to add in addition to the basic JQuery stuff.Method Detail |
---|
protected boolean isPageAllowed()
public void bind(org.apache.wicket.Component aComponent)
bind
in interface org.apache.wicket.behavior.IBehavior
bind
in class CompositeBehavior
public void renderHead(org.apache.wicket.markup.html.IHeaderResponse aResponse)
renderHead
in interface org.apache.wicket.markup.html.IHeaderContributor
renderHead
in class CompositeBehavior
protected java.lang.String getConfigurationJavascript()
getConfigurationObject()
to
obtain the configuration object to use which is then serialized to
javascript using JSONSerializer
. Subclasses can override the
default JSONSerializer by implementing getCustomSerializer()
.
Subclasses should override this method to perform custom serialization.
protected flexjson.JSONSerializer getCustomSerializer()
protected ConfigType getConfigurationObject()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |