• 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: David LeBer <email@hidden>
  • Date: Mon, 10 Oct 2005 19:26:36 -0400

On 10-Oct-05, at 7:07 PM, Janice Cheung wrote:

   Hi Ken,

Here are the bindings for my repetition on the first page, UserHome.wo:

   Repetition 2:WORepetition{

   item=server;
   list=m_ServersA;
 }

   CheckBox2: WOCheckBox{
   checked=objectSelected;
   }

   Here are my bindings for my next page, EmailServerContacts.wo:

   Repetition1:WORepetition{
   item= server;
   list=selectedObjects;
   }

I called the method, nextPage.setSelectedObjects(selectedObjects ()); as you suggested, but it still isn't working.

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"?

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: Janice Cheung <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>)

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