5 Replies Latest reply on Feb 12, 2006 11:46 PM by Andrew

    ifNotBegunOutcome and non-action page loading

    Andrew Apprentice

      Okay, I may be trying something unsupported, but I thought this was possible:

      I have a stateful session bean and it is the backing bean for registering a new user. I don't want the user to hit the register page directly, but instead click a register link from another page. Therefore, I want to redirect the user to the "welcome" page if the conversation has not yet begun. So I declared my session bean as:

      public class RegisterNewUserAction
       implements RegisterNewUser, Serializable

      When I go to the registerNewUser.jsf page, I get an error. Looking in the stack trace, it is because the register page is trying to access a variable that is out-jected by the above session bean. Some of the exception:
      Caused by: org.jboss.seam.RequiredException: Out attribute requires value for component: registerUser.editingUser
       at org.jboss.seam.Component.setOutjectedValue(Component.java:874)
       at org.jboss.seam.Component.outjectFields(Component.java:852)
       at org.jboss.seam.Component.outject(Component.java:701)

      I thought that as soon as any property is accessed of a conversational bean, the "ifNotBegunOutcome" should take over and force a navigation on my "welcome" outcome.

      Am I missing something? (Is this not possible?)

      Any advice on how to accomplish this would be appreciated. I will be wanting to do this with many pages (when the user hits a URL using a browser location -- not submitting a form -- in the middle of a conversation, they need to be redirected back to the first page of the conversation)