Hi.
I have a panel that loads different content depending on a context (i.e.
clicking on a tab moves it to another view, etc).
One of the views is an iframe which will have content populated by
Javascript.
I have something like this as a header contributor, which populates 'hello
world' into the iframe:
IModel variablesModel = new AbstractReadOnlyModel()
{
private static final long serialVersionUID =
-4744542904096678956L;
public Map getObject()
{
Map String, CharSequence variables = new HashMap String,
CharSequence ();
variables.put( originalContent, Hello world );
return variables;
}
};
add( TextTemplateHeaderContributor.forJavaScript(
TextReadPanel.class, IFrameLoader.js, variablesModel ) );
Two questions:
1) Is the header contributor added to the html (this is ajax so there is no
page refresh).
2) How to call the function in IFrameLoader.js (initializeIFrame()) AFTER
the iframe has rendered?
Perhaps the above is the wrong way to do the following:
1) User clicks on tab.
2) Panel is switched into text reading 'context'.
3) IFrame is rendered, innerHTML of iframe is populated through the
initializeIFrame() Javascript function (rendering originalContent).
Does this sound plausible in Wicket?
Many thanks, Graeme.
--
View this message in context:
http://www.nabble.com/Calling-Javascript-on-AJAX-load-of-panel.-tp20886721p20886721.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]