Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Wiki Markup
{{100: \*true\* => pageWrapperName = "PageWrapper" \[WO:com.webobjects.directtoweb.Assignment\]}}

...

Wiki Markup
{{Priority: qualifier => keyPath = value \[WO:Assignment class\]}}

In this case, the qualifier is always true, so long as no other rule priority is greater than 100, the pageWrapperName key in the D2WContext will always equal "PageWrapper". The assignment being used is the simple Assignment class, so the string in 'value' is assigned directly to 'keypath.' And since the D2WContext implements NSKeyValueCodingAdditions, you can reference this keyPath in a d2w component using a wod binding like:

...

Wiki Markup
{{101: task='edit' => pageWrapperName = "EditPageWrapper" \[WO:com.webobjects.directtoweb.Assignment\]}}

...

Wiki Markup
{{100: \*true\* => editPageTemplateName = "ProfessionalEditPage" \[WO:com.webobjects.directtoweb.Assignment\]}}
{{100: \*true\* => pageName = "editPageTemplateName" \[WO:er.directtoweb.assignments.ERDKeyValueAssignment\]}}

...

Wiki Markup
{{100: look = 'pro' => editPageTemplateName = "ProfessionalEditPage" \[WO:com.webobjects.directtoweb.Assignment\]}}
{{100: look = 'fun' => editPageTemplateName = "FunEditPage" \[WO:com.webobjects.directtoweb.Assignment\]}}
{{100: \*true\* => pageName = "editPageTemplateName" \[WO:er.directtoweb.assignments.ERDKeyValueAssignment\]}}

...

Wiki Markup
{{100: \*true\* => look = "fun" \[WO:com.webobjects.directtoweb.Assignment\]}}
{{105: session.user.isAdmin => look = "pro" \[WO:com.webobjects.directtoweb.Assignment\]}}

...

Wiki Markup
{{100: \*true\* => myKeyPath = "someValue" \[WO:com.whatever.MyGreatERDAssignment\]}}

...

Wiki Markup
{{100: \*true\* => calendarView = 'session.userPreferences.calendarView' \[WO:er.directtoweb.assignments.ERDDelayedKeyValueAssignment\]}}

...

Wiki Markup
{{100: calendarView = 'DAY' => calendarComponentName = "DayView" \[WO:er.directtoweb.assignments.ERDDelayedKeyValueAssignment\]}}
{{100: calendarView = 'MONTH' => calendarComponentName = "MonthView" \[WO:er.directtoweb.assignments.ERDDelayedKeyValueAssignment\]}}
{{100: calendarView = 'WEEK' => calendarComponentName = "WeekView" \[WO:er.directtoweb.assignments.ERDDelayedKeyValueAssignment\]}}
{{100: calendarView = 'YEAR' => calendarComponentName = "YearView" \[WO:er.directtoweb.assignments.ERDDelayedKeyValueAssignment\]}}

...

Wiki Markup
{{100: \*true\* => calendarComponentName = \{"qualifierFormat" = "calendarView = '@@'"; "switch" = \{"DAY" = "DayView"; "MONTH" = "MonthView"; "WEEK" = "WeekView"; "YEAR" = "YearView"; \}; \} \[WO:ERDDelayedSwitchAssignment\]}}

...

Apple's D2W documentation
rule modeler
Configuring Rule Modeler