I'm working on modifying the screen widgets to support Dojo (or any other third party library). I set up the widgets to get their rendering classes from a factory method instead of using the new operator. The factory method uses the ObjectType.getInstance(...) methods to create the class instances.

Everything works great except for one thing. Some of the rendering classes have constructors that take

javax.servlet.http.HttpServletRequest
javax.servlet.http.HttpServletResponse

arguments. When I use the request and response objects found in the screen widget context as arguments for the ObjectType.getInstance(...) method, an exception is thrown - because the objects don't implement the correct interfaces:

java.lang.NoSuchMethodException: org.ofbiz.widget.html.HtmlFormRenderer.<init>(org.apache.catalina.connector.RequestFacade, org.apache.catalina.connector.ResponseFacade).

Those classes implement the javax.servlet.ServletRequest and javax.servlet.ServletResponse interfaces - which are the super interfaces of the ones needed for the constructor.

I'm stuck. I don't know where to go from here.

Any ideas?

-Adrian

Reply via email to