• 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
setting boolean value from a rule
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

setting boolean value from a rule


  • Subject: setting boolean value from a rule
  • From: Theodore Petrosky <email@hidden>
  • Date: Mon, 01 Oct 2012 10:20:58 -0700 (PDT)

I cloned the ERMDSimpleListPageRepetition and added a conditional at the top of the page to allow help text to be either visible or not:

<webobject name = "InstructionComponentCondition">
    <webobject name = "InstructionComponent" />
</webobject>

InstructionComponent : WOSwitchComponent {
  WOComponentName = d2wContext.headerInstructionComponentName;
}

my conditional:

InstructionComponentCondition : WOConditional {
  condition = d2wContext.showHeaderInstructionComponent;
}

each user that logs in has a security setting "showsHelpText". so I can access it at:  session.user.showsHelpText

so I created a rule:
100 : (task = 'list' and session.user.showsHelpText = 1) => showHeaderInstructionComponent = "true" [com.webobjects.directtoweb.Assignment]

Do I have to worry about the 'false' setting?
Should there be a rule:
10 : *true* => showHeaderInstructionComponent = "false" [com.webobjects.directtoweb.Assignment]

What is best 'form' for setting the state of d2wContext.showHeaderInstructionComponent?

Ted


 _______________________________________________
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: setting boolean value from a rule
      • From: David LeBer <email@hidden>
  • Prev by Date: Re: Generate a pdf with multiple page
  • Next by Date: Re: setting boolean value from a rule
  • Previous by thread: Re: Generate a pdf with multiple page
  • Next by thread: Re: setting boolean value from a rule
  • Index(es):
    • Date
    • Thread