Re: Display Group not setting object array
Re: Display Group not setting object array
- Subject: Re: Display Group not setting object array
- From: Owen McKerrow <email@hidden>
- Date: Mon, 7 Feb 2005 15:45:34 +1100
Hi Thomas,
displayedObjects is an array of the current batch that you are showing.
So while n has a count of 9, your displayedObjects has a count of 3,
and Im assuming 3 will be the size you have set your batches to.
What you should be printing out is the count of allObjects() which is
the array that get set when you call setObjectArray(n).
So the code should be ( this incorporates Mark Edward's suggestion )
System.out.println("Setting real foundUsers = " + n.count());
usersDisplayGroup.setObjectArray(n);
usersDisplayGroup.setCurrentBatch(1);
usersDisplayGroup.updateDisplayedObjects();
System.out.println("usersDisplayGroup.allObjects = " +
usersDisplayGroup.allObjects().count());
Owen McKerrow
WebMaster, emlab
http://emlab.uow.edu.au
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
"As of tomorrow, employees will only be able to access the building
using individual security cards. Pictures will be taken next Wednesday
employees will receive their cards in two weeks."
- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp
On 07/02/2005, at 3:21 PM, Thomas wrote:
I'm using a Display Group for its batch display capabilities, and I'm
setting the object array, which works the first time. But when I set
it to something different, using this code, I get strange results,
with none of the new objects being shown. The code is:
System.out.println("Setting real foundUsers = " + n.count());
usersDisplayGroup.setObjectArray(n);
usersDisplayGroup.updateDisplayedObjects();
System.out.println("usersDisplayGroup.displayedObjects = " +
usersDisplayGroup.displayedObjects().count());
Gives this result:
Setting real foundUsers = 9
usersDisplayGroup.displayedObjects = 3
The displayed objects are the first few of the old list, but the
number doesn't match the new list or the old list.
Any ideas?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden