Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

How di i insert multiple selectOneMenu in one html page?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi! i am working with jsf-api-2.1.0 [inside glassh fish 3.1].

I want to display one selectOneMenu for every row in a table.

The options in the selectOneMenu are not the same.

My problem is:
The f:selectItems is been filled corectly, but the h:selectOneMenu that contains the selection that has been made - contains the same instance for all the selectOneMenu that inside in my page.

My question is: How could i add - dynamically - the value of SelectItem to every row of my table?
My code is:


the selectionlist contains ArrayList of the options for the selectOneMenu.

this piece of code is a component inside the next code:
The rowEntities contains the data for the the rows that will be displayed in the table:



What i tried to do - is the next two options:
  • 1.
  • to insert the selected SelectItem with the cc.attrs.currentclass , which is refrence for a SelectItem in the "value" - the class that contains the row.

    But then - the value contains null. Could it however receive a real value?
  • 2.

  • It was not null when i use SelectItem that is a property in another class which is a managed bean, but then it contains the same managed bean for all the records.

    For clarify my self - i want to put a record - or row inside the outer loop, and add the selection box for every row.
    I know how to insert the options for display them, but i do not receive the value that is inside the selectOneMenu.
    It ofcourse working in case of just one record.


    I will happy for any help - sample of code inside a loop that will insert such selection, explnation of how to create the managed bean dynamically for evey row, or any other help.

    After some days of works, thanks from advance for every help.



     
    The first person to drink cow's milk. That started off as a dare from this tiny ad:
    Thread Boost feature
    https://coderanch.com/t/674455/Thread-Boost-feature
    reply
      Bookmark Topic Watch Topic
    • New Topic