10 Aug 19:22
Re: Adding a javascript event handler to a widget
Kamal Gill wrote:
> Hi Dorneles,
>
> Thanks for your reply. Here are my thoughts on how HTML/XML attributes
> should be handled in AT.
>
> If the attributes property is currently a placeholder for some desired
> functionality, perhaps it could be used to allow *any* HTML/XML
> attribute to be generated by the widget. My proposal is to allow the
> attributes property of the widget to be passed as a dictionary to the
> generator, as in the following example...
>
> schema = BaseSchema + Schema((
> StringField('Field_ID',
> widget=StringWidget(label='some_label ',
>
> attributes={'onFocus': 'select()', 'onChange': 'someJSfunction()',
> 'anyXMLattribute': 'anyXMLattributeValue'},
>
> description='some_description'),
> ),
>
> The flexibility of this approach may even allow TAL statements to be
> added to widgets. Does this sound reasonable?
+1
Please provide a patch against the latest 1.3 branch.
Christian
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
RSS Feed