Re: need help with rule
hmm...well, if you want to trigger rules based on a significant key, you can write rules session.currentProject.id = '12' -> propertyKey = "this" vs. session.currentProject.id = '14' -> propertyKey = "that" or something. which as long as session.currentProject is a significant key, the rules will recalculate each time (so changing the current project works as expected) when you ask to fire a rule with that significant key at runtime. I typically make session.user a significant key and use it in just this way. but it sounds like you want to set the value of a local variable inside your D2W Query page? in this case, you'll likely need your own component or page such that you can code and hold the variables in question - this is also something I do with D2W is make page level components that layout or handle business logic, often times I program the business logic right into rules and write smart D2W pages and components that understand my significant keys and business logic. maybe someone knows more or I'm confused - so, not sure if that helps…. On Jul 31, 2012, at 10:40 AM, Theodore Petrosky wrote: > > I want to set the value of an object in a query page from a variable that > lives in the session. > > session().currentProject(); > > Ted > > > --- On Tue, 7/31/12, Jesse Tayler wrote: > >> From: Jesse Tayler >> Subject: Re: need help with rule >> To: "Theodore Petrosky" >> Cc: webobjects-dev@lists.apple.com >> Date: Tuesday, July 31, 2012, 10:30 AM >> >> what's the rule you are trying to write here Ted? >> >> you are setting your page configuration based on a literal >> string AND propertyKey = literal? >> >> are you trying to set a variable or are you trying to read >> some state and setup a page configuration? >> >> >> On Jul 31, 2012, at 6:09 AM, Theodore Petrosky >> wrote: >> >>> my model has: >>> >>> Project toOne ProjectCategory. >>> >>> I have a key 'currentProjectCategory' in my >> ERXThreadStorage. >>> >>> When I access my query page, I want to set the >> ProjectCategory with this value. >>> >>> lhs pageConfiguration = 'QueryProject' and propertyKey >> = 'projectCategory' >>> >>> what is the assignment and rhs >>> >>> I don't understand the rhs value. >>> >>> Help >>> >>> Ted >>> ___ >>> Do not post admin requests to the list. They will be >> ignored. >>> Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) >>> Help/Unsubscribe/Update your Subscription: >>> https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com >>> >>> This email sent to jtay...@oeinc.com >> >> ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: need help with rule
I want to set the value of an object in a query page from a variable that lives in the session. session().currentProject(); Ted --- On Tue, 7/31/12, Jesse Tayler wrote: > From: Jesse Tayler > Subject: Re: need help with rule > To: "Theodore Petrosky" > Cc: webobjects-dev@lists.apple.com > Date: Tuesday, July 31, 2012, 10:30 AM > > what's the rule you are trying to write here Ted? > > you are setting your page configuration based on a literal > string AND propertyKey = literal? > > are you trying to set a variable or are you trying to read > some state and setup a page configuration? > > > On Jul 31, 2012, at 6:09 AM, Theodore Petrosky > wrote: > > > my model has: > > > > Project toOne ProjectCategory. > > > > I have a key 'currentProjectCategory' in my > ERXThreadStorage. > > > > When I access my query page, I want to set the > ProjectCategory with this value. > > > > lhs pageConfiguration = 'QueryProject' and propertyKey > = 'projectCategory' > > > > what is the assignment and rhs > > > > I don't understand the rhs value. > > > > Help > > > > Ted > > ___ > > Do not post admin requests to the list. They will be > ignored. > > Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) > > Help/Unsubscribe/Update your Subscription: > > https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com > > > > This email sent to jtay...@oeinc.com > > ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: need help with rule
what's the rule you are trying to write here Ted? you are setting your page configuration based on a literal string AND propertyKey = literal? are you trying to set a variable or are you trying to read some state and setup a page configuration? On Jul 31, 2012, at 6:09 AM, Theodore Petrosky wrote: > my model has: > > Project toOne ProjectCategory. > > I have a key 'currentProjectCategory' in my ERXThreadStorage. > > When I access my query page, I want to set the ProjectCategory with this > value. > > lhs pageConfiguration = 'QueryProject' and propertyKey = 'projectCategory' > > what is the assignment and rhs > > I don't understand the rhs value. > > Help > > Ted > ___ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com > > This email sent to jtay...@oeinc.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
need help with rule
my model has: Project toOne ProjectCategory. I have a key 'currentProjectCategory' in my ERXThreadStorage. When I access my query page, I want to set the ProjectCategory with this value. lhs pageConfiguration = 'QueryProject' and propertyKey = 'projectCategory' what is the assignment and rhs I don't understand the rhs value. Help Ted ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com