|
Re: Expression definition test [message #639399 is a reply to message #639395] |
Tue, 16 November 2010 12:27 |
|
Hi Alexandra,
maybe you mixed up "value" and "variable" ?
"activePart" can be used as variable, its not a value.
In the args you can give a value to the tester, so it´s possible that the tester can test vs different values. For example, you have two handlers, the first should be activated if 1 person in a table is selected the second one if 2 or more persons are selected. For both you can use the same tester but with different arguments.
i hope it get a little bit more clear.
Greetz
Thomas
|
|
|
|
Re: Expression definition test [message #639411 is a reply to message #639409] |
Tue, 16 November 2010 13:13 |
|
Yes, in the tester you do a check like
if(numberOfSelcetedPersons == args)
{
return true;
}
So you can use this tester for different handlers, i.e. for handlers which can only be executed if ONE person is selected AND for handlers which can only be executed if TWO persons are selected. You simply have to pass a different args.
Greetz
|
|
|
|
Re: Expression definition test [message #639415 is a reply to message #639413] |
Tue, 16 November 2010 13:23 |
Alexandra Niculai Messages: 84 Registered: July 2009 |
Member |
|
|
In fact, my attempt has been something like this(which of course, didn't send the actual active part to the tester, because it can't, it sent the String "activePart", which wasn't relevant for the test, since the test needed both the currently selected element and the active part):
<with
variable="selection">
<iterate
ifEmpty="true"
operator="or">
<test
args="activePart"
forcePluginActivation="true"
property="myProject.tester.mayDoThing"
value="true">
</test>
</iterate>
</with>
Alexandra.
[Updated on: Tue, 16 November 2010 13:26] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03517 seconds