[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-2668) @In(value="selectedCountry",create=true) private Country editedCountry;

Bernard Labno (JIRA) jira-events at lists.jboss.org
Mon Feb 25 05:29:45 EST 2008


    [ http://jira.jboss.com/jira/browse/JBSEAM-2668?page=comments#action_12400448 ] 
            
Bernard Labno commented on JBSEAM-2668:
---------------------------------------

This is how it was coded, but definitely not how it should be. It should be possible to :
- have member with name different than component's name, 
- await for context variable with name different than component's name (to inject if it exists)
- if no context variable is present, then create component.

Forum link :
http://www.seamframework.org/Community/InvalueselectedCountrycreatetruePrivateCountryEditedCountry

I've posted example there.

> @In(value="selectedCountry",create=true) private Country editedCountry;
> -----------------------------------------------------------------------
>
>                 Key: JBSEAM-2668
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2668
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.1.CR1
>         Environment: linux
>            Reporter: Bernard Labno
>
> @In(value="selectedCountry",create=true) private Country editedCountry;
> When bean is invoked, then "editedCountry" is null !
> Of course there is no "selectedCountry" in any context.
> This happens only if "value" is set to something different than "editedCountry" (so the name of property).
> Following for example works :
> @In(value="editedCountry",create=true) private Country editedCountry;

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list