Sergiu,
Thanks for all your help, everything is working perfectly now!
Sergiu Dumitriu-2 wrote:
>
> Yes, I read the whole snippet again. The problem is that $object is not
> an object, but a document. You must replace:
>
> #set ($object = $xwiki.getDocument(${item}))
>
> with
>
> #set($obje
BrianJones wrote:
>
> Sergiu Dumitriu-2 wrote:
>> --- = -1
>> False = 0
>> True = 1
>>
>> And to answer another of your questions, --- means something like
>> unselected, not answered, neither. I know it doesn't quite fit in the
>> boolean logic, but otherwise there's no way of having neither true
Sergiu Dumitriu-2 wrote:
>
> --- = -1
> False = 0
> True = 1
>
> And to answer another of your questions, --- means something like
> unselected, not answered, neither. I know it doesn't quite fit in the
> boolean logic, but otherwise there's no way of having neither true nor
> false for a field
BrianJones wrote:
> Sergiu,
>
> Thanks again, but just to clarify things, does TRUE==0 and FALSE==1?
>
--- = -1
False = 0
True = 1
And to answer another of your questions, --- means something like
unselected, not answered, neither. I know it doesn't quite fit in the
boolean logic, but otherwise
Sergiu,
Thanks again, but just to clarify things, does TRUE==0 and FALSE==1?
Sergiu Dumitriu-2 wrote:
>
> #if (!$object.getProperty("example_bool").value == 1)
>
> The property value is an integer, not a boolean.
>
--
View this message in context:
http://n2.nabble.com/Trouble-assessing-bo
Jerome Velociter wrote:
> Hi,
>
> See below:
>
> BrianJones wrote:
>> Hi all,
>>
>> I'm having trouble using Velocity to analyze the boolean value of a property
>> of a class.
>>
>> For example, I have class X, with a property Y (I'll call this property
>> 'example_bool' in the lower example code
Jerome,
Thanks for your suggestion, but it didn't seem to work...
Jerome Velociter-2 wrote:
>
> Try to replace
>
> #if (!$object.get("example_bool"))
>
> by
>
> #if (!$object.getProperty("example_bool").value)
>
> Hope this helps (haven't tested, I admit)
>
> Jerome.
>
I tried using:
#
Hi,
See below:
BrianJones wrote:
> Hi all,
>
> I'm having trouble using Velocity to analyze the boolean value of a property
> of a class.
>
> For example, I have class X, with a property Y (I'll call this property
> 'example_bool' in the lower example code) which is of type 'Boolean'. I've
> con