I have a login composite component that looks like this:<br><br><composite:interface>...</composite:interface><br>...<br><composite:implementation><br> <script type="text/javascript"> <br>
function checkForm(form) {<br> var name = form['#{cc.clientId}:name'].value;<br> var pwd = form['#{cc.clientId}:password'].value;<br> <br>
if (name == "" || pwd == "") {<br> alert("Please enter name and password.");<br> return false;<br> }<br> return true;<br>
}<br> </script><br> ...<br></composite:implementation><br><br>I have components with "name" and "password" component ids in a form in the ... part of the implementation. That works fine.<br>
<br>However, if I pull the JS out into its own file, and do this:<br><br><composite:interface>...</composite:interface><br>
..<br>
<composite:implementation><br> <h:outputScript library="components/login" name="login.js"/><br> ...<br>
</composite:implementation><br><br>h:outputScript puts the JS in the page, but the JS no longer works because the expression cc.clientId evaluates to an empty string.<br><br>That's a bug, is it not?<br><br><br>
david<br>
<br>
<br><br>