[seam-issues] [JBoss JIRA] (JBSEAM-5122) @Factory return value lost

Marek Novotny (JIRA) jira-events at lists.jboss.org
Tue Jul 30 07:37:26 EDT 2013


    [ https://issues.jboss.org/browse/JBSEAM-5122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12793783#comment-12793783 ] 

Marek Novotny commented on JBSEAM-5122:
---------------------------------------

Could you provide a test app? I don't know what changes your booking application has got.
                
> @Factory return value lost
> --------------------------
>
>                 Key: JBSEAM-5122
>                 URL: https://issues.jboss.org/browse/JBSEAM-5122
>             Project: Seam 2
>          Issue Type: Bug
>            Reporter: superanna li
>
> Dear team, 
> In the booking search page, click 'search' button, reRender the bookingList in the same page, once click one of the booking for the detail information, the currentUser will changed(the currentUser become the newly created user with no value). it seems "currentUser" context value has been changed. 
> CurrentUserFactory where @Factory is used
> {code}
> @Name(CurrentUserFactory.FACTORY_COMPONENT_NAME)
> @Scope(ScopeType.CONVERSATION)
> public class CurrentUserFactory extends UserHome {
>     private static final long serialVersionUID = 1L;
>     public static final String COMPONENT_NAME = "currentUser";
>     @In(value = ID_COMPONENT_NAME, scope = ScopeType.SESSION, required = false)
>     @Out(value = ID_COMPONENT_NAME, scope = ScopeType.SESSION, required = false)
>     private Integer id;
> 	@Factory(value = COMPONENT_NAME, scope = ScopeType.CONVERSATION, autoCreate = true)
>     public User getUser() {
> 	return getInstance();
>     }
> ...
> }
> {code}
> SearchAction:
> {code}
> @Name(MyProjectsSearchAction.COMPONENT_NAME)
> @Scope(ScopeType.CONVERSATION)
> @Restrict("#{identity.loggedIn}")
> public class MyProjectsSearchAction implements Serializable {
>     private static final long serialVersionUID = 1L;
>     public static final String COMPONENT_NAME = "myProjectsSearch";
>   
>     @In(value = "currentUser", required = true)
>     private User currentUser;
>    public void find() {
>     ....
>    }
> }
> {code}
> DetailAction: 
> {code}
> @Name(MyProjectsDetailsAction.COMPONENT_NAME)
> @Scope(ScopeType.CONVERSATION)
> @Restrict("#{identity.loggedIn}")
> public class MyProjectsDetailsAction implements Serializable {
> 	private static final long serialVersionUID = 1153512259556496433L;
> 	public static final String COMPONENT_NAME = "myProjectsDetails";
>          @Begin(join = true)
>     public void showDetails() {
>   ...
>      }
> {code}
> Best regards, 
> Anna 

--
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 seam-issues mailing list