AnsweredAssumed Answered

Dialog Framework and Pop up JSF Action

Question asked by gonenc on Sep 26, 2006
Hello,

What I want to do is simply put a Button or Link which will pop-up a new page and execute a JSF action. The JSF action will write to outputstream a content (that is not in the repository)

what I usually do in this case is a simple trick like;

<h:commandButton onclick="document.forms['dialog'].target='_blank'"
onblur="document.forms['dialog'].target='_self'" action="#{SomeDialogManagedBean.renderMyFile}" />

this pops up a new page and calls the renderMyFile. But in Alfresco Dialogs there is a javascript function called after my onclick script clear_dialog(); this resets the target attribute so it does not pop-up.

What can i do? I tried changing my script to

onclick="document.forms['dialog'].target='_blank'; document.forms['dialog'].submit"

this does pop-up but this has some undesired side effects, fields are not submitted and the form is reset.

I would appreciate any suggestions

Gonenc Ercan

Outcomes