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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:27:42+00:00 2026-06-15T12:27:42+00:00

So I have a spring binded dropdown similar to shown below. My question I

  • 0

So I have a spring binded dropdown similar to shown below. My question I want to
show ALL ID as the selected option whenever getAllID value is true. I know the selected
value is based on the value provided by spring bind element, in this case studentID but is there anyway I can override that anytime my boolean condition is true?

<spring:bind path="student.studentID">      
   <select name="${status.expression}" value="${status.value}">
       <option />
    <option value="001">1</option>
    <option value="002">2</option>
    <option value="003">3</option>
    <option value="ALLID"
        <c:if test='${student.getAllID eq true}'> Selected </c:if>>ALL ID
    </option>

     </select>
</spring:bind>
  • 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-15T12:27:44+00:00Added an answer on June 15, 2026 at 12:27 pm

    I think I got the fix. Added c:if to Select tag:

    <c:if test='${student.getAllID ne true}'>
                value="${status.value}" 
    </c:if>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have basic Spring MVC 3 setup for i18n where I can show labels
I have used Spring OXM and JiBX in my application. below is my Spring
I have GWT application and I want to secure it using spring security. I
In my interface, I will have many functions. All of these will be binded
I have a simple form with a dropdown list binded to a string array
I have an observable collection which is binded to datagrid... I want to sort
I have Spring web application. I would like to put some common piece of
I have spring 2.5 application and several pages in the flow work perfectly -
Is it possible to have Spring inject the JPA entityManager object into my DAO
I have two spring beans as follows: @Component(A) @Scope(prototype) public class A extends TimerTask

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.