Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1337: Improved DataValue.isZero

2010-01-26 Thread Bob Jolliffe
2010/1/26 Lars Helge Øverland larshe...@gmail.com 2010/1/26 Trí Trần Thanh tranthanhtr...@gmail.com Tran Thanh Tri HISP Viet Nam Cell phone: +84903670967 Website: http://tringuyenvn.com 2010/1/25

Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1337: Improved DataValue.isZero

2010-01-26 Thread Trí Trần Thanh
Hi all, my way is easy and simple. Cast to Double and compare with new Double(0). new Double(value).equal(new Double(0)) ? how do you think? On 1/26/10, Bob Jolliffe bobjolli...@gmail.com wrote: 2010/1/26 Lars Helge Øverland larshe...@gmail.com 2010/1/26 Trí Trần Thanh

Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1337: Improved DataValue.isZero

2010-01-26 Thread Jason Pickering
Hi Bob, I might suggest just a small change. ^[0]*[\.,]?[0]*$ Escape the period and add a comma for some locales that use commas instead of periods. I am not aware of other decimal points, perhaps a semicolon? I am a bit confused though about the concept here. Values in DHIS are stored in the

Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1337: Improved DataValue.isZero

2010-01-26 Thread Bob Jolliffe
I don't think a java.util.regex solution would be hugely more complicated. One advantage is that all it expects is the string datavalue. If casting to a double you might also need to catch a class caste exception to be on the safe side. ie you have to ask is it a double first before you can ask

Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1337: Improved DataValue.isZero

2010-01-26 Thread Bob Jolliffe
2010/1/26 Jason Pickering jason.p.picker...@gmail.com Hi Bob, I might suggest just a small change. ^[0]*[\.,]?[0]*$ Escape the period and add a comma for some locales that use commas instead of periods. I am not aware of other decimal points, perhaps a semicolon? True. This is better.

Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1337: Improved DataValue.isZero

2010-01-26 Thread Bob Jolliffe
2010/1/26 Bob Jolliffe bobjolli...@gmail.com 2010/1/26 Jason Pickering jason.p.picker...@gmail.com Hi Bob, I might suggest just a small change. ^[0]*[\.,]?[0]*$ Escape the period and add a comma for some locales that use commas instead of periods. I am not aware of other decimal points,

Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1337: Improved DataValue.isZero

2010-01-26 Thread Jason Pickering
True, not that many people are inclined but there are some of us that find them quite useful. i suspect that many of the most common could easily be populated as defaults, and developed by those that actually need it. I would see this as a huge advantage if implemented. Let me list some of the

Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1337: Improved DataValue.isZero

2010-01-26 Thread Lars Helge Øverland
Feel free to write a blueprint... ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp

Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1337: Improved DataValue.isZero

2010-01-26 Thread Jason Pickering
https://blueprints.launchpad.net/dhis2/+spec/regex-validation Done. Regards, Jason 2010/1/26 Lars Helge Øverland larshe...@gmail.com: Feel free to write a blueprint... ___ Mailing list: https://launchpad.net/~dhis2-devs Post to :

[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1337: Improved DataValue.isZero

2010-01-25 Thread noreply
revno: 1337 committer: Lars Helge Oeverland larshe...@gmail.com branch nick: trunk timestamp: Mon 2010-01-25 15:30:51 +0100 message: Improved DataValue.isZero modified:

Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1337: Improved DataValue.isZero

2010-01-25 Thread Trí Trần Thanh
Tran Thanh Tri HISP Viet Nam Cell phone: +84903670967 Website: http://tringuyenvn.com 2010/1/25 nore...@launchpad.net revno: 1337 committer: Lars Helge Oeverland

Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1337: Improved DataValue.isZero

2010-01-25 Thread Lars Helge Øverland
2010/1/26 Trí Trần Thanh tranthanhtr...@gmail.com Tran Thanh Tri HISP Viet Nam Cell phone: +84903670967 Website: http://tringuyenvn.com 2010/1/25 nore...@launchpad.net