-
1. Re: inplaceSelect does not display the bean property value
ststroppel Jan 15, 2009 7:17 AM (in response to ststroppel)Here's the code:
<rich:inplaceSelect value="#{AirportBean.selectedAirport}" style="width: 85%" openOnEdit="true" showControls="true" editEvent="onclick" layout="block"> <f:selectItems value="#{AirportBean.airports_select}" /> </rich:inplaceSelect>
-
2. Re: inplaceSelect does not display the bean property value
ilya_shaikovsky Jan 15, 2009 9:40 AM (in response to ststroppel)I've checked at richfaces-demo environment and it wasn't reproduced on my side. About your war - I seems broken. I'm getting error trying to browse files inside.
-
3. Re: inplaceSelect does not display the bean property value
ststroppel Jan 15, 2009 10:26 AM (in response to ststroppel)"ilya_shaikovsky" wrote:
About your war - I seems broken. I'm getting error trying to browse files inside.
You're right. I uploaded a new file:
http://rapidshare.com/files/183699991/InplaceSelect.war.html
(this one should work :))
I use my inplaceSelect inside a richtable. Perhaps this is the problem... -
4. Re: inplaceSelect does not display the bean property value
nbelaevski Jan 15, 2009 11:44 AM (in response to ststroppel)Thank you for reporting the issue! I've created a bug: https://jira.jboss.org/jira/browse/RF-5758
-
5. Re: inplaceSelect does not display the bean property value
ststroppel Jan 15, 2009 12:32 PM (in response to ststroppel)Thank you :)
-
6. Re: inplaceSelect does not display the bean property value
marvm Jan 15, 2009 12:50 PM (in response to ststroppel)I think I'm having the same problem but with a little difference:
I use <s:selectItems> and <s:convertEntity> (with Seam 2.1.1.GA).
The box is filled with entries but assigned values are not selected (that seems to be the same issue).
Maybe this has to be considered when somebody fixes that issue ;) -
7. Re: inplaceSelect does not display the bean property value
ilya_shaikovsky Jan 16, 2009 4:25 AM (in response to ststroppel)https://jira.jboss.org/jira/browse/RF-5757 was also created earlier but I forgot to comment it out :) Sorry :)
-
8. Re: inplaceSelect does not display the bean property value
vidda Oct 13, 2009 11:14 AM (in response to ststroppel)Hi :)
One doubt, I have this problem with Richfaces 3.3.1GA, and I am in doubt because JIRA 5757 says it is fixed on 3.3.1 version.
I have also tested with 3.3.2GA and the same problem is present.
The problem is this:<rich:inplaceSelect id="ris_f_i2" value="#{advancedCatalogingAction.testChar}" showValueInView="true"> <f:selectItem itemValue="1" itemLabel="1 label Char"/> <f:selectItem itemValue="2" itemLabel="2 label Char"/> <f:selectItem itemValue="3" itemLabel="3 label Char"/> <f:selectItem itemValue="4" itemLabel="4 label Char"/> </rich:inplaceSelect>
testChar is a bean property of char type that I am creating with a '1' value. InplaceSelect doesn't select any Item when page rendered. Then I have select any option and InplaceSelect shows selected option, but when the component load for the first time, it doesn't select "1" option.
Although, if the test code is this the same but using 'testString' (of String type) instead 'testChar', it works perfect. It seems InplaceSelect continue having problems with property values that isn't String type.
And another test that I have checked is with testInt and testInteger. The same problem happens on both cases.
Please, any comments about it? :). Thanks! :) -
9. Re: inplaceSelect does not display the bean property value
nbelaevski Oct 13, 2009 3:12 PM (in response to ststroppel)Hi,
Have you tried creating instances of SelectItem programmatically? -
10. Re: inplaceSelect does not display the bean property value
vidda Oct 14, 2009 3:43 AM (in response to ststroppel)"nbelaevski" wrote:
Hi,
Have you tried creating instances of SelectItem programmatically?
Yes, actually my real code is more complex but because I have this error, I tried with simply code using different type for the bean attribute of the InplaceSelect value.
In my real code I use seam tag selectItems to create programmatically the instances. The code is this:<rich:inplaceSelect id="ris_f_i1" value="#{data.indicator1}" showValueInView="true"> <s:selectItems value="#{fieldInformation[data.tag].getInfoForChild('I1').possibleValues}" var="option" label="#{option.value}" itemValue="#{option.value}"/> </rich:inplaceSelect>
In this code, the same problem happens. But I have realized one thing.... on selectItems, option.value actually is a String type. I have change it now for "option.getValue().chatAt(0)" and with this, code works! :o
Ok... it's my fault, sorry :(. If type of ItemValue isn't the same of InplaceSelect value property, the select doesn't work. But.... one question, with different type (String vs char) first select doesn't work, but then, why clicking a option works well and assign values correctly? Can richfaces InplaceSelect component should implements this behaviour to select correctly at the begining?
And I have another question with InplaceSelect and 'onchange' event that doesn't works me well. I read yesterday about a bug with this event on Inplaces component. Maybe I should question that on the right thread. I will search it and I'll post question there :).
Thanks for all :) -
11. Re: inplaceSelect does not display the bean property value
nbelaevski Oct 14, 2009 6:27 AM (in response to ststroppel)Ok... it's my fault, sorry :(. If type of ItemValue isn't the same of InplaceSelect value property, the select doesn't work. But.... one question, with different type (String vs char) first select doesn't work, but then, why clicking a option works well and assign values correctly? Can richfaces InplaceSelect component should implements this behaviour to select correctly at the begining?
Have you tried this with h:selectOneMenu? -
12. Re: inplaceSelect does not display the bean property value
vidda Oct 14, 2009 7:20 AM (in response to ststroppel)"nbelaevski" wrote:
Ok... it's my fault, sorry :(. If type of ItemValue isn't the same of InplaceSelect value property, the select doesn't work. But.... one question, with different type (String vs char) first select doesn't work, but then, why clicking a option works well and assign values correctly? Can richfaces InplaceSelect component should implements this behaviour to select correctly at the begining?
Have you tried this with h:selectOneMenu?
Yes, and it works fine. For example, with data.indicator1 with value = '2', h:selectOneMenu selects the exact element on the list. With rich:inplaceSelect, selection remains 'void'. -
13. Re: inplaceSelect does not display the bean property value
vidda Oct 14, 2009 7:33 AM (in response to ststroppel)"Vidda" wrote:
"nbelaevski" wrote:
Have you tried this with h:selectOneMenu?
Yes, and it works fine. For example, with data.indicator1 with value = '2', h:selectOneMenu selects the exact element on the list. With rich:inplaceSelect, selection remains 'void'.
One comment more. I have seen that with h:selectOneMenu and one example with data.indicator1 value='' (a value that it doesn't exist on item list), when the page is rendered, data.indicator1 value is equals to the first element on item list.
This is another difference with InplaceSelect. I am not telling that JSF component is better ;), only that it behaviour is different.
Finally I think I will use h:selectOneMenu, because the problem with onchange event commented on JIRA RF-7079 (https://jira.jboss.org/jira/browse/RF-7079) :(
Thank you! -
14. Re: inplaceSelect does not display the bean property value
ilya_shaikovsky Oct 14, 2009 7:46 AM (in response to ststroppel)you could use onviewactivated currently instead of onchange.