You should be able to cast the ones you pass in, but I'm still not totally sure how you're doing this.

Could you send a code snippet or just commit the code you're working on in an inactive state (ie not called by anything)?

BTW, in general for the AJAX stuff my thought was to add new widget elements to the screen definition for new types of UI elements, like an AJAX combo-box that does server-side lookups as the user is typing things in. I think we already have another combobox that is pre- populated when the page is loaded, but I'd rather have these be different in the screen definition XML so that both could be used and it would be easy to switch between them.

In other words, I don't know if there is any place where we would override the default functionality, I'd rather add these as new features with new XML elements (or attributes to extend existing ones) and make them otherwise independent of the existing stuff.

-David


On Feb 15, 2008, at 8:50 AM, Adrian Crum wrote:

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