I am implementing infinite scrolling using jquery waypoints and jsf following link . I have prerender for one of the xhtml on which infinite scrolling is required . Now, as waypoint sends ajax request so why for every scroll it is calling prerender that means whole page is getting refeshed. Please let me know how to solve this.
preRenderView is called on every ajax request
5.9k Views Asked by Rahul Singh At
1
There are 1 best solutions below
Related Questions in AJAX
- Ajax jQuery firing multiple time display event for the same result
- Implement Onfailure in webApi controller
- AJAX PHP - Reload div after submit
- ajax load data from mysql
- Ajax-update only a component attribute, not the whole component nor its children
- using ajax to get a php database result and then show the result in a button
- How to prevent browser from executing some JavaScript when person clicks Back button?
- ajax async: true statement execution order
- Rails 4.2 jQuery loads only after refresh
- WebForms GET Json requests (JsonRequestBehavior.AllowGet)
- Rails - Ajax do not work properly on production server
- Angular js Button click
- Make jQuery/AJAX perform instantly on page load
- jQuery Ajax Uncaught TypeError: Cannot use 'in' operator to search
- Show success or error messages in Ajax response to Wordpress custom registration form
Related Questions in JSF
- Strange java.lang.ArrayIndexOutOfBoundsException rendering error in jsf application under high load
- h:outputStylesheet inside ui:repeat
- IntelliJ warns "Cannot resolve variable" on EL variables declared in parent page of include
- How to instantiate a backing bean on page load
- How to disable default keyCode event in Primefaces?
- How to define a style for ul which appears automatically
- How to add '%' symbol in textbox using jsf and jsp?
- Primefaces onkeyPress triggerevent
- h:commandButton action method is not invoked
- f:ajax resetValues="true" does not seem to work
- Primefaces datatable duplicate "No records found" while doing column freeze for empty records
- How to provide a file download from a JSF backing bean using af:commandMenuItem?
- Remove message from h:outputText ofter time
- How to change the position of confirmation box in jsf primefaces?
- commandLink not working when images are in same line
Related Questions in PRIMEFACES
- disable sorting in lineChart series in Primefaces?
- Strange java.lang.ArrayIndexOutOfBoundsException rendering error in jsf application under high load
- backingBean doens't receive commandButton action
- How to disable default keyCode event in Primefaces?
- Primefaces onkeyPress triggerevent
- PrimeFaces Chart not updating with Ajax Requests
- Primefaces datatable duplicate "No records found" while doing column freeze for empty records
- How to change the position of confirmation box in jsf primefaces?
- commandLink not working when images are in same line
- Using multiple FluidGrids in one form
- update cell from primefaces datatable after action invoked
- What are the p:ajax events available for slider component in primefaces
- retrieve value from Parameters Map sent by Javascript Function generated by p:remoteCommand does not work
- Add table plugin to primefaces editor
- How to handle inline image added by user in email client
Related Questions in INFINITE-SCROLL
- Infinite looped vertical slider with no pause
- Angular select scroll event not fired
- QtQuick2 - QML - create infinite moving line animation
- Infinite scroll on single.php with URL change
- RecyclerView deleting item doesn't call OnScrollListener
- Tumblr Like Buttons are Unclickable with Infinite Scroll
- How can I scrape the correct number of URLs from an infinite-scroll webpage?
- Mvc-infinite-scroll package null session
- Meteor pagination: cursor fetch limit with getmore
- How to create multiple Load More buttons on a page (WordPress)
- call a function when user scrolls near bottom of page
- Endless Scrolling Background jumps at certain Viewport sizes
- Detecting when the bottom of a scrollable div has been reached with an offset
- ng-repeat limitTo on page scroll to bottom
- Infinite Scroll: show elements between a range
Related Questions in PRERENDERVIEW
- PreRenderView skipping button action after browser back
- usage of @ManagedProperty in prerender method
- Faces messages not shown when preRenderView event jumps to another view in nested backing bean
- JSF 2 redirect to first page on back button or URL copy paste (no Authentication involved)
- PreRenderView incrementally called on every postback
- Data from <p:dataTable> which is obtained from flash scope during preRenderView event is lost when pagination or sorting is performed
- ui:include includes page before prerender event jsf
- <f:event type="preRenderView"> in template client not invoked
- JSF "cache" some preloaded variables
- jsf dispatch in preRenderView error
- JSF <ui:include> contains page with preRenderView event not trigger in <h:body>
- URL redirection not working on preRenderView event
- Prerender not detecting token with IIS with angularjs
- Filter - Error Rendering View[/Error.xhtml] java.lang.NullPointerException
- How to perform navigation in preRenderView listener method
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You seem to think that the
preRenderViewevent is invoked only once during the construction of the view and not invoked on subsequent requests on the same view. This is untrue. ThepreRenderViewevent is invoked right before rendering of the view. The view is rendered on every request. This also includes ajax requests (how else should it produce the necessary HTML output for ajax requests?). So the behavior which you're seeing is fully expected. You was simply using the wrong tool for the job.You should either be using the
@PostConstructmethod of a@ViewScopedbean,or be adding a negation check on
FacesContext#isPostback()in the pre render view event listenerSee also: