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

  • SEARCH
  • Home
  • 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 8599635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:26:22+00:00 2026-06-12T01:26:22+00:00

I’m trying to list a table inside a SelectItem component. I use for this

  • 0

I’m trying to list a table inside a SelectItem component. I use for this purpose ListGrid component. Here is the code:

    final ListGrid brandGrid = new ListGrid();

    ListGridField nameField = new ListGridField("name");
    ListGridField descriptionField = new ListGridField("description");
    ListGridField detailField = new ListGridField("detail");

    final SelectItem filterList = new SelectItem();
    filterList.setDisplayField("name");
    filterList.setValueField("description");
    filterList.setPickListWidth(400);


    filterList.setOptionDataSource(myDataSource);
    filterList.setPickListFields(nameField, descriptionField);
    filterList.setPickListProperties(brandGrid);
    filterList.setDefaultValue(record.getAttributeAsString("name"));
    filterList.setShowTitle(false);
    filterList.setStartRow(false);

And the DataSource code for myDataSource instance (I call this method to initialize class attribute DataSource myDataSource before I use SelectItem filterList):

private DataSource getBrandData(List<BrandDB> result){
        DataSource ds = new DataSource();

        DataSourceTextField id = new DataSourceTextField();
        id.setName("idBrand");
        id.setPrimaryKey(true);

        DataSourceTextField name = new DataSourceTextField();
        name.setName("name");

        DataSourceTextField description = new DataSourceTextField();
        description.setName("description");

        ds.setFields(id, nazov, popis);

        ds.setClientOnly(true);
        for(int i = 0; i < result.size(); i++){
            Record rc = new Record();
            rc.setAttribute("idBrand", result.get(i).getIdBrand()+"");
            rc.setAttribute("name", result.get(i).getName());
            rc.setAttribute("description", result.get(i).getDescription());
            ds.addData(rc);
        }
        return ds;
    }

The problem is that value description in my datasource has in several places the same value (the id and name for these values is different). And I obtain following error:

TMR0:WARN:fetchMissingValues:isc_SelectItem_1:Deriving valueMap for 'description' from dataSource based on displayField 'name'. This dataSource contains more than one record with description set to Not defined with differing name values. Derived valueMap is therefore unpredictable.

Any ideas how to set the SelectItem to accept these duplicate values? Thank you very much for your answers. 🙂

  • 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-12T01:26:23+00:00Added an answer on June 12, 2026 at 1:26 am

    Problem solved:

    error is located in this line of code:

    filterList.setValueField("description");
    

    Description is not unique and because of this fact it cannot be value field inside the SelectItem component. It’s necessary to edit only this line of code as follows:

    filterList.setValueField("idBrand");
    

    idBrand is unique because it’s defined as primary key in DataSource so SelectItem has uniquely identified its value fields and can make filters.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text

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.