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 8424423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:59:08+00:00 2026-06-10T03:59:08+00:00

Possible Duplicate: Smartgwt selectitem key value issue I’m using setEditorCustomizer to set custom editors

  • 0

Possible Duplicate:
Smartgwt selectitem key value issue

I’m using setEditorCustomizer to set custom editors for some fields in a ListGrid, my specific problem is on a SelectItem

Something like this:

grid.setEditorCustomizer(new ListGridEditorCustomizer() {
    public FormItem getEditor(ListGridEditorContext context) {
         SelectItem selectItem = new SelectItem();
         LinkedHashMap<String, String> valuesMap = new LinkedHashMap<String, String>();
         valuesMap.put("0","some text");
         valuesMap.put("1","other text");
         selectItem.setValueMap(valuesMap);
    }
}

Note that I’m not creating select items for every row.

Everything works great when editing the row, I see “some text” and “other text” in the dropdown but when I’m not editing the value I see the corresponding key instead of the value.

I have searched the javadoc but couldn’t find anything, if anything is not explicit please ask and I will add.

  • 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-10T03:59:09+00:00Added an answer on June 10, 2026 at 3:59 am

    Ended up finding a solution with a DataSource and setting it in the optionDataSource of the SelectItem and setting displayField and valueField to the respective fields.

    And then for when the field is not being edited, in the ListGridField I set a custom CellFormatter that returned the proper data (this involves returning proper data for the other values too).

    I’m pretty sure there may be a simpler way, but this way it works for me so I will leave it like that for now.

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

Sidebar

Related Questions

Possible Duplicate: SmartGWT Dialog title not set correctly I have a problem, is that
Possible Duplicate: Why do I see a double variable initialized to some value like
Possible Duplicate: How do I make a request using HTTP basic authentication with PHP
Possible Duplicate: array_splice() for associative arrays How to add an array value to the
Possible Duplicate: how to delete a file? My application first reads the fields in
Possible Duplicate: Difference of create Index by using include column or not using Edit:
Possible Duplicate: How an uninitialised variable gets a garbage value? So when an undefined
Possible Duplicate: Xcode - iPhone - profile doesn’t match any valid certificate-/private-key pair in
Possible Duplicate: How do you send email from a Java app using Gmail? How
Possible Duplicate: What does Asynchronous means in Ajax? jQuery ajax return value Trying to

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.