Bug 831657 - Seam2.3 Factory not called after @Outjecting null value with redirect
Summary: Seam2.3 Factory not called after @Outjecting null value with redirect
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: JBoss Enterprise WFK Platform 2
Classification: Retired
Component: Seam
Version: 2.0.0.ER8
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Marek Novotny
QA Contact: Marek Schmidt
URL:
Whiteboard: Seam2.3
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-13 14:21 UTC by Marek Schmidt
Modified: 2012-06-20 06:21 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-18 07:28:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBSEAM-4966 0 None None None Never

Description Marek Schmidt 2012-06-13 14:21:28 UTC
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 14:00:12 UTC
So, is navigation in pages.xml broken?

Comment 2 Marek Schmidt 2012-06-15 12:39:22 UTC
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 07:28:17 UTC
    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 06:21:12 UTC
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.