myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Bischoff (JIRA)" <...@myfaces.apache.org>
Subject [jira] Commented: (TOMAHAWK-830) <s:selectManyPicklist> doesn't show preselected values
Date Fri, 22 Dec 2006 14:26:53 GMT
    [ http://issues.apache.org/jira/browse/TOMAHAWK-830?page=comments#action_12460493 ] 
            
Jeff Bischoff commented on TOMAHAWK-830:
----------------------------------------

Chintan,

When using selectManyPicklist, the selectItems needs to contain *ALL* the possible selections.
Then selected items should be a subset of this list. The unselected items list will be automatically
generated by the component with the remainder.

Can you please verify that all your selected values are also in the selectItems?

> <s:selectManyPicklist> doesn't show preselected values
> ------------------------------------------------------
>
>                 Key: TOMAHAWK-830
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-830
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: New Component
>    Affects Versions: 1.1.5-SNAPSHOT
>         Environment: Os: Windows XP Browser: IE,Firefox
>            Reporter: chintan parekh
>            Priority: Blocker
>
>  am facing one issues with selectManyPickList. I am putting my code here. 
> JSP code:
> <t:panelGroup>
>                <t:panelGrid columns="3">
>                        <t:outputLabel value="ABC"/>
>                        <t:outputLabel value=":"/> 
>                        <%-- Sandbox component --%>
>                        <s:selectManyPicklist size="10" style="width:175px;"
>                        valueChangeListener="#{accessDelegationController.selectionChangedForOperations
}"
>                        value="#{accessDelegationController.selectedOperationsList}"
>                        immediate="true">
>                        <f:selectItems value="#{accessDelegationController.operationsList
}" />
>                        </s:selectManyPicklist>
>                </t:panelGrid>
>        </t:panelGroup>
> Java Code:
> Creating 2 Lists. one for SelectedValues and other for default values. 
> private List selectedOperationsList = new ArrayList();
> private List operationsList = new ArrayList();
> //here both lists have getter and setter method(which i have not mentioned here)
> //logic to add values in above lists. (Note: I am iterating the values which i am getting
from backend. and adding to selectedOperationList list) 
> List OperationList1 = (List)Service1.getCreatedOperationRulesList();
>            //Iterator for selected operation
>           Iterator iter = OperationList1.iterator();
>            int i = 0;
>            while( iter.hasNext()){
>                Operation operation = (Operation)OperationList1.get(i);
>                selectedOperationsList.add(new SelectItem(Integer.toString(operation.getId()),operation.getName()));
>                i++; 
>                iter.next();
>            }
> //same for default operation lists
>                        List operationList2=(List)Service2.getOperationsList();
>                        Iterator iter1 = operationList2.iterator ();
>                        int j = 0;
>                while(iter1.hasNext()){
>                                Operation operation1 = (Operation)operationList2.get(j);
>                                operationsList.add (new SelectItem(Integer.toString(operation1.getId()),operation1.getName()));
>                                j++;
>                                iter1.next();
>                }
> While rendering only left-hand side value comes.( i mean operationsList). Right-hand
side box(selecteOperationsList) contains no values. though both the lists are having values
in it. 
> I dont know what is the problem? can you please help me?
> Thanks
> Chintan

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

        

Mime
View raw message