Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2013
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SelectOneMenu Value not getting set in bean

    Hi All,

    I am using <h:selectOneMenu> in my code for a dropdon with <f:selectItems>

    The problem is strBeanVal bean variable is getting set to blank.

    The Value seen in view source html is as highlighted in blue-

    <option value="2000000000050019@CENTER FOR MEDICINE-0010006770&gt;2502 B E EMPIRE ST*BLOOMINGTON&amp;Illinois%61704&lt;$ManageSoldTo">CENTER FOR MEDICINE-0010001110</option>


    Below is my code
    [\CODE]
    <h:selectOneMenu id="DropDown" value="#{pc_ManageUserPortletView.strBeanVal}"
    onmouseover="this.title=this.options[this.selectedIndex].title">

    <f:selectItems id="itmsUOMSoldTo" value="#{pc_ManageUserPortletView.uomOptions}" />
    </h:selectOneMenu>



    In My Bean:-
    public String getStrBeanVal() {

    return strBeanVal;
    }

    public void setStrBeanVal(String strBeanVal) {

    this.strBeanVal= strBeanVal;
    }
    [\CODE]

    Is the value getting set to blank because of special characters or too many characters in the value??

    Any help is appreciated.

    Thanks in advance
    Last edited by omkargit101; 07-22-2013 at 03:03 PM. Reason: Additional code added

  • #2
    New Coder
    Join Date
    Jun 2013
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This works fine with

    <option value="2000000000050019">CENTER FOR MEDICINE-0010001110</option>


    But not with highlighted value in blue in previous post

    Thanks
    Omkar

  • #3
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    I don't do JSP, but it sounds like you just need to encode your url. In Java, you can use the java.net.URLEncoder class, and invoke the encode() method on it.
    Length wise, I don't believe that the HTTP specs limit the length of a field value. There is an overall limitation though when using GET, which I think is upwards of 65K characters (used to be low, like unsigned byte low).
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •