For Programmers: Free Programming Magazines  


Home > Archive > Java Beans > October 2006 > How to get the updated data from database.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to get the updated data from database.
jacksuyu@gmail.com

2006-10-06, 9:59 pm

My backing bean has some method to get data from database. Like;
public Collection getClients() {
Collection c = accountEntityBean.getClients();
return c;
}
In my web page, there will be a client list to show out.
The problem is after I created a new client, the new client data could
added to database. But the client list is still the old list. Only
after I redeploy my project I could see that new data.
My backing bean is a session bean. So how could I get the updated data
from database.

Thanks a lot!

simon.martinelli@gmail.com

2006-10-08, 7:01 pm

Hi,

I'm not sure that I exactly understand your question.

Do you create the new client over the web application?
If so you have to do a refresh of the page and call the method
getClients() again.

Regards, Simon

jacksuyu@gmail.com

2006-10-08, 10:00 pm

Hi,
Thanks for your reply.
Yes, I create a new client in the web application. After I create it, I
go to showClients page to see. There are only old data. What do you
mean to refresh the page. Click the refresh button of the browser? It's
useless. Still the old data. When I go to the databse. I refresh the
database and see my new data there.

Thanks again.
simon.martinelli@gmail.com wrote:
> Hi,
>
> I'm not sure that I exactly understand your question.
>
> Do you create the new client over the web application?
> If so you have to do a refresh of the page and call the method
> getClients() again.
>
> Regards, Simon


simon.martinelli@gmail.com

2006-10-09, 4:02 am

A ok.
Is accountEntityBean an EntityBean and if so which version?

jacksuyu@gmail.com

2006-10-12, 7:04 pm

accountEntityBean is a EntityBean. I create the entity bean using
NetBeans 5.5 Beta 2 from database table. So I think the version should
be 2.0, right?

Thanks.
simon.martinelli@gmail.com wrote:
> A ok.
> Is accountEntityBean an EntityBean and if so which version?


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com