Hello,
Is there some trick to use in order to create a custom dialog? Here:
http://documentation.magnolia-cms.com/cookbook/creating-a-custom-dialog.html it
is said that "Every dialog can have a *class* property which defines class
to instantiate."
I have created a class like this:
public class WSTDownloadLinkListDialog extends ConfiguredDialog{
public WSTDownloadLinkListDialog(String name, HttpServletRequest
request, HttpServletResponse response, Content configNode) {
super(name, request, response, configNode);
}
protected Dialog createDialog(Content configNode, Content
storageNode) throws RepositoryException {
Dialog dialog = super.createDialog(configNode, storageNode);
dialog.setJavascriptSources(request.getContextPath() +
"/.resources/mgnl-resources/worldsteelmodule/javascript/wstDialogs.js");
//$NON-NLS-1$
dialog.addTab("MyTag");
return dialog;
}
protected Dialog getDialog() {
Dialog dialog = super.getDialog();
return dialog;
}
/**
* do not reload the tree
*/
public void renderHtml(String view) throws IOException {
PrintWriter out = response.getWriter();
//after saving
if (view == VIEW_CLOSE_WINDOW) {
// .. do some thing special (perhaps make an alert)
}
// show the created dialog
else {
super.renderHtml(view);
}
}
}
The Javascript is not inserted into my dialog window. If I use this class
for adminInterface/dialogs/useredit (so I replace
info.magnolia.module.admininterface.dialogs.UserEditDialog with my class), I
can see that my javascript is inserted into the dialog window...
Is there something else I should do?
The dialog I'm trying to create is placed into a custom module. Maybe I
should specify some configuration in that module?
Thanks a lot in advance,
Ana Osman
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------