• 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
Re: Adding Objects to an ArrayList (Checkboxes)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding Objects to an ArrayList (Checkboxes)


  • Subject: Re: Adding Objects to an ArrayList (Checkboxes)
  • From: Janice Cheung <email@hidden>
  • Date: Mon, 10 Oct 2005 19:51:40 -0400

   Hi David,


When I do setAllServersTrue, my servers are being passed correctly over:


   public WOComponent setServersTrue(){
   UserHome nextPage=(UserHome)pageWithName(UserHome);
   nextPage.fetchByDnsName();
   nextPage.setSelectedObjects(m_ServersA);
   return nextPage;
   }


When you do this, do all of the checkboxes appear "checked"?


   Yes, when I do that, all the checkboxes appear "checked".

   I noticed that when I do this:

public void setObjectSelected(boolean value) {
System.out.println("Now in setObjectsSelected with value: " + value + " and server: " + server);
if (value) {


nothing ever prints out when I go to the nextPage from my EmailServerContacts() method. It seems as though
setObjectSelected doesn't get accessed to update the checked checkBoxes. Is there a way to ensure that
setObjectSelected is called?


   Thanks so much for helping me..

   Janice


If so that is good, it means that the bindings are correct.

Also, I notice there is a bug in the code that I wrote (damn typing off the top of my head!). This is wrong:

public boolean setObjectSelected(boolean value) {
<snip>

It should be:

public void setObjectSelected(boolean value) {
            ^^^^

Setter methods shouldn't have a return type (oops).

Since things are still not working, I recommend you follow Ken's advice and add some kind of log statement to that method to track down where it is breaking. ie:

public void setObjectSelected(boolean value) {
System.out.println("Now in setObjectsSelected with value: " + value + " and server: " + server);
if (value) {
---etc---


--
;david

--
David LeBer
"I am codeferous!"
Codeferous Software
site:   http://www.codeferous.com
blog: http://david.codeferous.com





_______________________________________________
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


  • Follow-Ups:
    • Re: Adding Objects to an ArrayList (Checkboxes)
      • From: David LeBer <email@hidden>
References: 
 >Re: Wanting to return an .XML document for a direct action (From: WebObjects <email@hidden>)
 >Adding Objects to an ArrayList (Checkboxes) (From: Janice Cheung <email@hidden>)
 >Re: Adding Objects to an ArrayList (Checkboxes) (From: Ken Anderson <email@hidden>)
 >Re: Adding Objects to an ArrayList (Checkboxes) (From: Janice Cheung <email@hidden>)
 >Re: Adding Objects to an ArrayList (Checkboxes) (From: David LeBer <email@hidden>)
 >Re: Adding Objects to an ArrayList (Checkboxes) (From: Janice Cheung <email@hidden>)
 >Re: Adding Objects to an ArrayList (Checkboxes) (From: Ken Anderson <email@hidden>)
 >Re: Adding Objects to an ArrayList (Checkboxes) (From: Ken Anderson <email@hidden>)
 >Re: Adding Objects to an ArrayList (Checkboxes) (From: Ken Anderson <email@hidden>)
 >Re: Adding Objects to an ArrayList (Checkboxes) (From: Janice Cheung <email@hidden>)
 >Re: Adding Objects to an ArrayList (Checkboxes) (From: David LeBer <email@hidden>)

  • Prev by Date: Re: WO not able to find itself?
  • Next by Date: Re: Adding Objects to an ArrayList (Checkboxes)
  • Previous by thread: Re: Adding Objects to an ArrayList (Checkboxes)
  • Next by thread: Re: Adding Objects to an ArrayList (Checkboxes)
  • Index(es):
    • Date
    • Thread