[
https://issues.apache.org/jira/browse/SLING-397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bertrand Delacretaz resolved SLING-397.
---------------------------------------
Resolution: Fixed
Patch committed in revision 652268
> Generate javascript wrapper methods from specific interfaces automatically
> --------------------------------------------------------------------------
>
> Key: SLING-397
> URL: https://issues.apache.org/jira/browse/SLING-397
> Project: Sling
> Issue Type: Improvement
> Components: Scripting
> Reporter: Bertrand Delacretaz
> Assignee: Bertrand Delacretaz
> Attachments: SLING-397.patch
>
>
> As discussed http://markmail.org/message/nrnuw2gad5z5wupx, it would be useful
> to have a way to autogenerate javascript wrappers, while allowing some
> methods to be customized.
> Here's the proposed method, from that thread:
> a) ScriptableNode (or any other javascript wrapper class) implements a
> finishInit() method that's called by ScriptableNode.defineClass [1] after all
> jsfunction_ etc. have been processed.
> b) finishInit uses reflection on the Node interface to define all methods
> that haven't been defined yet. The "not defined yet" condition looks a bit
> tricky but doable.
> This can probably be implemented in a base JavascriptWrapper class.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.