2009/5/11 Kito Mann <span dir="ltr"><<a href="mailto:kito.mann@virtua.com">kito.mann@virtua.com</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
David, you may want to file this as a feature request for 2.0 maintenance or 2.1. It should be possible to associate a resource request with a particular view id and component.</blockquote><div><br>Good idea, Kito. I agree that it should be possible, and if so, we should probably do it.<br>
<br><br>david<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5"><br><br><div class="gmail_quote">
On Mon, May 11, 2009 at 10:54 AM, Ryan Lubke <span dir="ltr"><<a href="mailto:Ryan.Lubke@sun.com" target="_blank">Ryan.Lubke@sun.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>On 5/11/09 7:40 AM, David Geary wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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>
</blockquote></div></div>
No, I don't believe it is. The javascript file will be served in a separate request. There is no way to determine the<br>
component at that time.<br>
<br>
I haven't tried it, but I wonder if the flash could be used here?<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
david<br>
<br>
<br>
<br>
</blockquote>
</blockquote></div><br>
</div></div></blockquote></div><br>