Hi to all,
I found out that the best way to solve problem I previously exposed (
http://lists.apple.com/archives/webobjects-dev/2014/Apr/msg00055.html) is
encapsulate the woo file (the one that was scrambled) into java source.
So, for example, let's assume I have this woo source file:
----------
{
"WebObjects Release" = "WebObjects 5.0";
encoding = NSUTF8StringEncoding;
variables = {
scriptDisplayGroup = {
class = ERXDisplayGroup;
dataSource = {
class = EODetailDataSource;
detailKey = steps;
masterClassDescription = Step;
};
fetchesOnLoad = YES;
formatForLikeQualifier = "%@*";
localKeys = ();
numberOfObjectsPerBatch = 0;
selectsFirstObjectAfterFetch = YES;
sortOrdering = ({class = EOSortOrdering; key = order;
selectorName = "compareAscending:"; });
};
}
----------
Actually, I can easily encapsulate it into my java source. I'm putting in
the constructor of my component this:
----------
...
scriptDisplayGroup = new ERXDisplayGroup<Step>();
EODetailDataSource scriptDataSource = new EODetailDataSource(
EOClassDescription.classDescriptionForClass(Step.class),
"steps");
scriptDisplayGroup.setFetchesOnLoad(true);
scriptDisplayGroup.setSelectsFirstObjectAfterFetch(true);
scriptDisplayGroup.sortOrderings().add(
ERXSortOrdering.sortOrderingWithKey(Step.order,
ERXSortOrdering.CompareAscending));
scriptDisplayGroup.setNumberOfObjectsPerBatch(0);
scriptDisplayGroup.setDataSource(scriptDataSource);
scriptDisplayGroup.setLocalKeys(NSArray.EmptyArray);
...
----------
What I don't understand is how to "translate" the line
`formatForLikeQualifier = "%@*"; ` from the woo.
Maybe it could be done appending
`scriptDisplayGroup.setQualifierForKey(EOQualifier.qualifierWithQualifierFormat("%@*",
null), "like");`
to the above java lines.
Is that correct?
Thank you, for answers.
Filippo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]