Re: WOBatchNavigationBar and qualifyDisplayGroup()
Lawrence Kendall <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.newbies |
|---|---|
| Message-ID | <[email protected]> |
Hhmmm.... Not sure about that. If your qualifier is qualifying the
right way then the foundObjects.count() should be right.
Just a quick question though... In the api example it says to
construct the qualifier like this:
EOQualifier.qualifierWithQualifierFormat("lastName = %@", args);
But you do it like this:
String qualifierString = "(product.brand = %@)";
EOQualifier qualifier =
EOQualifier.qualifierWithQualifierFormat(qualifierString, args);
Why do you create the qualifierString and why does it contain the
brackets?? I only ask because none of the examples I have seen show it
done like that and none of them contain brackets. I don't think it
will matter, but try removing the brackets and see if that helps at
all. You can leave the qualifierString variable if you like but you
can save a line if you just go:
NSArray args = new NSArray(new Object[] { "IPOD", "SW", "MON", "ACC"
});
EOQualifier qualifier =
EOQualifier.qualifierWithQualifierFormat("product.brand = %@", args);
See how that goes. If that doesn't work... I'm not sure what to do.
Larry.
On 22/02/2005, at 1:06 PM, Adam Rice wrote:
What is really odd is that if I remove:
productDetailDisplayGroup.queryMatch().setObjectForKey("N",
"product.obs");
productDetailDisplayGroup.queryMatch().setObjectForKey("RES",
"pricelevel");
The search has batches and I can move between the batches however
there is
only 182 results showing.
If I go to an SQL worksheet and run:
select count(*) from stc a, st b where b.brand in
('IPOD','SW','MON','ACC')
and a.stcode = b.stcode
I get the result 2285 so I have no idea where 182 comes from.
On 22/2/05 9:55 AM, "Lawrence Kendall" <[email protected]>
wrote:
> Cool!!!
>
> I wouldn't worry about the count taking too long. It would take way
> longer to actually fetch the objects than count them. Although the
> count does take some time, it is pretty much negligible. In this
> example, using the variable won't save you any time either. Since
you
> only reference the variable once it only does the count once. If you
> were referencing it 10 times then it would take longer, but you
> probably wouldn't notice it. You can test this if you like by using
> the following code:
>
> long startTime = System.currentTimeMillis();
>
> //count code goes here
>
> System.out.println("Process time:
> "+(System.currentTimeMillis()-startTime)/1000f);
>
> This will give you a System.out of the time it took to process the
> count in seconds. You can use that when doing any sort of
optimisation
> testing.
>
> uummm, one batch hey??
>
> hhmmm...
>
> What is your repetition hooked up to?? You should have the list
> binding hooked up to productDetailDisplayGroup.displayedObjects to
> display the correct number of objects per batch.
>
> Did you set numberOfObjectsPerBatch in the java or in the WO?? I
> prefer to set it in the java personally because I have found that
> setting it in WO can occasionally be flakey (although I sometimes
have
> great success with it). You set it in the java by calling
> productDetailDisplayGroup.setNumberOfObjectsPerBatch(25) in the
> constructor of your component (or you can call it just after you set
> the masterObject if you want to). Not sure why you would see 13
unless
> you had set it to 13 somewhere.
>
> See how that goes.
>
> Larry.
Yahoo! Groups Sponsor
<logo_25x25.gif>
Get unlimited calls to
U.S./Canada
<image.tiff>
<l.gif>
Yahoo! Groups Links
• To visit your group on the web, go to:
http://groups.yahoo.com/group/webobjects-newbies/
• To unsubscribe from this group, send an email to:
[email protected]
• Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
------------------------------------
Lawrence Kendall
WebDesigner/Programmer
Automaton
35 Little Victoria Street
Fitzroy VIC 3065
P: +61 3 8415 0007
M: 0400 00 11 03
E: [email protected]
W: www.automaton.com.au
------------------------------------
Eagles may soar high, but weasels don't get sucked into jet engines.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/webobjects-newbies/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/