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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:39:43+00:00 2026-06-10T12:39:43+00:00

Little problem with DropDownChoice. I build a DropDownChoice with a list of Object. Take

  • 0

Little problem with DropDownChoice.
I build a DropDownChoice with a list of Object.
Take for example:

public MyClass 
  private String code;
  private String description;
[...]

than take another Object

public FormModelObject
   private String code;

I can easly build the DropDownChoice selecting what show (description property) and what obtain (code property) using ChoiceRender.

Unfortunally the DropDownChoice return the entire Object (MyClass) and I cannot set the property Code inside FormModelObject (it simply launch a toString() method on MyClass).

How can I obtain it without using Ajax?

Thanks

  • 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-10T12:39:44+00:00Added an answer on June 10, 2026 at 12:39 pm

    Well, you could override method onModelChanged() of DropDownChoice and update residenceZipCode with the new value. Something like :

    DropDownChoice<City> drop = new DropDownChoice<City>("residenceZipCode",new Model(), cityList,new ChoiceRenderer<City>("name", "zipcode")){
         onModelChanged(){
           String newZipCode =  (String)PropertyResolver.getValue("zipCode",getModelObject());
           PropertyResolver.setValue("residenceZipCode", res, newZipCode, new  PropertyResolverConverter());
         }
    
    };
    

    DropDownChoice must have its own model.

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

Sidebar

Related Questions

Im having a little problem with classes. In code: class A { public: int
I have a little problem. This is my code: stackPanelShapesContainer = new StackPanel(); InitializeStackPanle();
i have a little problem with my java socket code. I'm writing an android
Im having a little problem with classes. Here is some of my code: //GameMap.h
I have a little problem in object programming in javascript There is a class
I have a little problem with following VHDL code: process (zbroji) begin if rising_edge(zbroji)
I have a small little problem. I am have a drop down list that
I have a little problem with converting a char string array to an unsigned
Got a little problem. I'd like to create an android list view activity with
I have one little problem...Here is my code..Is there a way to distribute weights

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.