aspose file tools
The moose likes JSF and the fly likes How di i insert multiple selectOneMenu in one html page? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "How di i insert multiple selectOneMenu in one html page?" Watch "How di i insert multiple selectOneMenu in one html page?" New topic
Author

How di i insert multiple selectOneMenu in one html page?

meir kalter
Greenhorn

Joined: Sep 28, 2010
Posts: 1
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.



     
    I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
     
    subject: How di i insert multiple selectOneMenu in one html page?
     
    Similar Threads
    ui:repeat and POST
    JSF + PrimeFace: Validation Error: Value is not valid
    How to create an action listner?
    rich:comboBox problem !
    JSF keeps displaying old values after Validation Phase fails (ignoring actionListeners settings)