|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.protocol.http.AjaxEnclosureListener
public class AjaxEnclosureListener
This listener adds Enclosures to AjaxTarget, where the child controller of the said Enclosure is already added. This is a part of the fix to the problem: "Changing the visibility of a child component in Ajax callback method will not affect the entire enclosure but just the child component itself. This is because only the child component is added to the AjaxRequestTarget" When used with an "Inline" Enclosure, this problem is fixed. Syntax for inline enclosure:
WebApplication
,
InlineEnclosure
,
InlineEnclosureHandler
Constructor Summary | |
---|---|
AjaxEnclosureListener()
Construct. |
Method Summary | |
---|---|
void |
onAfterRespond(Map<String,Component> map,
AjaxRequestTarget.IJavaScriptResponse response)
Triggered after ajax request target is done with its response cycle. |
void |
onBeforeRespond(Map<String,Component> map,
AjaxRequestTarget target)
Try to find Enclosures that have their controllers added already, and add them to the target. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AjaxEnclosureListener()
Method Detail |
---|
public void onBeforeRespond(Map<String,Component> map, AjaxRequestTarget target)
onBeforeRespond
in interface AjaxRequestTarget.IListener
map
- modifiable map (markupId -> component) of components already added to the targettarget
- the target itself. Could be used to add components or to append/prepend
javascriptpublic void onAfterRespond(Map<String,Component> map, AjaxRequestTarget.IJavaScriptResponse response)
AjaxRequestTarget.IListener
AjaxRequestTarget.IJavaScriptResponse
object
NOTE: During this stage of processing any calls to target that manipulate the response
(adding components, javascript) will have no effect
onAfterRespond
in interface AjaxRequestTarget.IListener
map
- read-only map:markupId->component of components already added to the targetresponse
- response object that can be used to output javascript
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |