[richfaces-issues] [JBoss JIRA] (RF-12619) @ViewScoped (SeamFaces) beans lost with a4j:command* and dynamic form

Fab Mars (JIRA) jira-events at lists.jboss.org
Mon Nov 26 04:53:21 EST 2012


     [ https://issues.jboss.org/browse/RF-12619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fab Mars updated RF-12619:
--------------------------

    Attachment: TestViewScope.zip


use that example to reproduce the issue
                
> @ViewScoped (SeamFaces) beans lost with a4j:command* and dynamic form
> ---------------------------------------------------------------------
>
>                 Key: RF-12619
>                 URL: https://issues.jboss.org/browse/RF-12619
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-a4j-core
>    Affects Versions: 4.3.0.M2
>         Environment: Windows, JDK 1.7.0_09, Glassfish 3.1.2.2 with Mojarra 2.1.14 (at least >= 2.1.8), RF 4.3.0 M2 (also on RF 4.2.x), Weld 1.1.8 and SeamFaces 3.1.0.
>            Reporter: Fab Mars
>              Labels: a4j:commandbutton, cdi, facelets, seamfaces, viewscoped
>         Attachments: TestViewScope.zip
>
>
> Here is a weird case I found after updating a project of mine from JSF 1.2 & RF 3.x to JSF 2.1 and RF 4.2.3/4.3.0M2. See attached project.
> On a part of the page which is into a Facelets insert, I can click on a <a4j:commandButton/> to trigger the creation of some entity instance and dynamically display another form associated to that entity in another part of the page. So, there are 2 forms on the screen, one for the creation button, another one to edit the entity, both are always displayed but the content of the latter isn't rendered until the entity exists. The page actions are held by some backing bean which also contains the form.
> From the second form, I can submit the entity once updated. The buttons are <h:commandButton/> this time and the action returns null so I can stay on the same view and keep on working.
> Back with RF 3.x, I used the keepAlive tag to maintain the page's backing bean along the page life. All worked fine. After JSF 2.1 and RF 4 and CDI were released, I intended on using @ViewScoped instead. Naturally I had to add SeamFaces so my @ViewScoped beans were actually CDI-managed, and I updated my whole codebase.
> Well, now, when the creation button is used, the form dynamically displays all right BUT when I try to submit the second form, my @ViewScoped bean vanishes (pbly the viewMap vanishes entirely).
> However, if I use <h:commandButton><f:ajax/></h:commandButton> instead, everything works fine. hich leads me to believe there is a bug/regression from RF3.3 on a4j:command* components (maybe a4j:ajax/a4j:poll, didn't check).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the richfaces-issues mailing list