How to do suprescript in a list that will be the value of f:selectItems ..

I've searched this topic in the forum but didn't find what I need. So I am posting this seeking help.
I have a SelectOneChoice dropdown. The list of choices contains something like the following. The list is constructed in my managed bean.
1st grade
2nd grade
5th grade
12th grade
How can I make the "st, nd, th" etc. superscript in my managed bean and the superscript will still appear in the select dropdown list in my page?
Any help is greatly appreciated.

Frank,
Thank you for your reply. Appreciate it very much. I'm attaching my code below. Maybe you can point me in another direction to solve my problem. Maybe I just do not understand your suggestion.
The following is in my jsff:
<af:selectOneChoice label="Please select a grade " id="soc1">
<f:selectItems value="#{pageFlowScope.gradeMB.gradeList}"
id="si1"/>
</af:selectOneChoice>
The following is the gradeMB. grade1, grade2 etc. are the labels for the select list.
public List<SelectItem> getGradeList(){
Map<Object, String> items = new HashMap<Object, String>();
String grade1 = "<html><p>1<sup>st</sup> Grade</p></html>" ;
String grade2 = "<html><p>2<sup>nd</sup>> Grade</p></html>"
String grade3 = "<html><p>3<sup>rd</sup>> Grade</p></html>" ;
String grade4 = "<html><p>4<sup>th</sup>> Grade</p></html>" ;
items.put("1", grade1 );
items.put("2", grade2);
items.put("3", grade3);
items.put("4", grade4);
List<SelectItem> gradeToBeSelected = new ArrayList<SelectItem>();
gradeToBeSelected = selectItemsForIterator(items);
return gradeToBeSelected;
private List<SelectItem> selectItemsForIterator(Map<Object, String> mapData){
List<SelectItem> selectItems = new ArrayList<SelectItem> (mapData.size());
Set<Map.Entry<Object, String>> set = mapData.entrySet();
for (Map.Entry<Object, String> me :set)
selectItems.add(new SelectItem(me.getKey(), me.getValue()));
return selectItems;
I was hoping that in run time it will recognize the superscript tag --> <sup>st</sup> but it didn't. It just takes the whole thing as a string.
Thank you.
Cecilia
Edited by: Cecilia on Oct 31, 2010 3:11 PM
Edited by: Cecilia on Oct 31, 2010 3:14 PM
Edited by: Cecilia on Oct 31, 2010 3:19 PM
Edited by: Cecilia on Oct 31, 2010 3:23 PM
Edited by: Cecilia on Oct 31, 2010 3:42 PM

Similar Messages

  • How can I add a menu button that will replay the autoplay startup movie

    I want to link from the menu to the autoplay startup movie on the DVD, but I want to do this without having to put the movie on the dvd twice. Can It be done?

    John:
    Click on the item in the autoplay box and select "Loop slideshow" from the Advanced menu. That will continuously play the slideshow till your manually stop it.
    OT

  • How can I creat a control button that will allow the vi to run?

    Instead of pressing the run button, I want to creat my own run button that will allow my vi to run.
    Any idea?
    Thank you

    First you need to set the VI to Run When Opened (VI Properties>Execution). Then you create a front panel Boolean. On the diagram what you need to do is have some sort of idle state where nothing is done until the Boolean is pressed. It could be a separate while loop that doesn't exit until the Boolean is pressed, an Event Structure, or as part of a state machine. Look at the shippings examples Queued Message Handler, New Event Handler, Using Buttons for Options to name just a few.

  • How Do i create a list that will show in a dropdown box with the list being pulled from another tab and not the cell data format junk?

    How Do i create a list that will show in a dropdown box with the list being pulled from another tab and not the cell data format junk?
    I currently run OS X 10.10.1
    Now i have been trying to work on this for a while now and what i want to do should be simple but its apparently not.
    Here is an example of what i want to happen.
    I will have 2 tabs: Contact | Sales
    Now Contacts will have the list of names and various information about a customer, While Sales will have one drop-down box for each Cell Row that will show the names of the person in tab contacts
    for what i am wanting to do i cant use the data format pop-up menu because the list is edited everyday several times a day.
    Now how do i do this, Excel can do this so how can numbers do it?

    Hi Shegra,
    Paste this into a applescript editor window and run it from there. In the script you may need to adjust the four properties to agree with your spreadsheet. Let me know if you have any questions.
    quinn
    Script starts:
    -- This script converts column A in one table into an alphabetized list of popups. It copies the last cell in that column. Then reverts the column to text. It then refreshes popups in column A of a data table starting with a user defined row.
    property DataEntrySheet : "Sheet 1" --name of sheet with popups to be refreshed
    property DataEntryTable : "Sales" --name of table with popups to be refreshed
    set copyRange to {}
    property PopValueSheet : "Sheet 1" --name of sheet with popup values table
    property PopValueTable : "Contacts" --name of table with popup values
    set PopStartRow to {}
    tell application "Numbers"
      set d to front document
      set ps to d's sheet PopValueSheet
      set pt to ps's table PopValueTable
      set s to d's sheet DataEntrySheet
      set t to s's table DataEntryTable
      set tf to t's filtered --this records filter setting on data Entry Table
      display dialog "Start from row #..." default answer "" with icon 1 -- with icon file "Path:to:my.icon.icns" --a Week # row
      set PopStartRow to {text returned of result}
      tell pt --convert list to alphabetized popups
      set ptRows to count rows
      set copyRange to ("A2:" & name of cell ptRows of column "A")
      set selection range to range copyRange
      set selection range's format to text
      sort by column 1 direction ascending
      set selection range's format to pop up menu
      -- popupsmade
      set selection range to cell ptRows of column 1 of pt
      set v to value of cell ptRows of pt
      end tell
      activate application "Numbers"
      tell application "System Events" to keystroke "c" using command down
      tell pt
      set selection range to range copyRange
      set selection range's format to text
      end tell
      tell t
      set filtered to false
      set tRows to count rows
      set pasteRange to ((name of cell PopStartRow of column "A") & ":" & (name of cell tRows of column "A"))
      set selection range to range pasteRange
      tell application "System Events" to keystroke "v" using command down
      set filtered to tf
      end tell
    end tell

  • How do I clear updated apps listed by date in the Updates section of the App Store app?

    How do I clear updated apps listed by date in the Updates section of the App Store app?

    Hi rowiny,
    depending on what exactly you mean with "clear", it is a bug. See this thread: App Store Updates Do Not Clear
    If you update your App's via iTunes, and not "over the air", the badge count on the AppStore-app icon is wrong, and the list shows "available updates" that you can open in the new version. The listing under "Updated #date#" lists only updates that were done OTA in the last month.

  • Does anyone know of a VI or how to go about writing one that will prevent the computers time/date from being disabled while an application is running.

    Does anyone know of a VI or how to go about writing one that will prevent the computers clock/time from being disabled while an application is running. The time and date can normally be reset while an application is running by clicking on the time/date in the lower right-hand corner of the computer screen. I have an application that runs over several days and it is critical that the time and date of the computer not be changed. Is there an easy way to lock this out from the user? Note that I am what I consider an advanced beginner in LV.
    Thank you,
    Chuck
    Solved!
    Go to Solution.

    That is not something you can do from LabVIEW, as it is an operating system operation, and it will depend on the operating system that you're using. On Windows you can use a group policy to control this. Please Google on "prevent time and date change in windows".
    Also, please try to refrain from stuffing your entire message in the subject block. Keep the subject short, but descriptive enough so it can be understood what you are basically asking. Thanks.

  • I want to create a "Play All" chapter marker that will play the video from start to finish in addition to the standard chapters I have-I guess I can auto start the DVD but would prefer a button-how and where would I put this "play all" marker??

    I want to create a "Play All" chapter marker that will play the video from start to finish in addition to the standard chapters I have…I guess I can auto start the DVD but would prefer a button…how and where would I put this "play all" marker?? Thanks..

    The start chapter button is a play the whole movie button regardless of how many other markers you have.
    Once a DVD starts playing it continues to the end.
    Chapters marker simply gives the viewer a place to start playback whether it be the start, middle or near the end.
    Al

  • How do I eject a dvd disk that will not eject when I highlight it and click the eject disk in finder, has anyone had this problem?

    How do I eject a dvd disk that will not eject after I have highlighted it and clicked the eject disk in finder file menu?

    Complements of Kappy:
    Try:
    1. Restart the computer and after the chime press and hold down the 
    left mouse button until the disc ejects.
    2. Press the Eject button on your keyboard.
    3. Click on the Eject button in the menubar.
    4. Press COMMAND-E.
    5. If none of the above work try this: Open the Terminal application in
    your Utilities folder. At the prompt enter or paste the following:
    /usr/bin/drutil eject
    If this fails then try this:
    Boot the computer into Single-user Mode. At the prompt enter the same command as used above. To restart the computer enter "reboot" at the prompt without quotes.

  • How do I get a longer list of items in the history window - and not have to click "Show All History"? The default list is too short.

    How do I get a longer list of items in the history window - and not have to click "Show All History"? The default list is too short.

    Well I figured it out… all you do say show commands :-/

  • How do I set up calendar events that will be for another time zone? My events shift once I travel

    How do I set up calendar events that will be for another time zone? My events shift once I travel. The same is true when I am traveling and in another time zone, how do I best set up my events so they are in the correct time slot upon my return?

    Basically, if your client does not have a Mac then don't use iWeb to create the site. iWeb is Mac only and if a client wishes to make alterations, then they need the domain file.
    If your client needs to update on a weekly basis, then why not consider using one of the online website creation packages where you can log in from any Mac or PC. This would be simpler and there are lots out there - Microsoft Office Live or Google or something like http://www.wix.com where you can create a site and use a domain name with it.
    Look at the alternatives before using iWeb.

  • How to make a Java application that will change the client box's IP address

    HI how to make a Java application( that application would be run on the client ) that will change the client box's IP address ( IP address of itself )

    If you can do that through the command line, then use Runtime.getRuntime().exec(...) to execute your command.

  • How to create a form that will allow the applicant to upload their photo

    I have Adobe Acrobat 9 Pro Extended and I know how to create forms that require text input.
    How to create a form that will allow the applicant to upload their photo? I alo wish to know how to upload a photograph so that I can test the form I created.
    Thank you
    Adrian Watts

    test@ORA10G> with x as (
      2    select '234-1111' as customer, to_date('2-Jan-2008','dd-Mon-yyyy') as call_date, 'Order product' as reason from dual union all
      3    select '234-1132', to_date('3-Jan-2008','dd-Mon-yyyy'), 'Request info' from dual union all
      4    select '231-1154', to_date('4-Sep-2007','dd-Mon-yyyy'), 'Request info' from dual union all
      5    select '234-1111', to_date('2-Nov-2007','dd-Mon-yyyy'), 'Order product' from dual union all
      6    select '234-1132', to_date('9-Jan-2008','dd-Mon-yyyy'), 'Request info' from dual union all
      7    select '231-1154', to_date('9-Sep-2007','dd-Mon-yyyy'), 'Request info' from dual union all
      8    select '234-1111', to_date('5-Dec-2007','dd-Mon-yyyy'), 'Order product' from dual union all
      9    select '234-1131', to_date('7-Dec-2007','dd-Mon-yyyy'), 'Request info' from dual union all
    10    select '231-1154', to_date('1-Sep-2007','dd-Mon-yyyy'), 'Request info' from dual union all
    11    select '234-1111', to_date('8-Jan-2008','dd-Mon-yyyy'), 'Order product' from dual union all
    12    select '234-1131', to_date('3-Dec-2007','dd-Mon-yyyy'), 'Request info' from dual union all
    13    select '231-1154', to_date('4-Nov-2007','dd-Mon-yyyy'), 'Forward to Sales' from dual)
    14  --
    15  select customer,max(call_date), reason
    16  from x
    17  where reason = 'Request info'
    18  group by customer, reason;
    CUSTOMER MAX(CALL_ REASON
    231-1154 09-SEP-07 Request info
    234-1131 07-DEC-07 Request info
    234-1132 09-JAN-08 Request info
    test@ORA10G>
    test@ORA10G>pratz

  • How do you print a Page document that will show your highlights in color say yellow

    how do you print a Page document that will show your highlights in color say yellow

    Let me guess you are not on OSX (10.6.5), which means you are using which version of Pages?
    Peter

  • 6th gen nano says i have used 3gb of other memory: how do i remove this and how do i find what is in that part of the memory

    6th gen nano says i have used 3gb of other memory: how do i remove this and how do i find what is in that part of the memory

    The operating system for the iPod, album art, databases, etc. all make up the "other stuff". Think of it as all the backstage things required to make your ipod work.
    i

  • I quit multiple tabs Firefox sent the warning prompt. As I was going to click save and quit I accidentally pressed the "save these settings". Now I jsut wonder, how do I turn it off, so that Fireox sends the prompt whenever I try to close multiple tabs?

    This might sound stupid, but once when I was about to quit Firefox, I got the warning prompt if I wanted to close multiple tabs.. As I was going to click save and quit I accidentally pressed the "save these settings". Now I jsut wonder, how do I turn it off, so that Fireox sends the prompt whenever I try to close multiple tabs? I'm running 3.6.6 with OS X Snow Leopard.

    You can reset the ''warn'' prefs on the '''about:config''' page via the right-click context menu.
    browser.tabs.warnOnClose , see http://kb.mozillazine.org/About%3Aconfig_entries
    browser.warnOnQuit , see http://kb.mozillazine.org/browser.warnOnQuit
    browser.warnOnRestart , see http://kb.mozillazine.org/browser.warnOnRestart
    To open the ''about:config'' page, type '''about:config''' in the location (address) bar and press the Enter key, just like you type the url of a website to open a website.
    If you see a warning then you can confirm that you want to access that page.
    In Firefox 3 you do not get the "Save & Quit" pop-up dialog if you choose Firefox > Preferences > General > Startup: "When Firefox Starts": "Show my windows and tabs from last time".
    To get the "Save & Quit" pop-up dialog you have to select one of the other choices (Show my home page,Show a blank page).

Maybe you are looking for

  • Internal Table statement

    INSERT, SORT, APPEND, MODIFY, COLLECT, READ, DELETE Which of the above statements are allowed to work with: Standard Internal Table? Sorted Internal Table? Hashed Internal Table? Thank You.

  • I need to transfr a project from final cut pro 6

    I need to transfr a project from final cut pro 6 to an editor with final cut pro 5. will they have the problem of not being able to open the file? any suggestions out there?

  • How can I include assets in an AIR update?

    I have an Adobe AIR slideshow app built with flex 3. The app is packaged with an xml playlist and slides of various types, swf, jpg mov) When I package the app it includes all of these contents. I want to be able to update the contents, add new slide

  • Battery problem when computer sleeps

    Hi, I have Lenovo S12 , for about six months. I use the battery which came with the computer. It worked well till this problem : when the computer goes to sleep, even if the battery is full, it hibernates after really short time. When I turn it on, i

  • Best video converter?

    I'm trying to convert multiple HD .mov files but they end up unuseable in Premiere. I've tried many different output formats but none of them seem to work. Super converter is pretty good but I can't seem to get the orignal size of the video. it's loc