[JBoss Seam] - Re: selectManyCheckbox
by JUnkie
I have the same problem with all my other controls. Until now I only needed several <h:selectOneMenu> and could therefore work around the issue by just adding one single <f:selectItem> followed by <s:selectItems> as below. <f:selectItem> just works for me and pre-selects the last selection.
<h:selectOneMenu value="#{client.currency}" required="true">
| <s:convertEntity />
| <f:selectItem itemLabel="#{msg[client.currency.isocode]}" itemValue="#{client.currency}" />
| <s:selectItems value="#{allCurrencies.resultList}"
| var="currency"
| label="#{msg[currency.isocode]}"/>
| <s:validate/>
| </h:selectOneMenu>
I have just seen your latest post. The allPaymentMethods.resultList is generated by a SMPC but I use a default PC in the action session bean. Good hint that I shouldn't mix them! Thanks again, I hope I can fix this issue that starts to get a real problem for me...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069273#4069273
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069273
18Â years, 8Â months
[JBoss Seam] - Re: selectManyCheckbox
by JUnkie
Thanks again Pete.
I have made sure that Client.getPaymentmethods() is called and returns the correct list. It is called for each item in allPaymentMethods.resultList. So if there are three items in allPaymentMethods.resultList the following debug version of Client.getPaymentmethods() returns the output below if the Client has selected two PaymentMethods (MASTERCARD and VISA):
public List<PaymentMethod> getPaymentmethods() {
| for (PaymentMethod p : paymentmethods){
| System.out.println(p.getId() + " " + p.getCode());
| }
| return paymentmethods;
| }
18:21:00,739 INFO [STDOUT] 1 MASTERCARD
18:21:00,739 INFO [STDOUT] 2 VISA
18:21:00,739 INFO [STDOUT] 1 MASTERCARD
18:21:00,739 INFO [STDOUT] 2 VISA
18:21:00,739 INFO [STDOUT] 1 MASTERCARD
18:21:00,739 INFO [STDOUT] 2 VISA
My checkboxes are just empty.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069258#4069258
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069258
18Â years, 8Â months