• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
how to get fresh data from backend?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: MySQL and Foreign Keys
  • Next by Date: RE: how to get fresh data from backend?
  • Previous by thread: Re: MySQL and Foreign Keys
  • Next by thread: RE: how to get fresh data from backend?
  • Index(es):
    • Date
    • Thread