Add script merge similar to head/tail merge
Problem:
On heavily JavaScript based forms (sections appearing/enabling depending on user input) it is good practice to outsource form creation code to widget/component classes (homegrown). It improves readability of Snippet code and reusability of widgets. For event registration and other client side code, each component class would generate a head/lift:tail and a script tag. While head/tail tags are merged by the Lift framework, the resulting HTML code still remains cluttered with script tags (example below).
Suggested solution:
Introduce a script merge that similarly to head/tail merge merges all script tags in head into one and all script tags in tail into a second one.
On heavily JavaScript based forms (sections appearing/enabling depending on user input) it is good practice to outsource form creation code to widget/component classes (homegrown). It improves readability of Snippet code and reusability of widgets. For event registration and other client side code, each component class would generate a head/lift:tail and a script tag. While head/tail tags are merged by the Lift framework, the resulting HTML code still remains cluttered with script tags (example below).
Suggested solution:
Introduce a script merge that similarly to head/tail merge merges all script tags in head into one and all script tags in tail into a second one.
Leave a comment
on 2010-02-06 19:48 *
By github.importer
Imported from GitHub: http://github.com/dpp/liftweb/issues/95/find