JSF richfaces: update (rerender) element + close popup on click a4j:commandButton

Mary Ryllo

I have a a4j:commandButton in my popup. On click I want to hide my popup and rerender some component.

<a4j:commandButton type="button" styleClass="left" value="#{bean.value}"
                                     actionListener="#{bean.action}"
                                     render="updComponent"
                                     oncomplete="#{rich:component('popup')}.hide()"/>

In this case component is rerendered, but popup isn't hiding.

If I use rerender="updComponent" instead of render="updComponent", popup is hiding, but element isn't rerendered.

If I use instead of oncomplete="#{rich:component('popup')}.hide()" this:

<rich:componentControl target="deactivateIp" event="oncomplete" operation="hide"/>

popup isn't hiding, component isn't rerendering.

What I'm doing wrong and how to achieve what I want?

Mary Ryllo

I've used onbegin instead of oncomplete and it works for me. If I don't mistake, it's jsf bug: after render oncomplete event isn't firing.

<a4j:commandButton type="button" styleClass="left" value="#{bean.value}"
                                     actionListener="#{bean.action}"
                                     render="updComponent"
                                     onbegin="#{rich:component('popup')}.hide()"/>

Maybe not the best solution, but I haven't found out any other.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

JSF redirect via commandButton

From Dev

Hotkey enter on commandButton JSF and Richfaces

From Dev

richfaces 4 , Rerender attribute in a4j:commandButton and a4j:ajax is gone

From Dev

Specifying default a4j:commandButton when press Enter in JSF form

From Dev

Richfaces: show details in popup [commandbutton, action and popupPanel]

From Dev

JSF / RichFaces - How to call programatically an ActionEvent from HtmlAjaxSupport (a4j:support)

From Dev

RichFaces a4j:poll not working

From Dev

JSF Not a Valid Method Expression for Richfaces' a4j:ajax listener

From Dev

Difference between a4j:commandButton and h:commandButton with a4j:ajax in it

From Dev

a4j:htmlCommandLink in RichFaces 4

From Dev

What should I replace a4j:htmlCommandLink to in RichFaces 4.0?

From Dev

Why usage of any a4j element in jsf add to page code second body and head tags?

From Dev

hiding and showing commandButton in jsf

From Dev

WPF popup doesn`t close on click

From Dev

Close popup after button click

From Dev

Richfaces a4j:queue oncomplete doesn't work with Richfaces 4.2.x or 4.3.x

From Dev

Why doesn't Popup Kendo close when I click on Update?

From Dev

Using a4j , how would you rerender a dojo component?

From Dev

a4j:commandbutton with only icon and no text

From Dev

How to catch mouse click on RichFaces notifyMessage element?

From Dev

JSF / RichFaces - How to call programatically an ActionEvent from HtmlAjaxSupport (a4j:support)

From Dev

JSF/RichFaces 4 issue: initiating component while rendering is false

From Dev

How to clear form fields and rerender form with RichFaces

From Dev

JSF AJAX CommandButton and Table

From Dev

Difference between a4j:commandButton and h:commandButton with a4j:ajax in it

From Dev

How <a4j:commandButton> works on RichFaces 4

From Dev

a4j:commandButton doesn't render the element

From Dev

JSF RichFaces a4j parallel ajax calls

From Dev

JSF, a4j:support and rich:pickList, rerender

Related Related

  1. 1

    JSF redirect via commandButton

  2. 2

    Hotkey enter on commandButton JSF and Richfaces

  3. 3

    richfaces 4 , Rerender attribute in a4j:commandButton and a4j:ajax is gone

  4. 4

    Specifying default a4j:commandButton when press Enter in JSF form

  5. 5

    Richfaces: show details in popup [commandbutton, action and popupPanel]

  6. 6

    JSF / RichFaces - How to call programatically an ActionEvent from HtmlAjaxSupport (a4j:support)

  7. 7

    RichFaces a4j:poll not working

  8. 8

    JSF Not a Valid Method Expression for Richfaces' a4j:ajax listener

  9. 9

    Difference between a4j:commandButton and h:commandButton with a4j:ajax in it

  10. 10

    a4j:htmlCommandLink in RichFaces 4

  11. 11

    What should I replace a4j:htmlCommandLink to in RichFaces 4.0?

  12. 12

    Why usage of any a4j element in jsf add to page code second body and head tags?

  13. 13

    hiding and showing commandButton in jsf

  14. 14

    WPF popup doesn`t close on click

  15. 15

    Close popup after button click

  16. 16

    Richfaces a4j:queue oncomplete doesn't work with Richfaces 4.2.x or 4.3.x

  17. 17

    Why doesn't Popup Kendo close when I click on Update?

  18. 18

    Using a4j , how would you rerender a dojo component?

  19. 19

    a4j:commandbutton with only icon and no text

  20. 20

    How to catch mouse click on RichFaces notifyMessage element?

  21. 21

    JSF / RichFaces - How to call programatically an ActionEvent from HtmlAjaxSupport (a4j:support)

  22. 22

    JSF/RichFaces 4 issue: initiating component while rendering is false

  23. 23

    How to clear form fields and rerender form with RichFaces

  24. 24

    JSF AJAX CommandButton and Table

  25. 25

    Difference between a4j:commandButton and h:commandButton with a4j:ajax in it

  26. 26

    How <a4j:commandButton> works on RichFaces 4

  27. 27

    a4j:commandButton doesn't render the element

  28. 28

    JSF RichFaces a4j parallel ajax calls

  29. 29

    JSF, a4j:support and rich:pickList, rerender

HotTag

Archive