how to get fresh data from backend?
how to get fresh data from backend?
- Subject: how to get fresh data from backend?
- From: Theodore Petrosky <email@hidden>
- Date: Wed, 23 Mar 2005 08:49:40 -0800 (PST)
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
I have a WO component that displays the results of a
query. The database could be updated from either my WO
component OR from my cocoa app. It appears as if WO is
caching the results and not getting new data when I
display a component.
What I want to do is to refresh my data every time the
page is displayed. But now, if I display the list,
then someone updates the database from my cococa app,
even a new connection to the web page will result in
the stale data.
My component is very simple....
public class EmployeeListComponent extends WOComponent
{
public NSArray employeeListArray;
public Employeedata aRowFromEmployeeList;
public EmployeeListComponent(WOContext context) {
super(context);
}
public void appendToResponse (WOResponse response,
WOContext context) {
EOFetchSpecification fetchSpec =
EOFetchSpecification.fetchSpecificationNamed("onlyCurrent",
"Employeedata");
EOEditingContext ec =
session().defaultEditingContext();
employeeListArray =
ec.objectsWithFetchSpecification(fetchSpec);
super.appendToResponse(response, context);
}
public Main returnToMainMenu()
{
Main nextPage = (Main)pageWithName("Main");
return nextPage;
}
}
Thanks,
please be gentle, I am new to WO..
Ted
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden