File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[JSF 2] Ajax : where is jsf.js ?

 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
one of the ways to do Ajax with JSF 2 is to use this tag :


But where is the JavaScript library jsf.js located ?

Thanks
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17616
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your guess is as good as mine. Core JSF doesn't have any JavaScript support in it at all. The closest it comes is in propagating the javascript attributes of controls down into their corresponding generated HTML.

JavaScript-supporting JSF extensions such as Tomahawk and RichFaces often don't have an actual JavaScript file. Instead they dynamically generate the javascript that they want to match that ".js" URL. Which is one of the reasons I keep crying out that a Web server is not a File server. Just because you send something to the server that looks like a filepath doesn't mean that it will return a file. That's why they're called Uniform Resource locators and not File locators.

Usually the generated JavaScript is customized based on the application environment and/or what version/brand of web browser is making the request, so it's not a static item.
 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I got the answer :
it is located inside jsf-impl.jar, in the folder META-INF\resources\javax.faces
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17616
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Celinio Fernandes wrote:Well, I got the answer :
it is located inside jsf-impl.jar, in the folder META-INF\resources\javax.faces


... Proving once again that as long as I work with computers I need never worry about if I'll end up looking like an idiot. It's dangerous to "know" things in a field where everything's always changing.

jsf.js is new to JSF2, however. It doesn't exist in JSF1.2 and earlier.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic