NSDictionary Values Not Showing In WOString/WORepitition
NSDictionary Values Not Showing In WOString/WORepitition
- Subject: NSDictionary Values Not Showing In WOString/WORepitition
- From: "Jonathan Fleming" <email@hidden>
- Date: Fri, 07 Nov 2003 16:44:41 +0000
What am I doing wrong here anyone? I'm getting no info or values returned
even though i can see them in my log.
I have a WOComponent named UserAboutUsNp which has a WORepitition bound to
an NSDictionary and NSArray as stated:
item = tbNavPageContent
in java file
/** @TypeInfo TbNavPageContent */
protected NSDictionary tbNavPageContent;
list = queryResults
in java file
/** @TypeInfo com.webobjects.eocontrol.TbNavPageContent */
protected NSArray queryResults;
Which is returned by a direcAction method from a WOHyperlink in a results
page. When the values have been pushed through to the java file
(UserAboutUsNp.java), it calls the method fetch() which is programmatically
created as stated
public void fetch() {
session = (Session)session();
EOEditingContext ec = session.defaultEditingContext();
/*-------------------------------------------------------------------------------*/
/*---------------- Start Of Progmatically Created Fetch Spec
----------------*/
String tbAdminUserID =
((Application)application()).getTbAdminUserID();
String navPageName = "ABOUT US";
String visibility = "On";
/*------------- end local variables & start qualifier bindings
--------------*/
NSArray bindings = new NSArray( new Object [] { new Integer(
tbAdminUserID ), navPageName, visibility } );
EOQualifier qualifier =
EOQualifier.qualifierWithQualifierFormat("tbNavPage.tbAdminUserID = %@ and
tbNavPage.navPageName = %@ and visibility = %@", bindings );
/*------------- end qualifier statements & start sort orderings
-------------*/
EOSortOrdering statusSortOrdering =
EOSortOrdering.sortOrderingWithKey("status",
EOSortOrdering.CompareAscending);
NSArray sortOrderings =
new NSArray( new Object[]{statusSortOrdering});
/*------------- end sort orderings & start fetch spec
-------------*/
EOFetchSpecification fetchSpec = new
EOFetchSpecification("TbNavPageContent", qualifier, sortOrderings);
fetchSpec.setFetchesRawRows( true );
NSArray keyPaths = new NSArray( new String [] {
"tbNavPageID",
"tbNavPage.tbAdminUserID",
"tbNavPage.navPageName",
"tbNavPageContentID",
"visibility",
"navPageText"} );
fetchSpec.setRawRowKeyPaths( keyPaths );
EOEditingContext myEditingContext =
this.session().defaultEditingContext();
queryResults =
myEditingContext.objectsWithFetchSpecification(fetchSpec);
NSLog.out.appendln("\n*** value for queryResults from fetch() = " +
queryResults + "\n");
/*------------------------------------ end
----------------------------------*/
if (queryResults.count() ==0) {
bResultsUnmatched = true;
bResultsFound = false;
} else {
bResultsUnmatched = false;
bResultsFound = true;
}
}
In the Log File I have this output for the queryResults NSArray:
*** value for queryResults from fetch() = ({tbNavPageID = 22;
tbNavPage.tbAdminUserID = 2; tbNavPage.navPageName = "ABOUT US";
tbNavPageContentID = 10; visibility = "On"; navPageText = "the best in the
business"; })
But, in the WORepitition where the WOString is bound to
tbNavPageContent.navPageText I can not get the value to show itself.
So what is it I'm missing or failing to see?
The irony of this is i've used this sort of code several times successfully,
but even looking at those are revealing no problems that i can obviously
see.
TIA
Kind regards
Jonathan :^)
_________________________________________________________________
Use MSN Messenger to send music and pics to your friends
http://www.msn.co.uk/messenger
_______________________________________________
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.