[Zope3-Users] vary formlib render_submit_button by skin
Leonardo Rochael
leo at enfoldsystems.com
Wed Apr 18 16:54:47 EDT 2007
Hi,
I was looking at formlib and I found that If i want to customize widgets per
skin, I just have to register their view to a different type, e.g.:
<view
type="zope.app.skins.myskin"
for="zope.schema.interfaces.ITextLine"
provides="zope.app.form.interfaces.IInputWidget"
factory=".xmlformlib.XMLTextWidget"
permission="zope.Public"
/>
where "zope.app.skins.colskin" comes from:
<browser:skin
name="myskin"
layers="mylayer default"
/>
However I found no such way of customizing the render_submit_button adapter
per-skin. All examples I found of the action renderer declarations are like
(taken from Five):
<configure
package="zope.formlib"
xmlns="http://namespaces.zope.org/zope"
xmlns:i18n="http://namespaces.zope.org/i18n"
i18n_domain="zope.formlib">
[...]
<adapter
factory=".form.render_submit_button"
name="render"
/>
[...]
Which leads me to think that I either have to override the adapter or have
my actions implement a more specialized interface than the default actions
so that I can configure my action renderer to it (or, what is simpler and
what I ended up doing, hardcode the rendering of actions in the form
template).
Is there any way of specializing the action rendering per-skin? I expect
there to be one since it's html generation, which should be skinnable.
Cheers, Leo
--
View this message in context: http://www.nabble.com/vary-formlib-render_submit_button-by-skin-tf3603242.html#a10066456
Sent from the Zope3 - users mailing list archive at Nabble.com.
More information about the Zope3-users
mailing list