• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[Solved, sort of] Display Group not setting object array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Solved, sort of] Display Group not setting object array


  • Subject: [Solved, sort of] Display Group not setting object array
  • From: Thomas <email@hidden>
  • Date: Mon, 7 Feb 2005 17:44:52 +1100

Adding one more line worked:

usersDisplayGroup.setQualifier(null);

The previous displayed objects were a result of a qualifier. It looks like the group was applying the qualifier in some bizarre way.

On 07/02/2005, at 17:30, Thomas wrote:

Folks,

thanks for the help, but that didn't solve the problem. Note that the 3 displayed objects are from the ORIGINAL object array, not from the new one.

Here's some really paranoid code:


System.out.println("Setting real foundUsers = " + n.count());

//usersDisplayGroup.setNumberOfObjectsPerBatch(0);
usersDisplayGroup.setObjectArray(n);
//usersDisplayGroup.setNumberOfObjectsPerBatch(20);
usersDisplayGroup.setCurrentBatchIndex(1);
//usersDisplayGroup.selectObject(n.objectAtIndex(0));
//usersDisplayGroup.displayBatchContainingSelectedObject();
usersDisplayGroup.updateDisplayedObjects();

System.out.println("usersDisplayGroup.displayedObjects = " + usersDisplayGroup.displayedObjects().count());
System.out.println("usersDisplayGroup.allObjects = " + usersDisplayGroup.allObjects().count());
System.out.println(" batch index = " + usersDisplayGroup.currentBatchIndex() +
", batch size = " + usersDisplayGroup.numberOfObjectsPerBatch());




Here's the result, with or without any of the commented lines above:

Setting real foundUsers = 9
usersDisplayGroup.displayedObjects = 3
usersDisplayGroup.allObjects = 9
 batch index = 1, batch size = 20


On 07/02/2005, at 15:45, Owen McKerrow wrote:

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());

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:
email@hidden


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
References: 
 >Display Group not setting object array (From: Thomas <email@hidden>)
 >Re: Display Group not setting object array (From: Owen McKerrow <email@hidden>)
 >Re: Display Group not setting object array (From: Thomas <email@hidden>)

  • Prev by Date: Re: Display Group not setting object array
  • Next by Date: Re: Reusable Subcomponent Dependent Form Values Validation Question
  • Previous by thread: Re: Display Group not setting object array
  • Next by thread: JNDI/LDAP multi-value attributes just work
  • Index(es):
    • Date
    • Thread