You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "chintan parekh (JIRA)" <de...@myfaces.apache.org> on 2006/12/22 12:25:21 UTC

[jira] Created: (TOMAHAWK-830) doesn't show preselected values

<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

        

[jira] Commented: (TOMAHAWK-830) doesn't show preselected values

Posted by "David Wainwright (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469131 ] 

David Wainwright commented on TOMAHAWK-830:
-------------------------------------------

I have exactly the same problem as Chintan. I can also verify the trick with disabled=true. 

It would be great if you guys could fix this soon.

Thanks in advance,
David.

OS = Linux
Eclipse 3.2.1
Sandbox 1.1.5 Snapshot.


> <s:selectManyPicklist> doesn't show preselected values
> ------------------------------------------------------
>
>                 Key: TOMAHAWK-830
>                 URL: https://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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOMAHAWK-830) doesn't show preselected values

Posted by "Cagatay Civici (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469765 ] 

Cagatay Civici commented on TOMAHAWK-830:
-----------------------------------------

I couldn't reproduce it. Are you sure the selection list is a subset of the availability list. I mean if operationsList is {A,B,C,D} then selectedOperationsList must be stuff like {A,B}, {C} and etc. Preselection list is rendered fine for me and no problems after the submit.

> <s:selectManyPicklist> doesn't show preselected values
> ------------------------------------------------------
>
>                 Key: TOMAHAWK-830
>                 URL: https://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
>         Assigned To: Cagatay Civici
>            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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOMAHAWK-830) doesn't show preselected values

Posted by "chintan parekh (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-830?page=comments#action_12461018 ] 
            
chintan parekh commented on TOMAHAWK-830:
-----------------------------------------

Hi,

There is an issue with <s:selectManyPicklist> component. 

If I make it disabled="true" while rendering. it will pickup the preselected values from left list and display in the right list.  But if it disbaled="false" then it won't.

Can you guys provide a patch for this?

Thanks
Chintan 

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

        

[jira] Commented: (TOMAHAWK-830) doesn't show preselected values

Posted by "Jeff Bischoff (JIRA)" <de...@myfaces.apache.org>.
    [ 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

        

[jira] Commented: (TOMAHAWK-830) doesn't show preselected values

Posted by "David Wainwright (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469206 ] 

David Wainwright commented on TOMAHAWK-830:
-------------------------------------------

Hallo Cagatay,

Thanks for getting on to this.

My assessment of the problem is the following (using Chintans's code from above):
                       
<s:selectManyPicklist size="10" style="width:175px;"
                       valueChangeListener="#{accessDelegationController.selectionChangedForOperations }"
                       value="#{accessDelegationController.selectedOperationsList}"
                       immediate="true">
                       <f:selectItems value="#{accessDelegationController.operationsList }" />
</s:selectManyPicklist>

Observation:
The first time that the picklist is rendered, both the value method #{accessDelegationController.selectedOperationsList} and the selectItems value method #{accessDelegationController.operationsList } are called. -> Up to the point where the form is submitted for the first time, the preselected values are actually working.

And now the problem:
After the form in which the picklist is located has been submitted, the value method #{accessDelegationController.selectedOperationsList}  is never called again whereas the selectItem value method is called after every submit. Thus the preselected values don't work after the first submit.

Hope this helps - I'm dying for a fix!
Cheers,
David.

> <s:selectManyPicklist> doesn't show preselected values
> ------------------------------------------------------
>
>                 Key: TOMAHAWK-830
>                 URL: https://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
>         Assigned To: Cagatay Civici
>            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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOMAHAWK-830) doesn't show preselected values

Posted by "chintan parekh (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-830?page=comments#action_12460950 ] 
            
chintan parekh commented on TOMAHAWK-830:
-----------------------------------------

Hi Jeff,

Yes you are right. My selected values are subset of values in SelectItems. 

Let me know if i am doing something wrong.

Thnx
Chintan

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

        

[jira] Commented: (TOMAHAWK-830) doesn't show preselected values

Posted by "David Wainwright (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469773 ] 

David Wainwright commented on TOMAHAWK-830:
-------------------------------------------

Hallo Catagay,

i've just been working on ths myself. I have found a solution to the problem, but am not sure if it is a bug or a feature. My problem was, that I was filling the (preselected) values in the picklist from a getter method. I didn't have and don't need a coresponding setter method in my backing bean (I handle the saving of selected values with event handlers). As soon as I have an empty setter method (just a declaration), everathing works perfectly. 

Cheers,
David.

> <s:selectManyPicklist> doesn't show preselected values
> ------------------------------------------------------
>
>                 Key: TOMAHAWK-830
>                 URL: https://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
>         Assigned To: Cagatay Civici
>            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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOMAHAWK-830) doesn't show preselected values

Posted by "Cagatay Civici (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469142 ] 

Cagatay Civici commented on TOMAHAWK-830:
-----------------------------------------

I'm taking this over.

> <s:selectManyPicklist> doesn't show preselected values
> ------------------------------------------------------
>
>                 Key: TOMAHAWK-830
>                 URL: https://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.
-
You can reply to this email to add a comment to the issue online.