Hi Serethos,
> Imagine I have written two pages and linked them to two Java-
> classes, both
> WOComponents. The first page has a dynamically created link to the
> second
> page and calls it via pageWithName(..). How can I find out the name
> of the
> calling page within the second (target) page?
Let your components inherit from a custom parent that implements sth.
like:
public WOComponent lastPage;
public WOComponent pageWithName(String name) {
WOComponent page = super.pageWithName(name);
if (name.equals(this.name()))
page.takeValueForKey(this.lastPage, "lastPage");
else
page.takeValueForKey(this, "lastPage");
return page;
}
public WOComponent lastPage() {
return lastPage;
}
public boolean hasLastPage() {
return (lastPage == null ? false : true);
}
HTH
Fabian
_______________________________________________
WebObjects-dev mailing list
WebObjects-dev@...
http://www.omnigroup.com/mailman/listinfo/webobjects-dev