Chintan, you should send this kind of messages to the users list of myfaces,
never to the developers itself if you want to have a fast answer ;-) Now I
am on holidays and I cannot help you on this, but it seems this may be a
bug. Feel free to take a look at the SelectManyListRenderer class on the
sandbox sources to see if you can debug/fix the problem and submit a patch
with the possible solution in the JIRA tracker. If you don“t feel in the
mood to do that, just open a JIRA ticket with the bug,

Thanks,

Bruno

On 22/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Hi Bruno,

I 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
Bruno Aranda wrote:
>
> What type are you passing to the value attribute of the
> selectManyPicklist? It works the same ay as the other
> selectManyComponents. You have to pass an array with the items you
> want to be preselected to the value attribute...
> Can you show some of your code?
>
> Regards,
>
> Bruno
>
> 2006/1/2, Alin Dosoniu <[EMAIL PROTECTED]>:
>>
>> Hello,
>>
>> I want to use selectManyPicklist component for editing a list of values
>> that
>> were selected on a previous access of the page. I don't know how I can
>> have
>> some elements in selected option. I tried to use the "value" attribute
of
>> selectManyPicklist but I get this error:
>>
>> Caused by: org.apache.jasper.JasperException: Value is no
>> String and component body:fn:invTypeswith path: {Component-Path :
[Class:
>> javax.faces.component.UIViewRoot,ViewId:
>> /app/programmings_new.jsp][Class:
>> javax.faces.component.html.HtmlPanelGrid,Id:
>> _idJsp13][Class:
>> javax.faces.component.UINamingContainer,Id: body][Class:
>> javax.faces.component.html.HtmlPanelGroup,Id:
>> _idJsp19][Class: javax.faces.component.html.HtmlForm,Id:
>> fn][Class: javax.faces.component.html.HtmlPanelGrid,Id:
>> _idJsp20][Class:
>> javax.faces.component.html.HtmlPanelGroup,Id:
>> _idJsp33][Class:
>> org.apache.myfaces.custom.picklist.HtmlSelectManyPicklist,Id:
>> invTypes]} does not have a Converter
>>  at
>> org.apache.jasper.servlet.JspServletWrapper.service(
JspServletWrapper.java:370)
>>  at
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java
:314)
>>  at
>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
>>  at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>  at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)
>>  at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
>>
>> I used the selectManyPicklist component to successfully select some
items
>> from available list when made the save of the object. But now I want to
>> edit
>> the object.
>>
>> Thank you,
>> Alin.
>>
>>
>
>
Quoted from:
http://www.nabble.com/selectManyPicklist-for-edit-tf836354.html#a2171027


Reply via email to