I need to execute a JSF managed bean action method using ajax during HTML DOM load event, similar to jQuery's $(document).ready(function() { $.ajax(...) }). I can only use the JavaScript generated by JSF in this project. Is there a way to do it...
Problem: Sometimes you will want to access a component from javascript with getElementById, but id's are generated dynamically in JSF, so you need a method of getting an objects id.  I answer below on how you can do this.    Original Question:...
As an extension of this question, I'm trying to insert Javascript to a <h:commandButton />'s onclick property as action is already rendering an ajax table.  What I want to do: Get the selected items in a list box and turn them into pa...
I'm preparing some variables in JavaScript (in my specific case, I'd like to get GPS location):  function getVars() {     // ...     var x = locationInfo.lng;      var y = locationInfo.lat; }   I'd like to send them to my managed bean v...
How can I make an ajax request that updates a <h:dataTable> from javascript? I am currently loading the initial data using @Postconstruct but that is significantly delaying the initial page load.  I am thinking about using onload event of <...
I've a PrimeFaces web application. When I manually add jQuery and plugins like below,  <script type="text/javascript" src="js/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="js/oneby...
Sometimes, I need to render a JavaScript variable using EL in a JSF page.  E.g.  <script>var foo = '#{bean.foo}';</script>   or  <h:xxx ... onclick="foo('#{bean.foo}')" />   This fails with a JS syntax erro...
I would like to use in my project highcharts and jsf both. I have a managedbean, which has a list and it is initializing by a facade (it do a query in my database). If I'd like to pass the value of the list to highcharts, how can do this? if anyo...
I'm using primefaces 5.2 latest version and tried for line chart, it's working fine.  Am trying to change the line chart axes color,background,border, etc. but extender attribute is not working in latest primefaces version.  My XHTML:   <p...
While analyzing the performance of a JSF 2.1 + PrimeFaces 4.0 webapp with Google PageSpeed, it recommends among others to defer parsing of JavaScript files. On a test page with a <p:layout> and a form with <p:watermark> and <p:fileUplo...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.