What am I missing? I do not see the dropdown on the JSF

Hi Guys,
For some reason, JSF is not rendering "list1" in the following JSF:
***********JSF***************
<HTML>
<HEAD> <title>Hello</title> </HEAD>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<body bgcolor="white">
<h2>Hi. My name is Krishna. I'm thinking of a number from 0 to 10.
Can you guess it?</h2>
<jsp:useBean id="UserNumberBean" class="guessNumber.UserNumberBean" scope="session" />
<f:use_faces>
<h:form id="helloForm" formName="helloForm" >
<h:graphic_image id="wave_img" url="/wave.med.gif" />
     <h:input_number id="userNo" numberStyle="NUMBER"
                    valueRef="UserNumberBean.userNumber">
     <f:validate_longrange minimum="0" maximum="10" />
</h:input_number>
     <h:command_button id="submit" action="success" label="Press Me"
commandName="submit" />
<p>
<h:command_button id="back" action="back" label="Back"
commandName="back" />
<p>
     <h:output_errors id="errors1" for="userNo"/>
<p>     
     <h:selectone_menu id="list1"
valueRef="UserNumberBean.list1">
     <f:valuechanged_listener type="guessNumber.ListValueChangedListener" />
<h:selectitems
valueRef="UserNumberBean.currentListOption"/>
</h:selectone_menu>
</h:form>
</f:use_faces>
</HTML>
*********Faces Config***********
<faces-config>
<navigation-rule>
<from-tree-id>/greeting.jsp</from-tree-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-tree-id>/response.jsp</to-tree-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-tree-id>/greeting.jsp</from-tree-id>
<navigation-case>
<from-outcome>back</from-outcome>
<to-tree-id>/response.jsp</to-tree-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-tree-id>/response.jsp</from-tree-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-tree-id>/greeting.jsp</to-tree-id>
</navigation-case>
</navigation-rule>
</faces-config>
**************ListValueChangedListener class**************
* Created on Nov 2, 2003
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
package guessNumber;
import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.PhaseId;
import javax.faces.event.ValueChangedEvent;
import javax.faces.event.ValueChangedListener;
* @author krishna
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
public class ListValueChangedListener implements ValueChangedListener {
     /* (non-Javadoc)
     * @see javax.faces.event.ValueChangedListener#processValueChanged(javax.faces.event.ValueChangedEvent)
     public void processValueChanged(ValueChangedEvent vEvent) throws AbortProcessingException {
          System.out.println("ValueChangedEvent processEvent");
          String componentId = vEvent.getComponent().getComponentId();
          // handle each valuechangedevent here
          FacesContext context = FacesContext.getCurrentInstance();
          System.out.println("Component Id: "+componentId);
          System.out.println("vEvent.getOldValue: "+vEvent.getOldValue());
          System.out.println("vEvent.getNewValue: "+vEvent.getNewValue());
     /* (non-Javadoc)
     * @see javax.faces.event.FacesListener#getPhaseId()
     public PhaseId getPhaseId() {
          return PhaseId.PROCESS_VALIDATIONS;
***************UserNumberBean**********************
package guessNumber;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Random;
public class UserNumberBean {
protected Integer userNumber = null;
protected Integer randomInt = null;
protected String response = null;
protected Collection list1;
protected Collection list2;
     protected ArrayList currentListOption;
public UserNumberBean () {
          Random randomGR = new Random();
          randomInt = new Integer(randomGR.nextInt(10));
     System.out.println("Duke's number: "+randomInt);
     list1 = new ArrayList();
     list1.add("List1 - Item1");
          list1.add("List1 - Item2");
          list1.add("List1 - Item3");
          list1.add("List1 - Item4");
          list2 = new ArrayList();
          list2.add("List2 - Item1");
          list2.add("List2 - Item2");
          list2.add("List2 - Item3");
          list2.add("List2 - Item4");     
public void setUserNumber(Integer user_number) {
userNumber = user_number;
System.out.println("Set userNumber " + userNumber);
public Integer getUserNumber() {
System.out.println("get userNumber " + userNumber);
return userNumber;
public String getResponse() {
     if(userNumber.compareTo(randomInt) == 0)
          return "Yay! You got it!";
     else
          return "Sorry, "+userNumber+" is incorrect.";
     * @return
     public Collection getList1() {
          return list1;
     * @return
     public Collection getList2() {
          return list2;
     * @param collection
     public void setList1(Collection collection) {
          list1 = collection;
     * @param collection
     public void setList2(Collection collection) {
          list2 = collection;
     * @return
     public ArrayList getCurrentListOption() {
          return currentListOption;
     * @param list
     public void setCurrentListOption(ArrayList list) {
          currentListOption = list;
Cheers!
Krish

I see some problems in your JSP page.
     <h:selectone_menu id="list1"
valueRef="UserNumberBean.list1">This points to item that you want to appear selected when the list is rendered, so it should point to a string. So for ex, in your code below, currenListOption can be a string. Also I see that currentOption is null.
<h:selectitems
valueRef="UserNumberBean.currentListOption"/>
</h:selectone_menu>
</h:form>
</f:use_faces>
</html> This should point to list to be displayed. Say for example list1 in your code.
Hope this fixes your problem.
-Jayashri

Similar Messages

  • How do I reset my security questions/answers? I tried what apple recommends but I do not see the option to "reset" these.

    How do I reset my security questions/answers? I tried what apple recommends

    You need to ask Apple to reset your security questions; ways of contacting them include clicking here and picking a method for your country, phoning AppleCare and asking for the Account Security team, and filling out and submitting this form.
    They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
    (101507)

  • I just went from OS 10.6 to 10.8. The arrow button is gone from the scrollbar. I do not see the option in "Systems Preference" any more. Am I missing something. If it is gone, is Apple going to bring it back?

    I just went from OS 10.6 to 10.8. The arrow button is gone from the scrollbar. I do not see the option in "Systems Preference" any more. Am I missing something. If it is gone, is Apple going to bring it back?

    John R M wrote:
    Thank you. I believe Apple shoud give you the option as to whether or not you may want to use the arrows.
    Apple give users what they want?
    Good luck there, the head of iOS Scott Forstall was canned, I suspect this was his favorite picture.
    However I bring salvation and sanity, the option to go back to the wonderous Snow Kitty.
    How to revert your Mac to Snow Leopard
    How to erase and install Snow Leopard 10.6
    Be sure to vent to Apple for the stupid changes here
    https://www.apple.com/feedback/macosx.html

  • I am having problems opening images renerated in lightroom5 into cs6. Cs6 bridge does not see the lightroom libarary. If I open lightroom and right clik the image, edit in cs6, 6 opens but the picture doesnot follow. What is going on? Give me a hand.

    I am having problems opening images renerated in lightroom5 into cs6. Cs6 bridge does not see the lightroom libarary. If I open lightroom and right clik the image, edit in cs6, 6 opens but the picture doesnot follow. What is going on? Give me a hand, thanks.

    What edition of LR 5? What edition of ACR does PSCS 6 contain. If they are not parallel (same edition number x in [5 or 8].x ), is LR making a tiff or psd rendition of the image?

  • TS3276 I can login perfectly to my hotmail account but can not see the contents.  What is wrong?

    I have more than one mail account.  All of them are working except hotmail.  Everything seems to be logged correctly.  Even checked with "connection doctor".  I can not see the contents of the hotmail account.  What could be wrong?

    When you read the ebooks on your iPad (with you logged in using your Acrobat account), did you explicitly save those files to Acrobat.com? Are you able to access those same files in browser?

  • I do not see the word that i have to type in to prove i am not a robot what do i do on my laptop

    I do not see the word that i have to type in to prove i am not a robot what can i do on my laptop to setup firefox sync

    Websites remembering you and automatically log you in is stored in a cookie.
    * Create an allow cookie exception (Tools > Options > Privacy > Cookies: Exceptions) to keep such a cookie, especially for secure websites and if cookies expire when Firefox is closed.
    Make sure that you do not run Firefox in Private Browsing mode.
    * https://support.mozilla.com/kb/Private+Browsing
    * In [[Private Browsing]] mode all cookies are session cookies that expire if that session is ended, so websites won't remember you.
    * Do not use [[Clear Recent History]] to clear the "Cookies" and the "Site Preferences"
    Clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, and passwords.
    * http://kb.mozillazine.org/Cookies
    * http://kb.mozillazine.org/Password_Manager

  • HT5312 I cannot remember the answers to my security questions and I do not see the option to email the answers to my rescue email, although I know I have one. What do I do?

    I cannot remember the answers to my security questions and I do not see the option to send it to my rescue email, although I know I have one. What do I do? I cannot use my account for iTunes until I answer the questions and I recently got $50 of iTunes from my parents. HELP!!

    Are you sure that it's a rescue email address (it's not the same thing as an alternate email address) ? If you do then you should be able to go to https://appleid.apple.com/ and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you might see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address then see if the instructions on this user tip helps : https://discussions.apple.com/docs/DOC-4551

  • My preferences are set to 'show informational overlay' but when I scroll through events I do not see the date as I'm supposed to. I only see the date underneath the event. What am i doing wrong?

    I so not see the date as I scroll through my events and I have my preferences set to 'show informational overlay'. They only date I see is below the event. What am I doing wrong?

    Make a temporary, backup copy (if you don't already have a backup copy) of the library and try the following:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
         User/Home()/Library/ Preferences folder.
    2 - delete iPhoto's cache file, Cache.db, that is located in your
         User/Home()/Library/Caches/com.apple.iPhoto folder. 
    Click to view full size
    3 - launch iPhoto and try again.
    NOTE: If you're moved your library from its default location in your Home/Pictures folder you will have to point iPhoto to its new location when you next open iPhoto by holding down the Option key when launching iPhoto.  You'll also have to reset the iPhoto's various preferences.
    OT

  • HT4859 I dropped my phone in the water can not enter pass word couse can not see the screen what can i do??

    I dropped my phone in the water can not enter pass word couse can not see the screen> what can i do?

    You're going to need a new phone unless you are very lucky. Take it to an Apple Store.

  • TS2756 i'm not seeing the application personal hotspot on my 4s, what can i do to get this on my phone

    i'm not seeing the application personal hotspot on my 4s, what can i do to get this on my phone

    I'm assuming your using iTunes to sync your iPhone correct?   When you plug your iPhone into your PC/Mac..Open iTunes.  Go to music tab.  Pick the music you want on your iPhone.  Press Sync.  . I'm assuning you've done thiis before so I apologize if I sound like I'm telling you something you've already done.  If you can please give more information it would be easier to solve your problem.

  • Not seeing the camera access on the home screen after ios5 update. What's up with that?

    Is anyone else not seeing the access for the camera on their home screen after the update? I thought that was part of ios5.

    Double press the home button on the lock screen. On the Home Screen you still have the camera button!

  • I purchased OS Lion. After the download, I do not see the OS Lion icon. What should I do? Please help. Thanks

    I purchased OS Mountain Lion. After the download, I do not see the OS Lion icon. How shall I go about installing it? Please help. Thanks

    You have to install it, open LaunchPad and when you see Mountain Lion double click it and follow the on-screen instructions.

  • When I have video clips on my timeline, they do not play in the monitor screen. I hear the sound track but can not see the image. To test if my new files are somehow the problem, I went back and used video files that I used successfully a year ago, and th

    When I have video clips on my timeline, they do not play in the monitor screen. I hear the sound track but can not see the image. To test if my new files are somehow the problem, I went back and used video files that I used successfully a year ago, and they no longer play in the monitor window. I hear the sound track, but do not see any video. Have I changed some setting that controls video playback in the monitor window?

    Randy Ruttger
    Thanks for the follow up.
    Missing in this equation were the version of Premiere Elements that you were using and the computer operating system on which it was running. But...
    The deed is done. But.....Until now and after you went ahead and moved to version 12, we now learn what version of Premiere Elements you were using. We still do not know the computer operating system involved.
    You just said Premiere Elements 10. Premiere Elements 10 is hit by a serious known display issue if the computer uses a NVIDIA GeForce video card/graphics card. In this issue, the only remedy is to roll back the driver version to about May 2013. The description of the problem and how to do the roll back are described in one of the Announcements at the top of this forum. What video card/graphics card does your computer use?
    On another front, Adobe will be releasing a new version of Premiere Elements any day now. No one but Adobe knows the feature set for the new version. That type of information is announced at the moment of release of the new version.
    So the remedy to the problem that you presented in this thread could have been...
    1. Rolling back the NVIDIA GeForce driver version to about May 2013 if possible (Windows 8 or 8.1 64 bit, may not be possible)
    2. Move to another version of Premiere Elements (which you did)
    I offer the above for consideration so that you can review your decisions. We are pleased to learn that Premiere Elements 12/12.1 works for you.
    Please do not hesitate to ask questions and ask for clarifications, but remember that the answers are in the details.
    Best wishes,
    ATR

  • I can not see the PC I'm connected to over VPN in the MY Network tab.

    Hi, 
    I have set up my incoming connection for my VPN
    on a Windows 8.1 PC.  I can then remotely log in with my Windows 7 laptop. The laptop establishes a connection and says that I have "ipv4 internet access."
    The problem I'm having is that I can’t find the PC in my network. What am I missing? Is Windows 7 not compatible with Windows 8.1 over
    a VPN? I have turned off my Norton's Firewall for a short period of time but this did not change anything. I have altered the IP range allocation for the incoming connection and this has helped to establish a stable connection.
    Any ideas on why I can not see the PC I'm connected to, in the (MY
    Network) tab, would be much appreciated. Thanks

    Hi Steve,
    The main issue is the Windows 8.1 machine is not listed in the Windows 7 machine via VPN ,right ?
    Please check the following settings in the network and sharing center:
    1.Check these settings in the Advanced sharing settings
    “Turn on network discovery” and “turn on file and print sharing”
    2.Ping the destination machine both with the IP address and the UNC to have a check .
    Best regards

  • Brand New RD240 ThinkServer can not see the LSI 8708EM2 RAID Controller During Bootup

    I have a brand new out the box RD240 ThinkServer that can not see the LSI 8708EM2 RAD Controller it came with.  This RAID controller simply does not want to function.  This RAID Cntroller does not show up during the boot up and I even tried putting in a different slot in the riser card, thinkn maybe it was a bad PCI-e slot, but made no difference.  Also the Lenovo Easy Setup software does not find this controller either.  So I'm wondering if there is an issue with the RAID Controller or is it a bad Riser card?  Does anyone have any idea's on what can be done or what I may be missing?

    For a list of Warranty Support contact numbers, please visit:
    http://support.lenovo.com/en_US/feedback/detail.page?LegacyDocID=MIGR-76613
    In the U.S. you can call:  1-800-426-7378 

  • Can not see the data in the grid

    Hi,
    nice to see the new features, but I can not see the the table inserts
    in the data grid - the <data> rider is not clickable.
    Regards

    Hi annerose,
    This problem has appeared in a few other threads. It's caused by installing Release 2 Raptor over Release 1 Raptor without first deinstalling Release 1 Raptor . So what you need to do is:
    1) Back up any important Raptor files, e.g. connections etc.
    2) Remove the existing Raptor Rel 1 installation folder
    3) Install Raptor Rel 2
    Hope this helps
    ady

Maybe you are looking for

  • NFe B2B - Recebimento de Notas Fiscais de Entrada versão 2.00

    Bom dia Pessoal, estou configurando o Inbound B2B conforme link postado pelo Pedro Baroni e estou com uma duvida, eu preciso gerar os dois cenarios para cada versão ou apenas para a versão 2.0 do XML que roteará para as duas? Obrigado.

  • Can't edit default domain controllers policy on windows 8 or server 2012

    I have found that I can't edit the "Default Domain Controllers Policy" from a Windows 8 or Server 2012 machine.  I can edit and save changes fine from a Windows 7 machine.  The domain controllers are running Windows 2012 Standard upgraded from Window

  • E4200 Disk not coming up

    I have a USB external HDD in a Nextar3I enclosure.(1.5 TB seagate (I don't recall the exact ref)). I was on the original firmware of the router and the disk was recognixed perfectly. I did get some issues with the router locking up at time, so I upgr

  • Have sound on games and library but not web sites.how to fix

    i have a hp omini 100. i have sound on games and start up sounds and in library but not on web sites like you tube or web md or any other vidios i come across.HELP PLEASE!!!!!!!!!!!!!!!!!!!! This question was solved. View Solution.

  • Connect Report output to third party system

    Dear Techis Can we connect Report output to third party system and hw? Pls advice............