this is what i did when i want to open a dialogue
<script type="text/javascript">
<% if (((String)properties.get(configuration.getInherited("connectedWhen", "username"), "")).trim().equals("")) { %>
CQ.WCM.onEditableReady("<%= resource.getPath() %>", function(editable){
CQ.wcm.EditBase.showDialog(editable);
}, this);
<% } %>
</script>
or if you want a cleaner code try this:
CQ.WCM.onEditableReady("<%= resource.getPath() %>", function(editable){
CQ.wcm.EditBase.showDialog(editable);
}, this);
Hope this helps .. :)
source
share