0

I have a list of Strings in a java bean. In the GUI everytime after clicking a button a new p:SelectOneMenu should be created and the content of Sting list should be populated to it.

By clicking again on the button a second SelectOneMenu should be rendereded. This should be x times possible and x is the size of my String list. It means at the end we will have x SelectOneMenus. In every SelectOneMenu the last selected items should be excluded from the list. So the last one would contain only one item.

Example:

List stringList={foo,bar,baz}

By clicking on the button, the first SelectOneMenu will be rendered which contains foo,bar,baz. the first item "bar" is selected.

The button will be clicked again and a second SelectOneMenu will be rendered which should conrain only foo & baz and so on.

What would be the best and the most elegant way to implement this requirement?

nolazem
  • 45
  • 5
  • You are right. It is somehow generally defined. The part with creation the SelectOneMenu ist actually the most important part for me. What would be the best way to implement it? Shoud we generate it from java? – nolazem Feb 24 '17 at 14:34
  • no how can I create SelectOneMenus by clicking on a button. By each click a new list should be rendered. – nolazem Feb 24 '17 at 15:43

0 Answers0