[JBoss JIRA] (RF-13101) rich:select Method getSelectInputLabel is not working when using objects
by J W (JIRA)
[ https://issues.jboss.org/browse/RF-13101?page=com.atlassian.jira.plugin.s... ]
J W commented on RF-13101:
--------------------------
I fear i will not be able to provide a reproducer, but let me try to explain what is going wrong here (unfortunately the Person who noticed and fixed this Bug is not available anymore for us):
The if statement in the loop of the mentioned Method looks like this {code} if (value.equals(item.getValue())) { {code}
Whenever we use Cloned Objects this if-statement would return false, although the objects are equal.
To solve this issue we are now comparing the actual String-Values - not the object values, like the current {{item.getValue()}} does - in this method to get the actual label.
Apperently our workarround was updated and i have missed to update it in this issue. Sorry for that. Here is the actual code of this Method:
{code}
public static String getSelectInputLabel(FacesContext facesContext, UIComponent component) {
//RF-Issue: https://issues.jboss.org/browse/RF-13101
//FIX BEGIN
String label = null;
String selectedValue = InputUtils.getInputValue(facesContext, component);
if (selectedValue != null) {
List<ClientSelectItem> convertedSelectItems = getConvertedSelectItems(facesContext, component);
for (ClientSelectItem clientSelectItem : convertedSelectItems) {
if (selectedValue.equals(clientSelectItem.getConvertedValue())) {
label = clientSelectItem.getLabel();
break;
}
}
}
return label;
//FIX END
}
{code}
I hope the Problem is a bit clearer now.
> rich:select Method getSelectInputLabel is not working when using objects
> ------------------------------------------------------------------------
>
> Key: RF-13101
> URL: https://issues.jboss.org/browse/RF-13101
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-input, component-selects
> Affects Versions: 4.3.2, 5.0.0.Alpha1
> Reporter: J W
> Labels: rich:select, select, waiting_on_user
> Original Estimate: 30 minutes
> Remaining Estimate: 30 minutes
>
> The condition of the if-statement in org.richfaces.renderkit.SelectHelper.getSelectInputLabel(FacesContext facesContext, UIComponent component) is not working with the string-representations of the items. If using cloned objects the equals method will return false, even if the items are the same, because the IDs are different.
> The method should use only the strings of the objects, similiar to how MyFaces has solved this (check workarround).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 3 months
[JBoss JIRA] (RF-13250) Extreme memory usage in RF4.3.4.Final and not in RF4.3.3.Final
by Tobias Seppenhauser (JIRA)
[ https://issues.jboss.org/browse/RF-13250?page=com.atlassian.jira.plugin.s... ]
Tobias Seppenhauser commented on RF-13250:
------------------------------------------
This bug has also been seen on our customer systems (using RF 4.3.5 and JBoss 7.1). Thanks to Marcel I was able to reproduce this issue with a small bash script
{code}
#!/bin/bash
echo "Starting the 'long poll of death'! - $(date)"
while true
do
curl http://localhost/ws/__richfaces_push?X-Atmosphere-Transport=long-polling &> /dev/null
sleep 0.1
done
{code}
The used JBoss instance had a max heap size of 2GB. After running the script round about 12hours the server crashed with {{java.lang.OutOfMemoryError: Java heap space}}
> Extreme memory usage in RF4.3.4.Final and not in RF4.3.3.Final
> --------------------------------------------------------------
>
> Key: RF-13250
> URL: https://issues.jboss.org/browse/RF-13250
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.3.4, 4.3.5
> Environment: Gentoo Linux, Tomcat 7.0.39, MyFaces 2.1.12, Tomahawk 1.1.14, RichFaces 4.3.4, APR 1.4.5
> Reporter: Milo van der Zee
> Assignee: Juraj Húska
> Labels: memoryleak
>
> Hello,
> I did an upgrade from RF 4.3.3.Final to 4.3.4.Final and the application started to crash with 'Out Off Memory' errors. I changed the POM back to 4.3.3.Final and the problem is gone.
> I also started seeing this message lot's of times:
> {{WARN org.atmosphere.cpr.AtmosphereResponse - Committed error code 400}}
> I don't know if that has anything to do with the error. I set {{org.atmosphere.cpr.sessionSupport}} to {{true}} and I did not see the message again. But still the application went out-of-memory.
> In the crashed system heap dump I see a lot of:
> - AtomicBoolean (751.000, 15.0MB)
> - ConcurrentLinkedQueue
> - AtmospereRequest$Builder (60.042, 13.8MB)
> To me it looks like it has something to do with Atmosphere. Any ideas?
> Thanks,
> Milo van der Zee
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 3 months
[JBoss JIRA] (RF-13101) rich:select Method getSelectInputLabel is not working when using objects
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13101?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13101:
-------------------------------
Fix Version/s: (was: 4.5-Tracking)
> rich:select Method getSelectInputLabel is not working when using objects
> ------------------------------------------------------------------------
>
> Key: RF-13101
> URL: https://issues.jboss.org/browse/RF-13101
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-input, component-selects
> Affects Versions: 4.3.2, 5.0.0.Alpha1
> Reporter: J W
> Labels: rich:select, select, waiting_on_user
> Original Estimate: 30 minutes
> Remaining Estimate: 30 minutes
>
> The condition of the if-statement in org.richfaces.renderkit.SelectHelper.getSelectInputLabel(FacesContext facesContext, UIComponent component) is not working with the string-representations of the items. If using cloned objects the equals method will return false, even if the items are the same, because the IDs are different.
> The method should use only the strings of the objects, similiar to how MyFaces has solved this (check workarround).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 3 months