Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8193283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:25:45+00:00 2026-06-07T04:25:45+00:00

WORKING: This is my working rich:listShuttle when sourceValue and target value are List of

  • 0

WORKING: This is my working rich:listShuttle when sourceValue and target value are List of strings.

1. JSF Page

<rich:listShuttle id="companyJurisdictionShutle"
            sourceValue="#{companyAdminAction.statesList}"
            targetValue="#{companyAdminAction.selectedStates}"
            var="item" orderControlsVisible="false" fastOrderControlsVisible="false"
            sourceCaptionLabel="Available"
            targetCaptionLabel="Selected" styleClass="lishShuttle">
                 <rich:column>
                     #{item}
                 </rich:column>
</rich:listShuttle>

2. Backing Bean

//sourceValue                    
public List<String> getStatesList() {

    for (DMPJurisdiction dmpJurisdiction: jurisdictionList) {
        if(!statesList.contains(dmpJurisdiction.getJurisName())) {
            statesList.add(dmpJurisdiction.getJurisName());
        }
    }
    return statesList;
}

//targetValue
public List<String> getSelectedStates() {
    return selectedStates;
}

3. Value Object

public class DMPJurisdiction implements Serializable {

    /** serial version UID **/
    private final static Long serialVersionUID = 109892748283726L;

    /** jurisdiction id **/
    private Long jurisId;

    /** name **/
    private String jurisName;

    /** description **/
    private String jurisDescription;

    /** code **/
    private String jurisCode;

    //Getters and Setters

} 

NOT-WORKING: I changed the list shuttle, so that sourceValue and targetValue are list of complex object (DMPJurisdiction), not list of Strings as before. For which I wrote a converter.

1. JSF Page

<rich:listShuttle id="companyJurisdictionShutle"
      sourceValue="#{companyAdminAction.jurisdictionList}"
      targetValue="#{companyAdminAction.targetJurisdictionList}"
      converter="#{dmpJurisdictionConverter}"
      var="item" orderControlsVisible="false" fastOrderControlsVisible="false"
      sourceCaptionLabel="Available"
      targetCaptionLabel="Selected" styleClass="lishShuttle">
             <rich:column>
                #{item.jurisName}
             </rich:column>
 </rich:listShuttle>

2. Backing Bean: Now return list of complex object DMPJurisdiction listed above.

//sourceValue
public List<DMPJurisdiction> getJurisdictionList() {
    return jurisdictionList;
}

//targetValue
    public List<DMPJurisdiction> getTargetJurisdictionList() {
    return targetJurisdictionList;
}

3. Converter

public class DmpJurisdictionConverter implements javax.faces.convert.Converter {

      public Object getAsObject(FacesContext facesContext, UIComponent uiComponent, String s) {
          List<DMPJurisdiction> dmpJurisdictionList = Cache.loadAllDmpJurisdictions();
            for (DMPJurisdiction dmpJurisdiction : dmpJurisdictionList) {
                if (dmpJurisdiction.getJurisName().equals(s)) {
                    return dmpJurisdiction;
                }
            }
            return null;
      }

      public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object o) {
          List<DMPJurisdiction> dmpJurisdictionList = Cache.loadAllDmpJurisdictions();
            for (DMPJurisdiction dmpJurisdiction : dmpJurisdictionList) {
                if (((DMPJurisdiction) o).getJurisName().equals(dmpJurisdiction.getJurisName())) {
                    return dmpJurisdiction.getJurisName();
                }
            }
            return null;
      }

}

4. Error: sourceId=accountWorkcaseOpenTabForm:addDmpCompanySubview:companyJurisdictionShutle[severity=(ERROR 2), summary=(javax.el.PropertyNotFoundException: /html/workcase/type/dmp/admin/AddCompany.xhtml @55,98 sourceValue="#{companyAdminAction.jurisdictionList}": Property 'jurisdictionList' not writable on type java.util.List), detail=(javax.el.PropertyNotFoundException: /html/workcase/type/dmp/admin/AddCompany.xhtml @55,98 sourceValue="#{companyAdminAction.jurisdictionList}": Property 'jurisdictionList' not writable on type java.util.List)] ||||

NOTE: Just a side note, I am using the same dmpJurisdictionConverter successfully for selectOneMenu as shown below in a different unrelated JSF page.

<h:selectOneMenu value="#{companyAdminAction.dmpJurisdiction}" converter="#{dmpJurisdictionConverter}">
                    <s:selectItems var="item" value="#{companyAdminAction.jurisdictionList}" label="#{item.jurisName}"
                                   hideNoSelectionLabel="true" noSelectionLabel="-- Select Jurisdiction --"/>
                    <a4j:support event="onchange" action="#{companyAdminAction.loadCompanyList()}"
                             reRender="dmpCompanies"/>
            </h:selectOneMenu>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T04:25:48+00:00Added an answer on June 7, 2026 at 4:25 am

    I was loading sourceValue=”#{companyAdminAction.statesList}” using its getter getStatesList. It should be loaded separately, coz getters and setters are called multiple times when page renders. I had to move loading statesList to another private method called during bean initialization.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given this datatable (naturally working): <rich:dataTable var=var value=#{values}> <rich:column> <f:facet name=header> HEADER </f:facet> <h:outputText
I am working on JSF and rich faces calendar. <rich:panel header=Richfaces Calendar style=width:600px> <rich:calendar
I am tired of working this out myself , i cannot understand the way
i am new in programming under linux and trying to get working this code:
I'm a LAMP guy and ended up working this small news module for an
I do not get the last version of node-http-proxy working (this used to work
Had this working; at one stage. The problem is the following text is now
I have this working great, but I'd like a deeper understanding of what is
I had this working in an old code that I didn’t end up using...
im working on this jquery data entry form in which i need a specific

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.