[Axualize-users] Strange behavior in boolean logic?
Brought to you by:
russwyte
From: Frank B. <fwb...@ch...> - 2003-03-20 23:37:31
|
Hi-- When I just <echo> the result to a method call, I see the expected output. But when I attempt to assign the result of the method call to a boolean for comparison ton contro logic, the method is not getting called, and the boolean is set to 'false' (which may be the default?) I assume I am doing something wrong here, any help would be greatly appreciated. Here is a piece of my XML file: <echo> <object idref="validator" method="validateForm"> <object idref="fields"/> </object> </echo> <boolean id="ans"> <object idref="validator" method="validateForm"> <object idref="fields"/> </object> </boolean> <if expr="ans == true"> <echo> <string>Validation Succeeded...</string> </echo> <else> <echo> <string>Validation Failed...</string> </echo> </else> </if> That is, I call a method 'validateForm' with an ArrayList of data to validate. Here is what I see: validateForm:We have 1 fields to validate validateForm:Inside validateForm... validateForm:String value: 'Title' validateForm:Required: 'true' validateForm:Integer type value is '0' validateForm:The form return status is 'true' true <-- this line is echoed from my XML file Validation Failed... <-- echoed from my XML file as well And here is how I interpret what I see: Thus, the validateForm method is called, and all my hastily-added debugging prints out, then the resulting boolean is printed as 'true' as it should be. However, in the lines that follow, where the result of the method call is to be assigned to a boolean no debug lines from validateForm are printed, indicating that it was not called. |