Bug 831657 - Seam2.3 Factory not called after @Outjecting null value with redirect
Seam2.3 Factory not called after @Outjecting null value with redirect
Status: CLOSED DEFERRED
Product: JBoss Enterprise WFK Platform 2
Classification: JBoss
Component: Seam (Show other bugs)
2.0.0.ER8
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Marek Novotny
Marek Schmidt
Seam2.3
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-13 10:21 EDT by Marek Schmidt
Modified: 2012-06-20 02:21 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-18 03:28:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marek Schmidt 2012-06-13 10:21:28 EDT
Description of problem:

The following scenario which works in Seam 2.2, doesn't work in jboss-seam-2.3.0.Beta2-redhat-1:

@Scope(ScopeType.SESSION)
@Name("bookingList")
class BookingListAction implements Serializable
{
  @DataModel
  private List<Booking> bookings

  @Factory
  public void getBookings() {
    // load bookings from the database
  }
}

@Name("hotelBooking")
public class HotelBookingAction
{
   @Out (required=false, scope=ScopeType.SESSION)
   List <Booking> bookings;
   
   @End
   public void confirm() {
      // ... persist a new booking

      // force refresh
      bookings = null;
   }
}

<page view-id="/confirm.xhtml"
          conversation-required="true">

        <description>Confirm booking: #{booking.description}</description>

        <navigation from-action="#{hotelBooking.confirm}">
            <redirect view-id="/main.xhtml"/>
        </navigation>

</page>

The getBookings factory is not called at all after the confirm action. It works correctly if I remove the redirect rule in pages.xml (by making the confirm action return "main".).


How to reproduce:

1. deploy the groovybooking seam example (Note that the scenario is reproducible even with no groovy in it)
2. login as gavin
3. book a hotel
4. notice that after the confirmation, the list of current bookings does not contain the latest booking.
Comment 1 Karel Piwko 2012-06-14 10:00:12 EDT
So, is navigation in pages.xml broken?
Comment 2 Marek Schmidt 2012-06-15 08:39:22 EDT
a workaround is to remove the redirect rule in pages.xml (e.g. by making the confirm action return "main".).
Comment 5 Marek Schmidt 2012-06-18 03:28:17 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
RN not required
Comment 7 Rebecca Newton 2012-06-20 02:21:12 EDT
Deleted Technical Notes Contents.

Old Contents:
RN not required

Note You need to log in before you can comment on or make changes to this bug.