[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-1930) Improve documentation for @DataModelSelection and @DataModelSelectionIndex

Jacob Orshalick (JIRA) jira-events at lists.jboss.org
Sun Sep 16 20:37:11 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBSEAM-1930?page=all ]

Jacob Orshalick updated JBSEAM-1930:
------------------------------------

    Description: 
The existing documentation for @DataModelSelection and @DataModelSelectionIndex seems to indicate to developers that you are naming the @DataModelSelection or @DataModelSelectionIndex context variable by specifying the value. I have heard this same question from every new member of my team when they try to use 2 DataModels in one component.

The following patch (or something along these lines) is recommended for both @DataModelSelection and @DataModelSelectionIndex:

@DataModelSelection

Injects the selected value from the JSF DataModel (this is the element of the underlying collection, or the map value) that the DataModelSelection is associated with.  If only one @DataModel attribute is defined for a component, the selected value from that DataModel will be injected.  Otherwise, the component name of each @DataModel must be specified in the value attribute for each @DataModelSelection.

@DataModel(value="list1")
private List<String> list1;
	
@DataModelSelection(value="list1")
private String focusList1;

@DataModel(value="list2")
private List<String> list2;
	
@DataModelSelection(value="list2")
private String focusList2;

Specifies that the attribute focusList1 is to be injected with the DataModelSelection for the component list1, and similarly focusList2 is injected with the DataModelSelection for list2.  Note:  @DataModelSelection is like @In.  If you want to outject a DataModelSelection, you will have to do so explicitly through by annotating the attribute with @Out.

* value - name of the @DataModel conversation context variable this @DataModelSelection is associated with. Not needed if there is exactly one @DataModel in the component.

  was:
The existing documentation for @DataModelSelection and @DataModelSelectionIndex seems to indicate to developers that you are naming the @DataModelSelection or @DataModelSelectionIndex context variable by specifying the value. I have heard this same question from every new member of my team when they try to use 2 DataModels in one component.

The following patch (or something along these lines) is recommended for both @DataModelSelection and @DataModelSelectionIndex:

@DataModelSelection

Injects the selected value from the JSF DataModel (this is the element of the underlying collection, or the map value) that the DataModelSelection is associated with.  If only one @DataModel attribute is defined for a component, the selected value from that DataModel will be injected.  Otherwise, the component name of each @DataModel must be specified in the value attribute for each @DataModelSelection.

@DataModel(value="list1")
private List<String> list2;
	
@DataModelSelection(value="list1")
private String focusList1;

@DataModel(value="list2")
private List<String> list2;
	
@DataModelSelection(value="list2")
private String focusList2;

Specifies that the attribute focusList1 is to be injected with the DataModelSelection for the component list1, and similarly focusList2 is injected with the DataModelSelection for list2.  Note:  @DataModelSelection is like @In.  If you want to outject a DataModelSelection, you will have to do so explicitly through by annotating the attribute with @Out.

* value - name of the @DataModel conversation context variable this @DataModelSelection is associated with. Not needed if there is exactly one @DataModel in the component.


> Improve documentation for @DataModelSelection and @DataModelSelectionIndex
> --------------------------------------------------------------------------
>
>                 Key: JBSEAM-1930
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1930
>             Project: JBoss Seam
>          Issue Type: Feature Request
>    Affects Versions: 2.0.0.BETA1
>            Reporter: Jacob Orshalick
>
> The existing documentation for @DataModelSelection and @DataModelSelectionIndex seems to indicate to developers that you are naming the @DataModelSelection or @DataModelSelectionIndex context variable by specifying the value. I have heard this same question from every new member of my team when they try to use 2 DataModels in one component.
> The following patch (or something along these lines) is recommended for both @DataModelSelection and @DataModelSelectionIndex:
> @DataModelSelection
> Injects the selected value from the JSF DataModel (this is the element of the underlying collection, or the map value) that the DataModelSelection is associated with.  If only one @DataModel attribute is defined for a component, the selected value from that DataModel will be injected.  Otherwise, the component name of each @DataModel must be specified in the value attribute for each @DataModelSelection.
> @DataModel(value="list1")
> private List<String> list1;
> 	
> @DataModelSelection(value="list1")
> private String focusList1;
> @DataModel(value="list2")
> private List<String> list2;
> 	
> @DataModelSelection(value="list2")
> private String focusList2;
> Specifies that the attribute focusList1 is to be injected with the DataModelSelection for the component list1, and similarly focusList2 is injected with the DataModelSelection for list2.  Note:  @DataModelSelection is like @In.  If you want to outject a DataModelSelection, you will have to do so explicitly through by annotating the attribute with @Out.
> * value - name of the @DataModel conversation context variable this @DataModelSelection is associated with. Not needed if there is exactly one @DataModel in the component.

-- 
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