• 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
Reusable Components, Booleans
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reusable Components, Booleans


  • Subject: Reusable Components, Booleans
  • From: Janice Cheung <email@hidden>
  • Date: Thu, 17 Mar 2005 16:09:11 -0500

   Greetings,

If I have reusable components within one webobject component, is it possible to prohibit my page Form Submit to affect the
other components within the same template?


More specifically, I have a WebObject component, named UserHome. UserHome contains the DisplayTemplate (Header, Footer, CrumbTrail),
and a SearchOptions component (three dropdown menus to search by Institution, Department, and Division).


I have multiple boolean values set on this UserHome template, basically to suppress duplicates in my Department array.

Once I access the three dropdown menus, my boolean values get re-set along with the form submit (the action bound to my PopUpButton).

   Can I prevent this from happening?

   My code works something like this:

   public boolean isDeptPrinted(){

   if (lastDeptSeen==null){
     lastDeptSeen=a.departmentName();
     return true;
 }
  if (lastDeptSeen.equal(a.departmentName())){
    return false;
 }
      lastDeptSeen=a.departmentName();
      return true;
  }

If a user accesses his UserHome to view his affiliations (depts and divisions), he will happily see them .. _until_ he/she accesses the
dropdown menu selections. Then, if there exists only one department, that one department will be set to lastDeptSeen (set from the
first time UserHome was accessed) and ... false will be returned ... and .. departments disappear!


I tried using boolean values to count the departments, and then doing a check if count > 1 or count !=0, to no avail. It seems that
I'm coding in circles where count is dependent on isDeptPrinted() .. and I cannot seem to escape this infinite oblivion of confusion.


Any advice or guidance is greatly appreciated.

   Best regards,
   Janice

_______________________________________________
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: Reusable Components, Booleans
      • From: Art Isbell <email@hidden>
References: 
 >Session communication (From: Sébastien Gruhier <email@hidden>)
 >Re: Session communication (From: Chuck Hill <email@hidden>)
 >Re: Session communication (From: Sébastien Gruhier <email@hidden>)
 >Re: Session communication (From: Sam Barnum <email@hidden>)
 >Re: Session communication (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Session communication
  • Next by Date: Re: XCode Question
  • Previous by thread: Re: Session communication
  • Next by thread: Re: Reusable Components, Booleans
  • Index(es):
    • Date
    • Thread