Re: setting boolean value from a rule
Re: setting boolean value from a rule
- Subject: Re: setting boolean value from a rule
- From: David LeBer <email@hidden>
- Date: Mon, 01 Oct 2012 13:45:11 -0400
Ted,
Null should evaluate to false by the WOConditional, so I don't think you *need* the default false rule. Though it does give some indication in your rules that the key exists.
You should be using BooleanAssignment to set it's value though.
D
On 2012-10-01, at 1:20 PM, Theodore Petrosky <email@hidden> wrote:
> 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
_______________________________________________
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