Mashups in Presto Wires : Customizing Wires : Configure Strings, Numbers, Dates or Boolean Properties in Custom Blocks : Decimal Numbers
Decimal Numbers
You can allow users to enter decimal values for custom block property that corresponds to a macro input parameter with a number datatype. Use the macro metadata element <type> in <parameter> and a datatype of decimal. For example:
<macros xmlns="http://www.open-mashup.org/schemas/v1.0/EMML"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openmashup.org/schemas/v1.0/EMML/..
/schemas/EMMLPrestoSpec.xsd"
domain="myBlocks">

<macro name="helloWorld"
xmlns:presto="http://www.jackbe.com/v1.0/EMMLPrestoExtensions"
xmlns:macro="http://www.openmashup.org/schemas/v1.0/EMMLMacro">
<presto:macro-meta>
<block usage="Wires">
...
</block>
<parameters>
<parameter name="aNumber">
<label>A decimal</label>
<type datatype="decimal"/>
</parameter>
...
</parameters>
</presto:macro-meta>
....
</macro>
...
</macros>
With a decimal datatype in the macro metadata, Wires does not accept any alphabetic characters in user entries. If users enter a decimal point, they must enter at least one decimal digit in the number.
Note:  
This datatype does not support floating point notation for numbers.
Copyright © 2013-2015 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback