Re: WOBatchNavigationBar and qualifyDisplayGroup()

Lawrence Kendall <[email protected]>
Newsgroups gmane.comp.web.webobjects.newbies
Message-ID <[email protected]>
oh... Sorry, I copied too much code :)

Try this:

foundObjects =   
EOQualifier.filteredArrayWithQualifier(productDetailDisplayGroup.allObje 
cts(), qualifier);

obviously make sure you use this line after you have filled in the  
qualifier variable.

Larry.


On 21/02/2005, at 6:24 PM, Adam Rice wrote:

Thanks for helping out, I receive:

  Cannot resolve symbol : constructor EOOrQualifier
  (com.webobjects.eocontrol.EOQualifier)



  On 21/2/05 4:40 PM, "Lawrence Kendall" <[email protected]>  
wrote:

  >
  > I have tried this before as well but haven't had any success.
  >
  > The way I got round it was to use an NSArray as a class variable and
  > reference it.  I also had to abandon the WOBatchNavigationBar and
  > create my own.  It's easy though.
  >
  > All you do is create the table the way you want it (I use 3 columns  
in
  > a table that is 80% of the window width) and add your strings and
  > buttons etc.  Then use the methods from the WODisplayGroup to hook it
  > up.  You will use the displayPreviousBatch, displayNextBatch,
  > currentBatchIndex and batchCount.  For the total objects found you  
will
  > need to hook up the foundObjects.count.
  >
  > So:
  >
  > public NSArray foundObjects = null;
  >
  > Then in my search method:
  >
  > foundObjects = 
  >  
EOQualifier.filteredArrayWithQualifier(productDetailDisplayGroup.allObje
  > cts(), new EOOrQualifier(qualifier));
  >
  > Then in the WO, hook up the foundObjects.count to your
  > totalFoundObjects string.
  >
  > I also put a conditional around mine so it only displays the bar if
  > there are objects in the array.  If there are no objects it displays  
a
  > "No Matching Product Records Found" message instead.
  >
  > As far as I can tell there is no way in which to use the
  > detailDisplayGroup with the WOBatchNavigationBar.  This is exactly  
how
  > I got round the issue and I use it in a number of applications for
  > clients.  If you do find a way to use the WOBatchNavigationBar in  
this
  > way, be sure to post it :)
  >
  > If you need any more help, let me know.
  >
  > Good Luck.
  >
  > Larry.
  >
  >
  >
  > On 21/02/2005, at 4:56 PM, Adam Rice wrote:
  >
  > I've done a little reading and know why these two don't go together  
but
  >   can't find a solution.
  >
  >   I've I use qualifyDataSource() I do not get the results I'm looking
  > for.
  >
  >   My search currently reads as:
  >
  >   productDetailDisplayGroup.queryMatch().setObjectForKey("N",
  > "product.obs");
  >
  >   productDetailDisplayGroup.queryMatch().setObjectForKey("RES",
  > "pricelevel");
  >
  >   NSArray args = new NSArray(new Object[] { "IPOD", "SW", "MON",  
"ACC"
  > });
  >
  >   String qualifierString = "(product.brand = %@)";
  >
  >   EOQualifier qualifier =
  >   EOQualifier.qualifierWithQualifierFormat(qualifierString, args);
  >
  >   EOFetchSpecification fs = new EOFetchSpecification("productDetail",
  >   qualifier, null);
  >
  >   EOEditingContext ec = session().defaultEditingContext();
  >
  >   NSArray tempResultsArray = ec.objectsWithFetchSpecification(fs);
  >
  >   productDetailDisplayGroup.setObjectArray(tempResultsArray);
  >
  >   productDetailDisplayGroup.qualifyDisplayGroup();
  >
  >
  >
  >
  > 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.
  >
  >
  >
  >
  > 
  > Yahoo! Groups Links
  >
  >
  >
  > 
  >
  >
  >
  >





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

------------------------------------
What does a squirrel do in the summer? It buries nuts. Why? Cos then in  
winter time he's got something to eat and he won't die. So, collecting  
nuts in the summer is worthwhile work. Every task you do at work think,  
would a squirrel do that? Think squirrels. Think nuts.


 
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/
image.tiff (image/tiff, 204 B) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.