-
1. Richfaces.hideModalPanel in RichFaces4
ilya_shaikovsky Apr 6, 2011 6:24 AM (in response to pechnik)according to
rich:component should be used in that case. So let's explore wh it's not working..
1) Any JS errors?
2) is it invoked in general? (try with simple alert)
-
2. Richfaces.hideModalPanel in RichFaces4
iabughosh Apr 6, 2011 7:42 AM (in response to pechnik)Hi Pechmik,
i think you should add return false :
#{rich:component('panelPopup')}.show(); return false;
Regards,
-
3. Re: Richfaces.hideModalPanel in RichFaces4
pechnik Apr 6, 2011 12:17 PM (in response to ilya_shaikovsky)Simple alert works fine. But alert(data) doesn`t works.
Also
<rich:componentControl target="show_notification_add_trader" operation="show" event="complete" />
inside a4j:commandButton doesn`t fires.
-
4. Re: Richfaces.hideModalPanel in RichFaces4
ilya_shaikovsky Apr 7, 2011 8:20 AM (in response to pechnik)thanks! could confirm that.. works only for standard events.
https://issues.jboss.org/browse/RF-10858 with workaround created.
-
5. Re: Richfaces.hideModalPanel in RichFaces4
true_mykola Apr 6, 2012 8:54 AM (in response to ilya_shaikovsky)Can you tell me how to open/close modal panels when they have complex ids? In richfaces 3.3.3 i could call this code on a4j:commandButton:
oncomplete="enableModalPanelBtns(this); if (#{usession.noErrorResponse}) Richfaces.hideModalPanel('#{subviewId == null ? 'articlesView' : subviewId}:articleModalPanel')"
In RF 4.2 I get an error saying: "Richfaces is not defined". As you see my panel id is quite complex so i can't place this id in standard call #{rich:component('id')}.show()/hide() which works correctly in other simple cases. What shall i do?
-
6. Re: Richfaces.hideModalPanel in RichFaces4
dlee606 Aug 14, 2013 12:31 AM (in response to iabughosh)If any pure javascript command like "RichFaces.hidePopupPanel('xxxPanel')" in RF4?
Because we been able to use that in pure JavaScript files, but for now it will say "RichFaces.hidePopupPanel is not a function"
Thanks
-
7. Re: Richfaces.hideModalPanel in RichFaces4
lfryc Aug 19, 2013 6:23 AM (in response to dlee606)Hey David,
consider to consult the Component Reference documentation:
-
8. Re: Richfaces.hideModalPanel in RichFaces4
dlee606 Aug 20, 2013 4:43 AM (in response to lfryc)Thanks for reply,
but for following description:
9.4.7. JavaScript API The component can be controlled through the JavaScript API. The JavaScript API provides the following functions: getTop() Return the top co-ordinate for the position of the pop-up panel. getLeft() Return the left co-ordinate for the position of the pop-up panel. moveTo(top,left) Move the pop-up panel to the co-ordinates specified with the top and left parameters. resize(width,height) Resize the pop-up panel to the size specified with the width and height parameters. show() Show the pop-up panel. hide() Hide the pop-up panel.
-- Seems I still need to use the #{rich:component('panelPopup')} to get the component?
If that I cannot put into a pure javaScript file
-
9. Re: Richfaces.hideModalPanel in RichFaces4
lfryc Aug 20, 2013 9:38 AM (in response to dlee606)Let's put the output of script generated from #{rich:component('panelPopup')} to the external script.
You will need to have stable client ID - I would consider to find the panelPopup via CSS selectors (jQuery Selectors), e.g.: jQuery(".rf-pp) and then retrieve its clientId: jQuery(.rf-pp).attr('id'),
and then pass it to the result of #{rich:component('clientId')} [1]
RichFaces.$(jQuery(.rf-pp).attr('id'))