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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:49:59+00:00 2026-05-15T15:49:59+00:00

I have a list and I show it with s:select without any problem but

  • 0

I have a list and I show it with s:select without any problem but I want it’s header value to be one of list’s items and it differs on different runs. something like this:

<s:select list="roleList" name="role" headerkey="" headerValue="%{euser.role}" cssClass="textfield"/>

value of ‘euser.role’ is one of ‘roleList’ items but if I use this, it adds the value for header and then I have 2 value of that item on my select.

I need this for an edit page, if user doesn’t want to change value of this option, then it’ll have previous value.

Thanks in advance.

  • 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-15T15:50:00+00:00Added an answer on May 15, 2026 at 3:50 pm

    Does it have to be a header? Can you just set the selected value so that is what displays first? In your Action you can figure out what the header value should be

    //action method
        int valueToShow = 0; //get the id to show
    
    //jsp
        <s:select list="roleList" name="role" headerkey="" value="%{valueToShow}" cssClass="textfield"/>
    

    This way it will display the value you want, but it wont get releated twice.

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

Sidebar

Related Questions

I have three different List collections. How can I show them in one ListBox
I have a list view with over 100 items. Each of these items show
I have already created a webpart to show the data from list, but I
So i want to show a contacts list and for that I have transformed
In Lion, source list group items now have a Hide/Show button that appears when
I have a list of objects in a model. I wish to show elements
I have an input field that uses Autocomplete to show a list of possible
i have to show 3 columns in List view. I tried having table inside
I have the following code to show me a custom list with images and
I have a page with a list of items initially loaded from a include_once('show_calendarV2.php');

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.