-
1. Re: ComboBox does not submit initial value
ilya_shaikovsky Apr 21, 2008 10:10 AM (in response to arvhatte)We have initial requirement which tells to submit only value which was selected/typed by user. Initial value should be only shown and equals null in case of submit.
-
2. Re: ComboBox does not submit initial value
ilya_shaikovsky Apr 21, 2008 10:12 AM (in response to arvhatte)It's just "Rich" appearance for empty input. But actually it's empty.
-
3. Re: ComboBox does not submit initial value
arvhatte Apr 21, 2008 10:44 AM (in response to arvhatte)Hi Ilya,
Are you referring to the 'defaultLabel' attribute of the combobox component? I know this attribute is used for setting a text on the combobox like 'Please select a value' and that that text isn't submitted and therefore is, like you said, a "Rich" appearance for an empty input.
In my post, though, I'm referring to the 'value' attribute. I'm under the assumption that when setting this attribute, the value should be shown and also submitted even without having to (re)select it. OR am I wrong in this assumption, is the combobox behaving differently then most of the other JSF (and RichFaces) input components?
My form that contains the combobox represents an entity on the server side and the entity's values are shown in all kinds of RichFaces input components. If the user wants to change one or more of the values, he/she changes them and presses submit. In case of the combobox the entity's fields are cleared now when the user does not atleast set the focus on the combobox before submitting, a behaviour which of cours is unwanted in my case.
Cheers,
Tim -
4. Re: ComboBox does not submit initial value
ilya_shaikovsky Apr 21, 2008 11:19 AM (in response to arvhatte)Ok... sorry.. got it.
http://jira.jboss.com/jira/browse/RF-3162 -
5. Re: ComboBox does not submit initial value
arvhatte Apr 21, 2008 12:09 PM (in response to arvhatte)Great. And I see it is/was already fixed in the trunk a couple of days ago, perfect.
Thanks RichFaces team ! -
6. Re: ComboBox does not submit initial value
danliang Apr 24, 2008 11:35 AM (in response to arvhatte)Tim,
I am attempting a similar thing in where I want to "pre-populate" the comboBox with some value.
How did you go about setting the 'value' attribute?
Thanks
Dan -
7. Re: ComboBox does not submit initial value
danliang Apr 24, 2008 5:06 PM (in response to arvhatte)Well, not sure how I missed the attribute "value" in the rich faces tag... either way - figured it out...
-
8. Re: ComboBox does not submit initial value
ststroppel Nov 4, 2008 4:46 AM (in response to arvhatte)In my post, though, I'm referring to the 'value' attribute. I'm under the assumption that when setting this attribute, the value should be shown and also submitted even without having to (re)select it. OR am I wrong in this assumption, is the combobox behaving differently then most of the other JSF (and RichFaces) input components?
I've the same problem but in the case the attribute value is not in the combobox list. In the case the attribute value is in the combobox list, it works fine.
My idea is to use for example a list of countries to select, but if the passed value is not yet in my combobox, it should be saved as new item in database.
I'm using RichFaces version 3.2.2. -
9. Re: ComboBox does not submit initial value
ilya_shaikovsky Nov 4, 2008 5:18 AM (in response to arvhatte)ststroppel, actually we could not figure out you problem using "i have the same problem" description... problem could not be the same because previous posts inform us about the successfull usage.. So just add you code snippets and we wil check your case separatelly.
-
10. Re: ComboBox does not submit initial value
ststroppel Nov 4, 2008 5:44 AM (in response to arvhatte)"ilya_shaikovsky" wrote:
ststroppel, actually we could not figure out you problem using "i have the same problem" description... problem could not be the same because previous posts inform us about the successfull usage.. So just add you code snippets and we wil check your case separatelly.
you're right.
here's the code snippet:<rich:dataTable rowKeyVar="rkv" frozenColCount="2" width="100%" id="flugbuchungList" columnClasses="col" sortMode="single" value="#{Reisebericht.flugbuchungen}" var="flug"> <rich:column id="abflughafen"> <f:facet name="header"> <h:outputText styleClass="headerText" value="Abflughafen" /> </f:facet> <rich:comboBox id="abflugflughafen" value="#{flug.abflugflughafen.findName}" suggestionValues="#{FlughafenBean.flughaefenString}" directInputSuggestions="true" required="true"> </rich:comboBox> </rich:column> </rich:dataTable> <h:commandButton id="submit" value="Sichern" action="#{Reisebericht.save}" />
and here's a screenshots to demonstrate the problem:
[img]http://img354.imageshack.us/img354/7980/screenshotco1.jpg[/img]
the value "Echterdingen" is not part of the combobox list, but is passed by my bean. so it does not submit this value.
if i add the value "Echterdingen" to the combobox list, it works. -
11. Re: ComboBox does not submit initial value
ilya_shaikovsky Nov 4, 2008 5:57 AM (in response to arvhatte)the value "Echterdingen" is not part of the combobox list, but is passed by my bean. so it does not submit this value.
Not sure that understand you right.
I've created simple sample:<h:form> <rich:dataTable value="#{capitalsBean.capitals}" var="cap" rows="20" reRender="ds" id="simpletable"> <f:facet name="header"> <rich:columnGroup> <rich:column colspan="2" > <h:outputText value="Filtering Example"/> </rich:column> <rich:column breakBefore="true"> <h:outputText value="State Name"/> </rich:column> <rich:column> <h:outputText value="State Capital"/> </rich:column> </rich:columnGroup> </f:facet> <rich:column filterBy="#{cap.state}" filterEvent="onkeyup"> <f:facet name="header"> <h:outputText value=" " title="Hack due to bug. Shuold be remoevd till release"></h:outputText> </f:facet> <h:outputText value="#{cap.state}"/> </rich:column> <rich:column filterBy="#{cap.name}" filterEvent="onkeyup" styleClass="lastcolumn"> <rich:comboBox value="#{cap.name}" suggestionValues="#{capitalsBean.capitalsNames}"> </rich:comboBox> </rich:column> <f:facet name="footer"> <rich:datascroller id="ds" renderIfSinglePage="false"></rich:datascroller> </f:facet> </rich:dataTable> <h:commandButton /> <rich:messages></rich:messages> </h:form>
After entering sometyhing which not in list and submit click - all is ok. Messages empty. Value applied and shown... -
12. Re: ComboBox does not submit initial value
ststroppel Nov 4, 2008 6:15 AM (in response to arvhatte)You don't.
in my case, I don't enter the value, it is passed by the value-attribute of the combobox. If I don't change this value or select another, the value does not submit.<rich:comboBox id="abflugflughafen"
value="#{flug.abflugflughafen.findName}"
suggestionValues="#{FlughafenBean.flughaefenString}"
directInputSuggestions="true" required="true">
</rich:comboBox> -
13. Re: ComboBox does not submit initial value
ilya_shaikovsky Nov 4, 2008 6:30 AM (in response to arvhatte)ok.. please share simple war sample with us please.. you could send me directly or just upload somewhere.
-
14. Re: ComboBox does not submit initial value
ststroppel Nov 4, 2008 6:54 AM (in response to arvhatte)Hey, here it is :)
http://rapidshare.com/files/160545515/Combobox.war.html