Setter never get called in selectManyCheckbox!!

Hello
I posted a topic about selectManyCheckbox / selectItems , but I didnt receive any reply , so
I reviewed earlier threads talking about the same problem:
* setter method NOT CALLED* for selectManyCheckbox :
http://forum.java.sun.com/thread.jsp?forum=427&thread=398097
" ....My page is rendered with all of the correct checkboxes I require.
One for each object in the problemOptions list.
Once I check the boxes I want and submit the form,
I am losing my choices when I come back to the same page.
I noticed that I never see my setter being called.... "
http://forum.java.sun.com/thread.jsp?forum=427&thread=401926
"..if one ore more items are selected, ..... ,
after it called the getter 3 times and the setter not at all.
there is no error message and no stack in any of the logs...."
this is sample of my JSP/backing bean :
JSP :
  <h:selectManyCheckbox  id="foodType" value="#{productBean.foodType}">
        <f:selectItems value="#{productBean.foodTypes}" />
  </h:selectManyCheckbox>
Backing bean class ProductBean :
  private ArrayList foodType = new ArrayList();
  private ArrayList foodTypes = new ArrayList();
public ProductBean()  {
    foodTypes.add(new SelectItem("Sweet","Dweet label","Sweets"));
    foodTypes.add(new SelectItem("desert","Desert label","Deserts"));     
    foodTypes.add(new SelectItem("seeFood","SeeFood label","SeeFoods"));   
  public Object[] getFoodType() {
      try {
        return foodType.toArray(); }
      catch (Exception ex) { return null;  }
  public void setFoodType(Object[] newFoodType) {
    // NEVER GET CALLED !!!
    int len=0;
    if (null == newFoodType || ( len = newFoodType.length)==0 ) {    return; }
    foodType.clear();
    foodType = new ArrayList(len);
    for ( int i=0;i<len;i++) {   foodType.add(newFoodType); }
public ArrayList getFoodTypes() {
return this.foodTypes;
public void setFoodTypes(ArrayList foodTypes) {
this.foodTypes = foodTypes;
what am I doing wrong ? , I'm really stuck , what may be the reason for JSF not to call setter for setFoodType??
I saw a reply for Adam.winner stating that it is not suitable to use Object[] type as setter argument ,
and to use String[] instead, but this was in EA4 .
is this still applicable for JSF 1.0 FR ?
I appreciate any help
-- Erich

The data type of the SelectItem itemValue properties must be the same basic type (primitive or the corresponding boxed type) as the data type of the UISelectMany/UISelectOne value.
In this example, the SelectItem itemValue properties are of type String, but the UISelectMany value is of type Object. Change it to String, and it should work.

Similar Messages

  • Servlet Filter never gets called

    I have a filter configured in web.xml to run on hitting the /welcome.jsf(forward, request).
    I want to update a statistics table with the hit count for login.  But the servlet is not getting called.
    In the debugger, it never stops there and the statistics table never gets updated.

    11.1.2.3
    <filter>
            <filter-name>IBHSLoginStatistics</filter-name>
            <filter-class>gov.samhsa.dasis.isats.view.servlets.filters.IBHSLoginStatistics</filter-class>
        </filter>
    <filter-mapping>
            <filter-name>IBHSLoginStatistics</filter-name>
            <url-pattern>/faces/welcome/*</url-pattern>
            <dispatcher>FORWARD</dispatcher>
            <dispatcher>REQUEST</dispatcher>
        </filter-mapping>
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
    ServletException {
    HttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(false);
    if(session.isNew()) {
    IbhsStatistics ibhsStatistics = new IbhsStatistics();
    ibhsStatistics.setEventDate(new Timestamp(new Date().getTime()));
    ibhsStatistics.setEventType("Login");
    ibhsStatistics.setUserid(SecurityShell.getUserId());
    ManageIbhsStatistics manageIbhsStatistics = new ManageIbhsStatistics();
    try {
    manageIbhsStatistics.saveIbhsStatistics(ibhsStatistics);
    } catch (NamingException e) {
    } catch (NotSupportedException e) {
    } catch (SystemException e) {
    } catch (RollbackException e) {
    } catch (HeuristicMixedException e) {
    } catch (HeuristicRollbackException e) {
    chain.doFilter(request, response);

  • Canvas paint never gets called - Repaint and ServiceRepaints.

    I have a problem that My Canvas never gets Drawn or the Image never gets Displayed;
    I am not sure if there is a DeadLock or If there is nothing to be painted,
    but when I enable the Debugger I notice that it never enters the paint method. ( I call Repaint and ServiceRepaints)
    If however I make the thread that calls setImage external to my Canvas Class the images do get Displayed.
       //Create the Canvas Class, Start Thread Display Canvas
       frame = new ImageCanvas();
        frame.addCommand(exitCommand);
        frame.addCommand(backCommand);
        frame.setCommandListener(this);
        frame.start();
        display.setCurrent(frame);
    //Display Image
    public class ImageCanvas extends Canvas implements Runnable {
    protected void paint(Graphics g) {
      g.drawImage(offscreen, Constants.XPOS, Constants.YPOS,  Graphics.LEFT | Graphics.TOP);
      private void setImage(Image img, String title) {
        this.setTitle(title);
        offscreen = img;
        repaint();
        serviceRepaints();
    public void run() {
         while(true){
           if (Constants.IMGLOCK != null) {
             synchronized (Constants.IMGLOCK) {
                setImage(Constants.IMAGE, title);
                Constants.IMGLOCK.setLockBoolValue(false);
                 image_created = true;
          } else {
               Constants.IMGLOCK.wait(10);
    }

    I found the BUG, But do not understand Why this is Needed to add,
    the Canvas every Time to the Display.
    Can someone please Explain ???
    private void setImage(Image img, String title) {
        this.setTitle(title);
        offscreen = img;
        repaint();
        display.setCurrent(this);  //<<<<<<WHY ????
        serviceRepaints();
      }

  • HTMLHost windowClose never gets called.

    Hi.
    I have a HTMLLoader and set to htmlHost a class extending HTMLHost (ie MyHTMLHost).
    Then I have this code in the class
    public class HelpHTMLHost extends HTMLHost
      override public function windowClose():void
             trace('close');
      override public function updateStatus(status:String):void
       trace("HTML: '" + status + "'");
    Then I load a page that has a
    <center><a href="javascript:alert(window);">test1</a></center>
    <center><a href="javascript:window.close();">close</a></center>
    .. Result is that  "test1" link works (shows alert window). close however deos not.
    the updateStatus method gets called (see two EMPTY strings in trace), windowClose does not get called.
    Using Adobe AIR 2 SDK, WIN 10,1,53,64 - Desktop - Windows 7 debug
    Thanks for the help.

    Same problem here, with AIR 2 SDK.

  • Setter not getting called .

    Hello Experts ,
    I have a Search view with a BOL QUERY object (say A). I enhanced the view and added another BOL DQUERY object(say B).I am putting value in the B fields in the WEB UI , but the setters don't get called with BOL DQUERY object B fields empty always .
    What can be the issue ?
    A quick suggestion would be very much helpful.
    Thanks
    Edited by: samitra on Jul 7, 2010 6:54 PM

    Closing this thread as I have found it myself .

  • ApplicationSessionExpiryFilter never gets called

    I have configured a Filter in the web.xml and I have a filter class.  It doesn't seem to be getting called.  I have a page just for the timeout.
    public class ApplicationSessionExpiryFilter implements Filter {
        private FilterConfig _filterConfig = null;
        public void init(FilterConfig filterConfig) throws ServletException {
            _filterConfig = filterConfig;
        public void destroy() {
            _filterConfig = null;
        public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
                                                                                                         ServletException {
            String requestedSession = ((HttpServletRequest)request).getRequestedSessionId();
            String currentWebSession = ((HttpServletRequest)request).getSession().getId();
            boolean sessionOk = currentWebSession.equalsIgnoreCase(requestedSession);
            // if the requested session is null then this is the first application
            // request and "false" is acceptable
            if (!sessionOk && requestedSession != null) {
                // the session has expired or renewed. Redirect request
                ((HttpServletResponse)response).sendRedirect(_filterConfig.getInitParameter("SessionTimeoutRedirect"));
            } else {
                chain.doFilter(request, response);
    Please help.  We are already in production

    Hi Veena,
    Please mention your Jdev version always,
    https://www.youtube.com/watch?v=qGDevlbSLcw.
    Anyhow, I think this would help you.
    Thanks.

  • Canvas never gets shown (visible) on i85s, emulator works

    Hi,
    I have a class that has two canvases: one is very lightweight and I show it immediately, the other I create in a thread and block on the completion.
    The thread run() method after creating the canvas, does
    a setCurrent(canvas) and I'm able to verify that it occurs. The flag to continue is set and I block again
    on showNotify () which I have a second flag.
    showNotify() on the i85s never gets called though and my game never updates. It does work on the emulator i85s though.
    The code stripped down is like this.
    Class Manager extends TimerTask
    Thread loaderT = null;
    Loader loader = null;
    BigCanvas bc = null;
    Manager() {
    loader = new Loader (this);
    loaderT = new Thread(loader);
    loaderT.start();
    // this method called manager is instantiated
    void start() {
    timer = new Timer(); timer.schedule(this,0,delay);
    setCurrentAndVisible(tmpCanvas);
    // managers run
    void run (){
    if (!loader.done){
    current.repaint(); return;
    // done loading,
    loaderThread = null;
    advanceStates();
    if (bc.visible){ // set when showNotify() called
    bg.repaint();
    class Loader implements Runnable{
    Manager m = null; BigCanvas c = null; done = false;
    Loader(Manager m){
    this.m = m;
    run () {
    m.bc = new BigCanvas();
    m.d.setCurrent(c);
    done = true;
    please note that the classes and methods arent exactly as they are in my code, i just copied what the process was and renamed variables to make sense in a forum-setting. the code all compiles and runs fine in the emulator (so if i misspelled things, or left out of part of method sigs above please dont worry about correcting it), I'm just trying to explain my programming method above not write exactly compiling code.
    TempCanvas and Loader are both inner-classes of Manager also.
    thanks a lot!
    ps. why isnt there a cldc-interest mailing list?
    I find mailing lists easier to keep track of then forums.

    please note,
    setCurrentAndVisible does the following
    setCurrentAndVisible(BaseCanvas c)
    current = c;
    d.setCurrent(current);
    and current is a BaseCanvas in Manager.
    Also in Loader.run() , m.d.setCurrent(c); is actually
    m.setCurrentAndVisible(c);
    thanks!

  • TableSorter class never ever calls getModelToView()

    I am using TableSorter class to sort tables. There is a piece of optimization code that never gets called: getModelToView(). For that method to be called a check is performed (modelToView != null). But modelToView is assigned inside that method! This causes a single cell update to trigger fireTableDataChanged(). Is that a known bug? Is there a fix?

    I see what you mean.. you're right, it seems like modelToView will always be null.
    I found another bug.. when mouse is clicked on the tableheader area where it doesn't have any column (when table is stretched it can have no column there) , columnModel.getColumnIndexAtX(e.getX()) returns -1, and if the check there is not added, then get a runtime out-of-bounds exception on the following line columnModel.getColumn(viewColumn).getModelIndex() because viewColumn is set to -1. See the code snippet below:
    public void mouseClicked(MouseEvent e) {
                JTableHeader h = (JTableHeader) e.getSource();
                TableColumnModel columnModel = h.getColumnModel();
                int viewColumn = columnModel.getColumnIndexAtX(e.getX());
                if(viewColumn == -1) {  // added!
                    return;
                int column = columnModel.getColumn(viewColumn).getModelIndex();

  • I need help resetting my security questions, i try to and it says email sent but i never get the email to my main email or alternate email, i never set my questions but somehow there set

    I need help resetting my security questions, i try to and it says email sent but i never get the email to my main email or alternate email, i never set my questions but somehow there set, so i can also not buy apps without entering my question awnsers please help

    Forgotten Security Questions/Answers
    You need to contact Apple by:
    1 - Use the Express lane and start here:
    https://expresslane.apple.com
    then click More Products and Services>Apple ID>Other Apple ID Topics>Forgotten Apple ID security questions.
    or
    Apple - Support -form iTunes Store - Contact Us
    2 - Call Apple in your country by getting the number from here:
    http://support.apple.com/kb/HE57
    or           
    Apple ID: Contacting Apple for help with Apple ID account security
    3 - Use your rescue email address if you set one up
    Rescue email address and how to reset Apple ID security questions
    For general  information see:
    Apple ID: All about Apple ID security questions

  • When i try to set up my icloud account the system says it is sending me an email to verify.  I never get the email and it is not in my spam filter.  How can i get set up??

    when i try to set up my icloud account the system says it is sending me an email to verify.  I never get the email and it is not in my spam filter.  How can i get set up??

    Make sure that your Apple ID is your email address and you do not have any other or old IDs associated with you. Go to www.appleid.apple.com and confirm this info. Make sure that the email address you are trying to sign up with is your primary one.

  • Getter & Setter Method not getting called for a field enhanced through AET

    Hello,
    I am new to SAP CRM 7.0 and working on a requirement.
    A Z-field was added by our functional guy in CRM 7.0 WebGui through AET in the 'Create Opportunity' transaction (Header data).
    Now the requirement is, as soon as the opportunity is created through the WebGui, I should post a document in R/3 and paste that document number back to the enhanced Z-field in opportunity.
    Work done by me:
    I pressed F2 on the enhanced Z-field in the WebGui screen and took the details of view, component name etc. After this I went to normal SAP CRM system and open tcode "BSP_WD_CMPWB", located the corresponding view "BT111H_OPPT/Details" and right clicked & enhanced the same.
    Then I opened the structure of this view, expanded context node, located context "BTOPPORTH" and inside this, located my Z-attribute. Now right clicked on the Z-attribute & selected the option "Generate SETTER & GETTER Methods" and these were generated successfully.
    Problem:
    The problem is even after putting external break points in these methods, these methods are not getting called while creating, modifying & displaying the Opportunity in WebGui.
    I hope that for the requirements that I have, I have to do the coding in "Getter & Setter" methods. But since these are not getting called, I am unable to proceed.
    Please help/suggest how to achieve this.
    Thanks in anticipation.
    Best Regards,
    Rahul Malani

    Hi,
    If you can see the field in UI and still get_ method is not being triggered then try to regenerate these methods. If it still doesn't work then please look for SAP notes or raise an OSS.
    There should be some note for the issue you faced.
    please refer:
    Help Needed immediately - AET getter setter methods not getting triggered
    Regards,
    BJ

  • My icloud email address is included in a friend's address group set up in Gmail.  When they send an email to the group, the email never gets through to my icloud address - why?

    My icloud email address is included in a friend's address group set up in Gmail.  When they send an email to the group, the email never gets through to my icloud address - why?

    They've always been able to send to me individually - just not when my email is part of a group or even when it's just included with several other addresses added one at a time.

  • I just want to know why money was taken out mi bank account,i still have a itunes balence and used a gift card.id love someone 2 call me about this but i never get thru to you

    i just want to know why money was taken out mi bank account,i still have a itunes balence and used a gift card.id love someone 2 call me about this but i never get thru to you

    This is a User to User Forum... You are not addressing Apple Here...
    Suggest you use this link to Contact iTunes Customer Service
    Apple  Support  iTunes Store  Contact Us

  • ITunes wants security questions that were never set, recovery email never gets reset email

    Ey guys.
    I wan to buy a song but iTunes keeps asking me for verification.
    It comes up with these random questions and I am unable to answer ten because they don't make any sense.
    Fr instance it is asking me what my irate car was.
    Well... I havnt had a car yet :(
    Anyways I try to reset these questions by using the recovery email but I never get the email confirming the reset.
    PLEASE HELP!!!

    Click here for information. If the option to have the answers emailed to you isn't available or doesn't work(the email may take a few hours to arrive), contact the iTunes Store staff via the link in the 'Additional Information' section of that article.
    Nobody on these boards can reset them for you.
    (92372)

  • After creating an apple ID it says it has to verify my email adress and will send an email with a verification link. I never get the email.

    I created an iapple id and it said it had to send me a verification email to verify my email adress. It said ....email sent please click on link. I did this several times and although it says email sent...i never get the email.

    Apple ID security issues -
    Account security issues almost always require you to speak directly to an Apple representative to securely establish your identity as the account holder. You can set it up so that Apple calls you, either immediately or at a time convenient to you.
    1. Go to https://getsupport.apple.com/Issues.do
    2. Choose Other Apple ID Topics and choose the appropriate topic for your issue
    4. Follow the onscreen instructions

Maybe you are looking for

  • Is there a way to deselect all songs in a folder?

    Christmas is done, and I'm ready to put all Holiday music to bed for a year. My Holiday music folder contains an awful lot of albums & songs and it will take me a long time to deselect all of the music one song at a time. (When I use the itunes dj fo

  • Problem with Float - round down error

    I have to save in database (MySql) amount which is passed by user. For instance user writes 99999999999. But Float.parseFloat(request.getParameter("amoUnit")) returns value 9.9999998E10 . When I save this value in database I receive 99999998000.00. I

  • Error 136 Functions that can be compossed must declare a return type

    Hello, I have downloaded the EF Final Release driver and Im working with Oracle 11g express. I have the following Procedure: PROCEDURE ProductosPedido( Datos Out SYS_RefCursor) IS BEGIN OPEN Datos FOR SELECT Nombre, TO_NUMBER(Precio * (SELECT SUM(uni

  • Installing Windows 7 via Bootcamp - your opinions on how large partition size ?

    Hi there, I am installing Windows 7 Professional SP1 on my iMac with the following specs : 27in Core i7 3.5 GHz with 16GB RAM 256 GB flash storage (pure SSD) I will be running the following programs : (In descending order of program size) Adobe Acrob

  • Google fonts not showing in Greek

    Hi Community: Problem is pretty simple. Google fonts are not displayed in Greek text. English text looks fine. Why is that? How can this be fixed? Font mainly used: Roboto Condensed.