RichFaces Java 1.4 Compliance
ahachmann Feb 29, 2008 5:35 AMHello,
I am currently evaluating RichFaces for Use on WebSphere Portal 6.0.
At first I am Simply trying to create a SandBox in order to test on WAS 6.0 an run into some Version Problems.
In the class org.richfaces.component.UIComponentControl my WebApp is running in a NoSuchMethodError when using a rich:componentControl.
In the method getEventString below, RichFaces is calling replace(CharSequence, CharSequence) though this method only exists for tow Char Parameters. This does not run on a Java 1.4 Runtime.
Has anyone a solution for this Problem, or am I missin something? I need to get this Component run on WAS 6.0 in order to go on using RichFaces on WepSphere Portal.
Thank you and regards,
Alexander
public String getEventString() { String targetId = HtmlUtil.idsToIdSelector(getFor()); targetId = HtmlUtil.expandIdSelector(targetId, this, FacesContext.getCurrentInstance()); JSFunction invocation = new JSFunction("Richfaces.componentControl.performOperation"); invocation.addParameter(new JSReference("event")); //FIXME: Maksim //Replacement looks ugly - move that functionality to HtmlUtil invocation.addParameter(targetId.replace("\\\\", "\\")); invocation.addParameter(getOperation()); invocation.addParameter(new JSReference("{" + getEncodedParametersMap() + "}")); invocation.addParameter(Boolean.valueOf(isDisableDefault())); return invocation.toScript(); }
Exception:
Caused by: java.lang.NoSuchMethodError: java.lang.String: method replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; not found at org.richfaces.component.UIComponentControl.getEventString(UIComponentControl.java:53) at org.ajax4jsf.component.EventValueBinding.getValue(EventValueBinding.java:92) at org.richfaces.component.html.HtmlDataTable.getOnRowClick(HtmlDataTable.java:751) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code)) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code)) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code)) at java.lang.reflect.Method.invoke(Method.java(Compiled Code)) at javax.faces.component.UIComponentBase$AttributesMap.get(UIComponentBase.java:1402) ... 61 more