Sep
3

Formatting, Visibility and Watermarks

First off, there’s a new forum on the SAP site dedicated to the Xcelsius SDK – nice!

https://forums.sdn.sap.com/forum.jspa?forumID=466

After running through the Xcelsius SDK forum, I noticed a few quick-win issues posted that I’d like to lend a hand on.

The issues are:

  1. Dynamic Visibility
  2. Number Formatting
  3. and…Flex Charting Watermarks (a very annoying problem).


Let’s start with the watermark:

It can be frustrating trying to track this illusive charting watermark down as it seems it should just work out of the box. However, that’s not the case. If you’re building Flex charts against the 2.0.1 SDK AND using Flex Builder 3 to do it, follow the steps in this KB article and you should be good to go:

http://kb2.adobe.com/cps/403/kb403860.html

Next, let’s take a look at dynamic visibility.

Here’s the problem described: https://forums.sdn.sap.com/thread.jspa?threadID=1456645&tstart=0

And here is a working example of a simple Boolean value visibility implementation controlling a Button’s visibility property. We normally use status keys as an approach, but if you just need a simple toggle, this should do the trick. Making the private variable Bindable is the key.

VisTest

And finally…number formatting.

If you are consuming formatted numbers in a component and then doing something with those values and subsequently writing them back to the Excel model, it’s best to treat those values as Objects or Numbers.

i.e.

ObjectProperty

As you may be aware, you can’t leverage any kind of inherent Xcelsius formatting utilities via the SDK but this approach should ensure that the integrity of the consumed value is preserved when it’s written back to the Excel model. If you need to format numbers in your component, use the Flex CurrencyFormatter and NumberFormatter, etc. classes to get your desired number formatting results.

Tags: , , ,

Leave a Reply