WOToManyRelationship quirk
WOToManyRelationship quirk
- Subject: WOToManyRelationship quirk
- From: Deirdre Saoirse Moen <email@hidden>
- Date: Tue, 23 Mar 2004 22:53:03 -0800
OK I admit that I'm completely stumped on this.
I have entity Panels, which has a To-Many join (PanelsXGuests) and a
To-One join (Guests). As I'd auto-generated these, there's also a
flattened relationship in Panels called Guests, which is a direct link
to entity Guests.
In my editing, I made an error and passed a blank Panels record to the
WOToManyRelationship -- and lo and behold, the browser populated
correctly.
However, that only works if the record IS blank -- if it already
existed, I get a Null Pointer exception.
Since it's really not very clear about *why* there's a null pointer in
the typical case, I'm baffled.
from the .woa file that harfs:
pGuests: WOToManyRelationship
{
sourceObject = thePanel;
destinationDisplayKey = "guestName";
relationshipKey = "Guests";
sourceEntityName = "Panels";
uiStyle = "browser";
isMandatory = false;
size = 40;
}
From the .java file that passes the record:
public PanelEdit panelGuests()
{
PanelEdit nextPage = (PanelEdit)pageWithName("PanelEdit");
panel = panelItem;
nextPage.setThePanel(panelItem);
return nextPage;
}
And in the one receiving:
public void setThePanel(Panels aPanel)
{
thePanel = aPanel;
}
And, in the chain of the error message when it gets the null pointer
exception, it sure is the WOBrowser that's throwing the null pointer,
and the one from the ToMany relationship is the only browser.
WOBrowser.java
271
appendChildrenToResponse
com.webobjects.appserver._private
Any ideas?
I have to admit that I'm most mystified that it works under a peculiar
set of circumstances and no others.
--
_Deirdre http://deirdre.net
"Cannot run out of time. There is infinite time. You are finite.
Zathras is finite. This....is wrong tool." -- Zathras
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.