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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:02:34+00:00 2026-06-04T00:02:34+00:00

I want to show continuous integer values from a certain min value to max

  • 0

I want to show continuous integer values from a certain min value to max value.

Is there any way of looping from min to max on xhtml page and add loop values to selectItems

Currently I am doing as:

<p:selectOneMenu>
    <f:selectItems value="#{bean.intValuesFrom25ToMaxValue}" var="myInteger" itemValue="#{myInteger}" itemLabel="#{myInteger}" />
</p:selectOneMenu>

NOTE: There is no problem with current solution, but I have a lot of different select one menus whose values are just a continuous range of integers, so for all of the I have to write getter functions? Thats why I want to create a loop on xhtml page.

  • 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-04T00:02:36+00:00Added an answer on June 4, 2026 at 12:02 am

    You can do this with

     <ui:repeat value="#{bean.yourInts}" var="oneInt">
          <f:selectItem value="#{oneInt}" />
     </ui:repeat>
    

    I hope it’s correct, I have no chance to try it right now:-)

    EDIT

    In that case try this

     <c:forEach begin="25" end="100" var="i">
         <f:selectItem value="#{i}" />     
     </c:forEach>
    

    It’s not a perfect solution because you are mixing JSTL with JSF (which sometimes causes problem) but in this case is fine because your loop does not use any dynamic values.

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

Sidebar

Related Questions

I want to show activity indicator while sending and receiving synchronous asihttprequest from server.
Quick question... Is there any way to change the default behavior of a scrollbar
Im just getting into MapViews on iOS, and want to show a car continuously
I want show annotation view (above one of my pin) after load map. For
hii I want show a pop up Dialog box when i click on to
I'm working on application where I want show popover in - (void)applicationWillEnterForeground:(UIApplication *)application app
I'm using Drupal 7 and Views module in my site. And want show number
Want to show icon for settings UIBarButtonItem on UIToolbar than text button UIBarButtonItem *settingsButton
I want to show water mark on a text field but i dont want
I want to show 5 posts in the sidebar, EXCLUDING all those post I

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.