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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:40:21+00:00 2026-05-29T15:40:21+00:00

I am looking for an example that has some good patterns for doing a

  • 0

I am looking for an example that has some good patterns for doing a combo box….select html element in playframework and helping with the post as in seam it was nice that it auto translated it to the id of the entity I wanted….can I be storing the id with the item somehow in the pulldown so that when selected, I can give the id and label to the server?

Any examples on this would be great!!!! or links to blogs that have some good pattern for this.

thanks,
Dean

  • 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-05-29T15:40:22+00:00Added an answer on May 29, 2026 at 3:40 pm

    I found the answer. The code is the following where id goes as the value(guess I need to brush up on my basic html….previous java frameworks keep you so far away from the basics 🙁 ).

    <select name="parent" size="1"> 
         #{list items:projects, as:'project'} 
            <option value="${project.id}">${project.name}</option> 
         #{/list} 
    </select>
    

    okay, a better example may be this one so you don’t have to worry about setting selected="selected" in the correct option field…

    #{select 'parentId', items:projects, valueProperty:'id', labelProperty:'name', value:project?.parent?.id/}
    

    The parentId is the variable name passed into the action post method. The items is the variable passed out from the get into the render. The value prop is the property on your entity. The value is what will be set on the option’s value for each item and what gets seet into your parentId variable…..this is all working for me now…sweet.

    NOTE: labelProperty cannot be xxx.xxx.xxx. It must be a first level property. and value is what you want read from or written to (a different entity that you passed into the page than the list itself perhaps). In my case above, I passed in projects and I passed in a project as well so items is projects and value is project.parent.id above.

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

Sidebar

Related Questions

I'm looking for a good example that shows how to handle (in the controller)
Looking for an example that: Launches an EXE Waits for the EXE to finish.
I've seen examples of something like [someArray sortUsingSelector:@selector(compare:)]; I'm looking for an example that
I am looking for a simple JavaScript example that updates DOM. Any suggestions?
i am looking for a basic example that shows how i could call a
I am looking for a cocoa example that illustrates how to drag an image
I'm looking for a example or article that demonstrates using SimpleModal in an ASP.NET
I am looking for a Repository pattern implementation example/resource that follows domain driven design
I'm looking for an example of a java desktop application that consumes a Two-way
Looking at this jQuery example, how can I modify the code so that it

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.