-
1. h:selectOneMenu is setting null to bean property inside modal panel
ilya_shaikovsky Apr 15, 2011 10:32 AM (in response to ainanmis)do you have form?
add rich:messages to the page to see if validation and conversion are passed.
-
2. h:selectOneMenu is setting null to bean property inside modal panel
ainanmis Apr 15, 2011 2:34 PM (in response to ilya_shaikovsky)I noticed a validation that doesn't correspond to a rich:messages. The problem seems to be releated with validation. I can't test it now, but I am going to try after a few days. thanks.
-
3. h:selectOneMenu is setting null to bean property inside modal panel
ainanmis Apr 18, 2011 2:41 AM (in response to ainanmis)Unfortunately, the problem stil exists. I don't understand why selected value is null in setter method of releated bean property.
my code part below.
<rich:popupPanel id="popupTeminat" modal="true" resizeable="true" minWidth="200"
onmaskclick="#{rich:component('popup')}.hide()">
<f:facet name="header">
<h:outputText value="Kullanılan teminat detayı" />
</f:facet>
<f:facet name="controls">
<h:outputLink value="#"
onclick="#{rich:component('popupTeminat')}.hide(); return false;">
X
</h:outputLink>
</f:facet>
<h:panelGrid columns="2">
<h:outputText value="Sıra No"></h:outputText>
<h:outputText value="1"></h:outputText>
<h:outputText value="Teminat Adı"></h:outputText>
<h:selectOneMenu id="tem2" value="#{provizyonBean.teminat}" >
<f:selectItems value="#{provizyonBean.teminatList}"/>
</h:selectOneMenu>
<h:outputText value="Talep Edilen Tutar"></h:outputText>
<h:outputText value="0"></h:outputText>
</h:panelGrid>
<h:commandButton value="İhbara Geri Dön"
onclick="#{rich:component('popupTeminat')}.hide(); return false;">
</h:commandButton>
<a4j:commandButton value="Değişiklikleri Kaydet" render="teminatTablosu" execute="popupTeminat" action="#{provizyonBean.teminatEkle}" />
</rich:popupPanel>
-
4. h:selectOneMenu is setting null to bean property inside modal panel
iabughosh Apr 18, 2011 3:52 AM (in response to ainanmis)Hi Abdulkerim,
make sure that you are putting the rich:popupPanel inside a form , if that doesn't work try to change your a4j:commandButton execute attribute to
execute="tem2"
-
5. h:selectOneMenu is setting null to bean property inside modal panel
ainanmis Apr 18, 2011 4:07 AM (in response to iabughosh)Hi,
There is a form. I tried execute="tem2", but it didn't work again
-
6. h:selectOneMenu is setting null to bean property inside modal panel
iabughosh Apr 18, 2011 4:07 AM (in response to ainanmis)how about adding this to the popup
domElementAttachment="form"
-
8. Re: h:selectOneMenu is setting null to bean property inside modal panel
ainanmis Apr 18, 2011 4:53 AM (in response to ilya_shaikovsky)I tried two option that you said for solution , but they didn't work. I am using tab panel . maybe the problem is related with other tabs. Also, I am sure there are not any validation errors.
-
9. Re: h:selectOneMenu is setting null to bean property inside modal panel
ainanmis Apr 18, 2011 10:04 AM (in response to ainanmis)Ibrahim gived some advices and then I put teh popup in an another form and I added domElementAttachment="form". Now I am getting conversion error. Error is below.
Conversion Error setting value 'TeminatBilgileriType@1085e63' for 'null Converter'.
My component :
<h:selectOneMenu id="tem2" value="#{provizyonBean.teminat}" >
<f:selectItems value="#{provizyonBean.teminatList}"/>
</h:selectOneMenu>
-
10. Re: h:selectOneMenu is setting null to bean property inside modal panel
iabughosh Apr 18, 2011 10:09 AM (in response to ainanmis)what is the type of #{provizyonBean.teminat} & #{provizyonBean.teminatList} ??
-
11. Re: h:selectOneMenu is setting null to bean property inside modal panel
ainanmis Apr 18, 2011 10:36 AM (in response to iabughosh)1 of 1 people found this helpfulteminatList is a list of SelectItem . teminat is a class . SelectItem have value type is the same with teminat
-
12. h:selectOneMenu is setting null to bean property inside modal panel
iabughosh Apr 18, 2011 4:14 PM (in response to ainanmis)i think that is your problem, when you map h:selectOneMenu value to a non-string or an Object value you need a JSF converter to solve this issue.
-
13. Re: h:selectOneMenu is setting null to bean property inside modal panel
ainanmis Apr 18, 2011 4:51 PM (in response to iabughosh)I can display objects with label attribute of SelecItem and I am keeping objects in value attribute of SelecItem.
Ibrahim , ı am trying to implement a custom converter. I am accesingHTMLSelectOnemenu component in conversion method. How can ı take object value from it. I used getSubmittedValue() , but it returned string value. Also, in another example, It did not need a converter.
-
14. Re: h:selectOneMenu is setting null to bean property inside modal panel
iabughosh Apr 18, 2011 5:07 PM (in response to ainanmis)see this example for creating JSF 2 converter: