Jquery Waypoints refresh one waypoint - jquery-waypoints

Using Waypoints (http://imakewebthings.com/waypoints) Jquery version, how do you do a refresh of one single waypoint (not all)? I have two waypoints, and only want to refresh one of them. Doable?
Thanks!

Not doable. You must refresh all waypoints in a Context at the least. I'm curious, why would you not want to refresh a waypoint?

Related

Xamarin Clear many items in grid

I have a grid but it have So many childrens ( Like 800-900 ) And when i press refresh button it must refresh all childrens like delete olds and create new ones. When i use grid.Children.Clear()
its take so long time for clear all and create new ones. How can i fix it ? when i google it they say create new grid instead of use children.clear but how can i dispose first one ? How can i refresh my datas faster when i click button ? I need help about it . Thanks for helpings!
Why do you produce children? You can use CollectionView for good performance.. also the features you want are easier for CollectionView.
I recommend it for CollectionView and its refresh structure.
https://www.youtube.com/watch?v=JY900hOQCKQ

AjaxFormValidatingBehavior Performance and Lost focus on Firefox

My project is using Wicket's AjaxFormValidatingBehavior to auto-save form content to Session on sort of a multi-tab form with a tree menu (there is no save button on individual tabs, though there is a "Save" button that actually submits the form, runs the validations and saves contents to database). I am facing few issues:
Since the behavior is added to all form components' onChange event, there is a server-trip every time user moves from one field to another. I know that a throttle duration can be specified to prevent this, but its not possible to set in my case as my forms are of different lengths/complexity, many components dynamically generated (including the tree menu). But is there a more elegant solution to auto-save form content (that doesn't have a submit button) rather than this annoying solution.
Another issue I am facing is that post onChange event, on Firefox the component loses its focus after the "server trip" ends. While on IE7 it works fine.
For the first question I think you need to add a pipelining facility, on your components' onchange call a javascript function of your which calls your webapp. You can include a feature similar to the one provided with the throttle duration but page-wide (delay each calls and only trigger the last if it is older than x milliseconds for example).
For the second one, I think you have to use the AjaxRequestTarget#focusComponent in your behaviors, or handle this thing in your "wrapper" as described in the first answer.

Updating data with information received from the view (Grails)

I am writing a Grails app and I have a quick question about the best way to do something. My controller has 2 lists of data, both of which are displayed on the view in separate HTML tables. What I want to do is to have a button that will allow you to move an item from one list to the other. What is the best way to do this?
I have done some research and using some form of AJAX seems to be the general consensus on the best way to do this. Is there any other way? The heart of the problem is that I can't figure out how to update the data contained in the contoller based on the button the user presses in the view.
Thanks
I solved this by just updating the model to reflect the new lists and rerendering the page

integration of star ranking plugins into jqgrid

hast anybody already integrated a star ranking plugin (eg. http://www.wbotelhos.com/raty/) into jqgrid? What is the best way to do this?
Thanks
Anatoliy
When I have done custom cells, I have either hooked into one of the grid events (afterInsertRow) or if using gridview:true then gridComplete or loadComplete.
Then simply use the setCell method to insert the html into the row.

How can I maintain the checkbox state on a page that is refreshed by Ajax?

I have a html table in my application that shows the state of various jobs running in the system. Each job has a state associated with it e.g a swirly gif for running jobs. New jobs have a checkbox next to them that allows the user to select and kick off the associated job.
The table is a struts2 auto refreshing div (sx:div), it refreshes every few seconds to reflect what is currently happening with the jobs.
The problem is that when the div refreshes I lose that state of the checkboxes.
Is there an elegant way of maintaining their state? I have the option of calling some javascript upon completion of the ajax refresh using the dojo topic system built into the tag but i'm not sure what is the best way to approach it.
I'm not very familiar with struts so take me advice for what it's worth.
There are two ways to approach this that I see.
The first (and probably simplest) is to add an event to the checkboxes which stores the checked state in an array or object onchange. Then, on callback from the ajax refresh, restore those states.
The second approach would require that the ajax refresh either be executed as a post so that the checkboxes are submitted to the server, or having a separate ajax action which fires off when a checkbox is checked. With either of these options, the ajax refresh could "know" at render which checkboxes to render as checked.
If you decide to go with number one, the javascript is not very difficult, especially if you happen to be using a good library (jquery, etc.).

Resources