In case if aui:script should be rendered only during some AJAX request it will not be rendered at all. After
FACES-1466 will be fixed this issue will have a workaround - use of position="inline" attribute.
I see two possible fixes:
- Force inline script rendering for AJAX calls