wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manish41711 <manish41...@gmail.com>
Subject Triggering a server request (ajax?) after page render to re-render certain parts of the page
Date Mon, 28 Jan 2013 11:35:40 GMT
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

-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

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

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.

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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org

View raw message