Hi,
On Mon, Jan 28, 2013 at 1:35 PM, manish41711 <manish41...@gmail.com> wrote: > On my page there is a panel that shows a list of car dealers. The panel > displays a list of dealers with information for each dealer as mentioned > below. > > -For each dealer I need to show : name, address, phone, hours. The data is > in json. > -/name, address, phone/ : they are simple text-labels. > -/hours/: There is a link "View hours" for each dealer. On clicking it, a > text-label slides down the link showing "loading-gif" if hours data not yet > present, else shows the hours data. Clicking link again hides the hours > data. > > When the page is rendered, this is the behavior I need: > > -On page render I show name, address, phone labels & the hours link. As of > now I do NOT have the hours information in json. > -After the page renders, I want to make a request to the server (Ajax ?), > get the updated json with hours information & re-render the "view hours" so > that when clicked it now shows the hours. This is what I do not know how to > do. > > Why am I not sending a json with hours information initially itself? This > is > because collecting that is expensive & very rarely will the "View Hours" > link be used. So collecting all that data upfront will make the page render > slow. I want the event/act of page loading trigger a request to get hours > data & re-render only the hours text-label that slides down on clicking the > "View Hours" link. > > I looked at AjaxSelfUpdatingTimerBehavior but its trigger is a time > duration, not the page load. > It triggers some duration after the page load. Also see AjaxLazyLoadPanel from wicket-extensions. > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Triggering-a-server-request-ajax-after-page-render-to-re-render-certain-parts-of-the-page-tp4655827.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com <http://jweekend.com/>