zopefoundation / z3c.form

An advanced form and widget framework for Zope 3
Other
8 stars 39 forks source link

Fix `orderedselect_input.js` resource #45

Closed icemac closed 8 years ago

icemac commented 8 years ago

Make it usable on browser layers which do not extend zope.publisher.interfaces.browser.IDefaultBrowserLayer.

icemac commented 8 years ago

@thet: You requested code reviews for this package in #40. Would you please review my two pull requests? They are are here waiting for a review for 3 weeks.

thet commented 8 years ago

I'm OK with that change. But I'm curious - how are you using this? When you have z3c.form installed, you should have the browserlayer installed also.

thet commented 8 years ago

LGTM.

icemac commented 8 years ago

@thet: I have a Zope 3 application. My browser skin does not include zope.publisher.interfaces.browser.IDefaultBrowserLayer. So none of the ZMI views are available in the application but only the views I want to be accessible there.

This is the reason why z3c.form.interfaces.IFormLayer does not extend IDefaultBrowserLayer.

thet commented 8 years ago

Ah, now I understand. I have to admit, I didn't review carefully enough. I thought you were removing the layer attribute instead of adding. For the records, no layer attribute makes it implicit using the zope.publisher.interfaces.browser.IDefaultBrowserLayer.

projekt01 commented 8 years ago

@icemac, you are right. Any resource related to z3c.form like the JavaScript must get registeterd for the z3c.form layer. @thet, yes, no layer means IDefaultBrowserLayer layer.

The reason why we use an own z3c.form layer not inherited from BrowserRequest is, that we can use z3c.form with jsonrpc requests not providing the BrowserRequest.