0

I'm trying to make a CheckboxMenu with a pair of selectItems (String, integer) to be able to assign to each selected main item (a String) a number (an integer), I'm imagining something like a pair of ** ** instead of just one but if you have any other suggestions that would accomplish what I want it would be great:)

here is code :

<p:selectCheckboxMenu id="offres" value="#{helloBean.selectedOffres}" style="width:150px;height:30px" filter="true" filterMatchMode="startsWith" panelStyle="width:300px" label = "Liste Offres" >
                                <f:selectItem itemLabel="9 Affaire" itemValue="9 Affaire" />
                                <f:selectItem itemLabel="9 Affaire Pro" itemValue="9 Affaire Pro" />
                                <f:selectItem itemLabel="9 Avantage" itemValue="9 Avantage" />
                                <f:selectItem itemLabel="9 Business Internet" itemValue="9 Business Internet" />
                                <f:selectItem itemLabel="9 Business Téléphonie" itemValue="9 Business Téléphonie" />
                                <f:selectItem itemLabel="9 Online ADSL" itemValue="9 Online ADSL" />                        
                            </p:selectCheckboxMenu>

Thanks

Jasper de Vries
  • 19,370
  • 6
  • 64
  • 102
KamyKam
  • 3
  • 3
  • KamyKam, advice for your future JSF questions, please don't tag JSF questions with [java], otherwise you will get knee-jerk "answers" from newbs which would only confuse you. Below answer of Ravi is such one. Ignore it. Only use [java] tag when you have a question/problem which is demonstrable using a plain Java application class with `main()` method. In such case, the Java EE related tags such as [jsf] should be removed. – BalusC Oct 01 '16 at 08:03
  • thanks for you advice :) – KamyKam Oct 03 '16 at 08:25
  • @BalusC Please could you lead me to the existing question ... cant' find it :( thanks in advance :) – KamyKam Oct 03 '16 at 09:22

1 Answers1

-1

Get the checkbox selected value as array like.

String[] values = request.getParameters("name");
Ravi Thapa
  • 79
  • 1
  • 7