Re: WOBatchNavigationBar and qualifyDisplayGroup()
Adam Rice <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.newbies |
|---|---|
| Message-ID | <BE40D0D9.5320%[email protected]> |
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 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/