I've a page which has three data tables. I want the data in the two tables to be populated after the page loads.Can i do it using AJAX. I am new to AJAX. Or is there any component in Sandbox for this requirement. Any help is appreciated
Bauke Scholtz wrote:Why do you want to use Ajax for this? Why not just the bean constructor or so?
Because Shasi wants to populate them after the page loads.
Yes, that's what AJAX is all about. But the easiest was to use AJAX to do that is to employ one of the AJAX-supporting JSF tag libraries such as RichFaces.
In fact, I'm using RichFaces + MyFaces myself on a major project.
An IDE is no substitute for an Intelligent Developer.
Joined: Oct 08, 2006
This sounds more like as "immediately after the page loads". But if he only want to rerender page parts asynchronously on client interaction, then Ajax is indeed suitable. In that case I would recommend RichFaces/Ajax4jsf as well.
I'm using myfaces 1.1.6, tomahawk-1.1.8, tiles with jdk 1.4. Already i'm facing lot of problems cos i'm trying to use trinidad for breadcrumb which i could not resolve yet. If i include rich faces now, I'm scared I'll have incompatibility issues. My aim is to populate one table(which is a web service call) automatically after the page loads. That too without any client interaction. Please help as we have very less time for development.
Joined: Oct 08, 2006
Shasi Mitra wrote:That too without any client interaction.
In the bean constructor (or in initialization block or as lazy loading in getter) just obtain the desired list of row objects from your DAO class and assign it to a list property. In your JSF page just use a h:dataTable component whose value points to that list property.
Hi Bauke Scholtz,
thanks for the reply. I tried that approach. But in that case too the whole page loads after all the database hits. The only solution for my requirement is using AJAX i think. Anyway thanks a lot. My actual requirement is to load the page partially with one table then load the other part slowly.