For voting in JIRA:
The code generation feature FB 4 currently has is only really useful for quick throwaway prototyping or very simple forms. The generation should allow you to configure formatting via default templates, AND optionally utilize a dialog box (similar to that used in refactoring but with a few extras) so that you can configure the contents of each generated function and provide appropriate function names according to coding best practices. For example:
-User initiates event handler generation
(Optional, if Codegen dialog is enabled)
-User is prompted with a dialog that allows them to customize the generated function name, and possibly specify whether they need an Event parameter passed to the function. (Default to NO event parameter, but this could be a pre-configured user option.)
-FB utilizes the customized code generation format (customizable by the developer) to generate the new function
If you need a "submitForm()" function and you want both a TextInput's enter action and a button's click action to call it, currently you're better off typing it all yourself, because auto-generation is going to put this long-named function that assumes you need 'event' passed to it. An event:MouseEvent parameter just gets in the way when you also want a TextInput's enter event to call that function, for example. Or perhaps we want to provide a more descriptive name to each handler (via dialog) without assigning IDs to each and every component: "datagrid1_changeHandler" or "button1_changeHandler" doesn't tell us what the function actually does. It's a basic coding best practice to name functions or methods after the actions they actually perform, and in a large application with complex forms auto-generated generic sounding function names are essentially useless from a maintainability standpoint.