primefaces
primefaces copied to clipboard
Dialog Framework: Add dialogClose event
I would like to request a dialogClose event that can be set on the p:ajax of the commandButton/Link that opens a DialogFramework dialog. This event will fire if the user clicks the x at the top of the dialog. This will give the DialogFramework similar functionality as <p:ajax event="close"/>
within a p:dialog
I think the best solution would be to sponsor it or provide a perfect PR - i have no time for such features in my freetime ;)
~~@tandraschko This issue is a duplicate of #1001~~
Correction: that one is for p:dialog, but this one is for dialogFramework. so they are not duplicate.
Is this really a duplicate? #1001 reference the p:dialog. This is for a dialog opened using the dialog framework.
I just corrected it. :+1:
I'm the author of #1001 and this issue is a duplicate of mine. At end of my #1001 post I request the same thing for DialogFramework !
jxmai say: I just corrected it !
Well: but how can I use it in Primefaces 6.1.14 ?
Can somebody give us some lines of code ?
This is urgent because I have found a workaround to do the same thing ... but I hate workaround :-) If a well build solution exists, I prefer to use it.
@schlebe The feature has NOT yet been implemented. @jxmai just corrected his previous comment. ;-)
OK thanks for the information.
BUT, I have read the source and I think that this request is simple to implement !
Primefaces as already added 2 attributes/events that are onHide and onShow.
I think that where onHide is implemented, it is enough to add a new event that we can name onBeforeHiding() or onClosing !
The onHide event is called after DialogFramework has been closed or hidden.
The onBeforeHiding event must be called just before hidding dialog. If a user overwrite this event in his code, he must have the possiblity to indicate that the hidding process is aborted perhaps in returning false in Javascript or in changing a specific variable in event parameter passing to event function.
I can perhaps make a PullRequest :-)
But before making that, I need some information.
-
if you agree with my solution, what can be the name of the attribute and event ? onBeforeHidîng ? onClosing ? I ask that because for previous PullRequest, Primefaces dosen't have accepted my names. So now, I finalize analyze before developping !
-
Can somebody give me an example on event that abort execution of following code so that I can reuse it. Event onHide seem to have no event parameter so I cannot use it.
This issue is marked as stale because there was no activity on it for the last 2 years. Remove stale label or comment or this will be closed in 30 days