• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
strange parser bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

strange parser bug?


  • Subject: strange parser bug?
  • From: "Andrew R. Kinnie" <email@hidden>
  • Date: Thu, 06 Aug 2009 10:46:39 -0400

I discovered something strange, and I'm not sure if it's my personal vortex of eclipse-freakiness or a bug.

I had a WOString inside a WOConditional, followed by another condition if the first fails. Both were declared inline. The conditional was declared inline with the shortcut

<wo:if condition="mycondition" ><wo:string value="$someKey" numberformat="##,##0"/></wo:if>
<wo:else><wo:string value="$someKeyPercentage" numberformat="##.00%"/ ></wo:else>


Yes, I know, I forgot the "$" in front of the condition which was actually in the java class. The conditional was supposed to display some data in raw numerical format, or if false, in percentage format. There was a WOSubmitButton to toggle the conditional using a java action method.

I had this weird bug where the data would actually be properly different based on the toggle (despite the lack of "$" in front of the conditional), but the format would fail to change.

So I may get 5,782 as a number and 16 as a percentage (which was the numerical value of the percentage with the decimal points truncated).

When I added the "$" the formatter in the else started working.

So, I am curious as to how the parser knew to get the data from the java calculation, but did not know how to apply the formatter when I did not include the "$" in front of the boolean key. I would have expected it to not change at all, because it couldn't parse the conditional from the java, and therefore would not grab the data from the else. Instead the bug caused me to think and re-think my calculations, when in fact the problem was only that I forgot the "$" in the html.

Any thoughts?

Andrew Kinnie

PS:  WO 5.4.3, Wonder 8988, WOLips 5873 (Mac OS X 10.5.7)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: My first Eclipse D2W [solved]
  • Next by Date: Multiple EO classes inheriting from one abstract superclass?
  • Previous by thread: Re: My first Eclipse D2W [solved]
  • Next by thread: Multiple EO classes inheriting from one abstract superclass?
  • Index(es):
    • Date
    • Thread