Bug when using a Map for SelectItems?

Hi there,
I think I found a pretty bad bug.... I don't think this behaviour is intended:
I create a selectOneListbox which uses a map for storing the selectItems. The property holding the value is type compatible with the value in the map. When the component is shown, the wrong item is selected (ie NOT The one that is returned by the value property). If I use SelectItem[] for the selectItems, it works. Here is some sample code:
The methods in the bean (managed bean with the name helloBean). The value property always returns 12 .....
  public Map getItems(){
    Map map = new HashMap();
    map.put("Hello_11", new Integer(11));
    map.put("Hello_12", new Integer(12));
    map.put("Hello_13", new Integer(13));
    map.put("Hello_14", new Integer(14));
    return map;
  public SelectItem[] getItems2(){
    SelectItem[] items = {
        new SelectItem(new Integer(11), "Hello_11"),
        new SelectItem(new Integer(12), "Hello_12"),
        new SelectItem(new Integer(13), "Hello_13"),
        new SelectItem(new Integer(14), "Hello_14"),       
    return items;
  public Integer getValue(){
    return new Integer(12);
  }..... here is how the selectOneListboxes are initialized ......
<h:form id="helloForm">
        <h:selectOneListbox size="1" value="#{helloBean.value}">
          <f:selectItems value="#{helloBean.items}"/>
        </h:selectOneListbox>
        <h:selectOneListbox size="1" value="#{helloBean.value}">
          <f:selectItems value="#{helloBean.items2}"/>
        </h:selectOneListbox>
</h:form>.... so both boxes refer to the same value property but their selectItems are taken from a map and a SelectItem[] array respectively. I would expect to see in both boxes the text "Hello_12", BUT:
<select name="welcomeForm:_id0" size="1">     
     <option value="14">Hello_14</option>
     <option value="12">Hello_12</option>
     <option value="13">Hello_13</option>
     <option value="11">Hello_11</option>
</select>
<select name="welcomeForm:_id2" size="1">     
     <option value="11">Hello_11</option>
     <option value="12" selected="selected">Hello_12</option>
     <option value="13">Hello_13</option>
     <option value="14">Hello_14</option>
</select>as you can see, only for the array the correct value is initially selected.
Can anyone confirm this is a bug - or - what i would prefer tell me how to get around this?
Thanks a lot!

If getValue returns "12" (a String value), the situation is reversed.
See the page 9-31 of the specification. It says:
4. A java.util.Map where the keys are
converted to Strings and used as labels, and
the corresponding values are converted to
Strings and used as values for newly
created javax.faces.model.SelectItem
instances. The instances are created in the
order of the iterator over the keys provided
by the Map.

Similar Messages

  • I have a problem when using Google Maps, at some point my computer blanks the window and says there's a problem with display drivers, and it has recovered,but it doesn't. Problem doesn't happen with Int Explorrer, so I do not believe it is the computer

    When using google maps through Firefox, after asking for a place which is not the general North America section which routinely comes up, the firefox screen goes white, with a narrow banner at the top. A message appears in the lower right corner which says something about display drivers having had a problem, but now have recovered. However the display doesn't recover and the banner message is that Firefox is not responding. When I go to restart Firefox if I go to the restore point, the page is still frozen out.
    I do not believe it is a problem with my computer because it doesn't happen if I use I.E. to go to google maps, then G-maps works normally.
    This phenomenon did not happen before the latest upgrade to either Google or Firefox. I have used Fiefox for a number of years and also Google Maps on previous computers and on this one, and not had this before.
    This is a relatively young computer (Asus EeSlate 121) less than a year old. I have used Firefox since I bought it and until recently had no problem with Google Maps.

    I solved it myself, after the "note" which came back from FF/Mozilla just as I finished my message, commenting on what it was that my system had , I wnnt back to check my plug-ins etc. I downloaded the latest Java, BOTH 32bit AND 64 bit versions and latest Firefox.
    Now all is working.
    Thanks,
    B.

  • Commenting a Line in ABAP Editor when using SAP GUI for java

    Hi,
    In ABAP editor we can highlight the line which are to be comment and use cmd+< sign to comment those lines. What will be the command to be used to achieve the same functionality when using SAP GUI for JAVA on an iMac.

    Hello Kedar,
    please check with SAP GUI for Java 7.20 rev 5 before submitting a bug report.
    Also please verify, that cmd-< and cmd-> are not assigned as "Keyboard Shortcuts" in the "Keyboard" control panel of "System Preferences".
    Bug reports can be submitted with the [SAP Message Wizard|http://service.sap.com/message], for SAP GUI for Java please use component BC-FES-JAV.
    Best regards
    Rolf-Martin

  • Variable Substitution not working when using ABAP mapping

    Hi all,
    I am doing an IDoc to File scenario.
    Due to some complex mapping requirements, i had to use ABAP mapping for IDoc to File ( IDoc : SHPMNT05)
    There is also one more requirement where in i need to generate the receiver filename dynamically
    i.e the filename is of the form :     
        GW-XYZ-DD/MM/YYYY.csv
    Where
    XYZ is the Shipment number (E1EDT20- TKNUM)
    DD/MM/YYYY is the IDOC creation date in ECC (EDIDC-CREDAT)
    so i used the variable substitution option in receiver file adapter.
    But its not working.
    Is there any limitation for using the variable Substitution, doesnt variable substitution work in case of ABAP mapping?
    Regards,
    Loveena.

    Hi,
      u written ABAP mapping program to get the file name in the required format ,
    is it rt?
    when u test it at message mapping(including ABAP map program)
    u get the the required format of file name in the one of target filed.
    if that was fine, please check the variable substituiton parameters at receiver file adapter.
    i mean, are u maintain variable name and refernece.
    u have to specify the payload information.
    warm regards
    mahesh.

  • File TO File-Using XSLT mapping (for Beginners) --- Error in XSLT

    Hi,
    I am following this wiki (TO File-Using XSLT mapping (for Beginners))
    https://wiki.sdn.sap.com/wiki/display/XI/FileTOFile-UsingXSLTmapping%28forBeginners%29
    When creating  Xslt from the MapForce, when I click on the XSLT Tab I am getting the following error
    http://www.flickr.com/photo_zoom.gne?id=1216715484&size=o
    How to correct this error ?.....
    Thanks
    srini
    Message was edited by:
            srinivas

    Hello,
    The XSD you are using is from Data Type and you are using it for mapping.
    Instead export XSD for Message Type and also pass the XML schema for source that will solve the issue and your XSLT will be generated.
    Regards,

  • When using rabbitmq-jms for vFabric RabbitMQ javax.jms.Message.getJMSDestination does not return the actual destination when it is received from a consumer listening on a Topic with a wild card

    When using rabbitmq-jms for vFabric RabbitMQ javax.jms.Message.getJMSDestination does not return the actual destination when it is received from a consumer listening on a Topic with a wild card. I have tested with both 1.0.3 and 1.0.5 clients with RabbitMQ 3.1.5.
    I was wondering if the community was aware of this problem and if there are any workarounds? If not what is the proper channel to file a bug report. An example code snippet is below. The test fails because the TextMessageMatcher expects the destination passed in on construction (second parameter) to equal the desination on the message received (aquired from getJMSDestination).
            Mockery context = new Mockery();
            final MessageListener messageListener = context.mock(MessageListener.class);
            final Latch latch = new LatchImpl();
            final String prefix = "test" + System.currentTimeMillis();
            context.checking(new Expectations() {
                    oneOf(messageListener).onMessage(with(new TextMessageMatcher("MSG1", prefix + ".1234")));
                    will(new CustomAction("release latch") {
                        @Override
                        public Object invoke(Invocation invocation) throws Throwable {
                            latch.unlatch();
                            return null;
            final Connection connection = createConnection(null, null);
            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
            connection.start();
            Topic wildcardTopic = (Topic) getInitialContext().lookup(prefix + "." + "#");
            Topic destination = (Topic) getInitialContext().lookup(prefix + ".1234");
            final MessageConsumer consumer = session.createConsumer(wildcardTopic);
            consumer.setMessageListener(messageListener);
            MessageProducer producer = session.createProducer(null);
            producer.send(destination, session.createTextMessage("MSG1"));
            latch.await(5000);
            connection.close();
            Thread.sleep(5);
            context.assertIsSatisfied();

    Check where your MDB sends the [response] messages to.

  • How to use offline map for windows store app using c# and xaml

    Hi friends,
    I want to integrate offline map in my windows store app but I am not able to achieve that.
    Below is my requirement:
    When a user wants to go somewhere where she/he doesn't want to use wi-fi or mobile data but wants to use map to assist her/him to roam around. For this I want to give an option to download the map for that region/area before leaving for that place and there
    she/he can use map even in offline.
    Is it possible that I can achieve this using Bing maps?
    If yes then tell me the processes to follow.
    If no then can I achieve this using "Here" or by using any other API or by tweaking any way?
    Note: I am showing maps in case of online and user can search for directions or any places in that. I am using Bing maps for that.
    Thanks,
    S.Sandeep

    Hi Sandeepmsandy,
    There is no available code sample for this scenario. You may write your own.
    Step 1: Get pdf URL from sqlite database. Please refer to the following MSDN blog and see a code sample.
    http://blogs.msdn.com/b/robertgreen/archive/2012/11/13/using-sqlite-in-windows-store-apps.aspx. Note, you need to retarget the project to 8.1 and then get two sqlite packages from NuGet before building this sample.
    Step 2: Use some special classes to get file from serer.
    HttpWebRequest can help download small pdf files. For more information to see
    https://social.msdn.microsoft.com/Forums/windowsapps/en-US/de96a61c-e089-4595-8349-612be5d23ee6/download-file-with-httpwebrequest?forum=winappswithcsharp. It’s easy for use, but if you want to download the larger or many files, it’s recommend to use
    BackgroundTransfer namespace. The classes in this namespace provide a power way to transfer files in the background. See a code sample from MSND.
    https://code.msdn.microsoft.com/windowsapps/Background-Transfer-Sample-d7833f61.
    Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate
    the survey.

  • Why do I get a "call ended" alert when using  Googles Maps through hands free Blue Tooth service in my car

    Why do I get a "call ended" alert after voice directions, when using Googles Maps App with my iPhone 5s paired to Bluetooth service in my GM auto

        Hello Snosilla! I'm so sorry for all the confusion and for all the time taken to activate service with us! I do see that the iPhone 5c is $99.99 right now. The iPhone 5s is actually $199.99. There's no need to call Pam anymore, we can take over from here.
    I've followed you in the forums. Please accept me, and follow me back. Then, send me a Direct Message and I can look into this for you. If you do not have an active line yet, I may need to get you through to our activations department, but I will do all I can!
    Thank you!
    ChristinaB_VZW
    VZW Support
    Follow us on Twitter @VZWSupport
    VZW Support

  • [svn:fx-trunk] 10891: Fix for ASDoc throws error when using getter methods for pseudo-inheritance of static constants

    Revision: 10891
    Author:   [email protected]
    Date:     2009-10-06 09:46:47 -0700 (Tue, 06 Oct 2009)
    Log Message:
    Fix for ASDoc throws error when using getter methods for pseudo-inheritance of static constants
    QE notes: None.
    Doc notes: None
    Bugs: SDK-22676
    Tests run: checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-22676
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/AsDocUtil.java

    Have you tried using com.adobe.air.crypto.EncryptionKeyGenerator instead?

  • Our iMac (intel, 11.2) freezes up when using Time Machine for Back Ups.  We have 16GB of RAM and the BU drive is 1 TB on firewire.

    Our iMac (intel, 11.2) freezes up when using Time Machine for Back Ups.  We have 16GB of RAM and the BU drive is 1 TB on firewire.

    See Pondini's TM FAQs for starters.

  • I need to get 2 decimal places when using a formula for a quotient and Numbers will only give me whole integers which is useless since most items will be less than 1. How can I change this?

    How do I get 2 decimal places when using a formula for a quotient? It only gives me whole integers. Most of the results will be less than 1 so I need 2 decimal places

    the quotient function returns only whole number portion of the dividing two numbers.  If you want the actual decimal value use the divide operator.  you enter this as:
    A/B
    if the numerator is in A1 and the denominator is in B1 you can enter the formula like this:
    =A1/B1

  • After updating my Macbook Pro retina display to os x yosemite 10.10.2, the mause and track pad locks, and do not respond especially when using the Mac for a long period, please help, how can I solve this, I do not like feel like in windows, so I paid

    after updating my Macbook Pro retina display to os x yosemite 10.10.2, the mause and track pad locks, and do not respond especially when using the Mac for a long period, please help, how can I solve this, I do not like feel like in windows, so I paid good money for this mack, I feel calm

    Hi Buterem,
    I'm sorry to hear you are having issues with your MacBook Pro since your recent Yosemite update. I also apologize, I'm a bit unclear on the exact nature of the issue you are describing. If you are having intermittent but persistent responsiveness issues with your mouse or trackpad, you may want to try using Activity Monitor to see if these incidents correspond to occupied system resources, especially system memory or CPU. You may find the following article helpful:
    How to use Activity Monitor - Apple Support
    If the entire system hangs or locks up (for example, if the system clock freezes and stops counting up), you may also be experiencing some variety of Kernel Panic. If that is the case, you may also find this article useful:
    OS X: When your computer spontaneously restarts or displays "Your computer restarted because of a problem." - Apple Support
    Regards,
    - Brenden

  • Volume control when using Apple TV for playing video

    Hi,
    I'm using a pair of active speakers with no built in volume control with my Apple TV. When using the ATV for streaming audio (for example Spotify) I can control the volume with the iOS device I'm using as the source, but not while streaming video. Why is that, and, is there anything I can do about it?
    //J

    does the sound on the pad work for face time when you are using in on the pad, with no apple tv involved?
    If so - apple tv uses a ton of resources.  Facetime uses a ton of resources.  facetime over the TV is hit or miss.
    doulble tap the home button, and see what is in the rask bar.  Close off everything else by touching and holding an icon until they jiggle, the close them by touchinmg the minus sign.

  • When using Appleworks database for printing labels can I have columns of different widths?

    When using Appleworks database for printing labels can I have a column of different width?
    Case in point, the supplied avery labels in Appleworks does not have 8195. When I build one using custom design  I need a small column between column 2 and 3 to line up the info in columns 3 and 4. All the labels are 1.3/4 inch wide but I need to insert a column 1/4 wide to match up with the avery page....
    Any ideas???    
    Thanks......
    ---warren

    Well, the issue is that when you creat a custom width of 1.3/4 from the edge of the first label to the edge of label 2 all is good. The right and left margins were also set correct in AW. The Avery page, for some reason, has a small 1/4 inch column between the columns of label 2 and 3 therefore making the distance between the left edge of the label in column 2 and the right edge of the label in column 3 - a width of 2 inches and not 1.3/4.
    I guess Avery wanted the page to look even.
    I did this work around.....
    I created a custom lay out of 2 columns (not 4) with the correct width of 1.3/4 from label edge to label edge and the correct left side margin. After printing the first page I just turned the sheet 180 degress and printed the 2nd page to use all the labels on the Avery sheet. Since the upper and lower margin were the same it worked great....
    "Great minds think alike"...   thanks for your suggetion

  • securityagent name when using IBM TAM for SSO with Hyerion

    Hi,
    What should we declare in the css_config.xml file for the <securityagent>, when using IBM TAM for SSO with Hyperion.
    The admin guide only mentions Netegrity, but that would be the case when we use Siteminder for SSO.
    Any lights??
    Thanks,
    Sasi

    While, seems one way is to use stream to bypass login.

Maybe you are looking for

  • Adobe support is terrible.  Need a telephone number

    I have an issue that I have not been able to solve via the chat support.   They are terrible!!!!   Is there a support number available?

  • Interval between sound and image!

    Hello all! I didn't see that question on the FAQs or in the most recent topics... On burnt DVDs via iDVD 5.0.1, I surprisingly notice a half-a-second interval between sound and image (the latter earlier), approaching the end of a long movie (45 minut

  • Problem accessing SQL Express 2008 R2 after VS package install

    I've written an application package in Visual Studio 2010 which requires SQL Express 2008 R2. I've also created a separate setup package and set SQL Express as a prerequisite. Everything runs as expected except that after the install on target machin

  • Calling Workflow background process' explicitly in pl/sql code

    Hi All, We have a requirement where we have to call the 'Workflow background process' explicitly in pl/sql code. What we want is that we are having some request that runs via a concurrent program, but before that request completes we want to put that

  • How to setup WPA?

    I'm connected to DSL through a wireless router. How do I set it up so that it requires a password to connect? The router is NETGEAR.