Change this:
<binding name="translator" value="translator:number,pattern=#.#"/>
to this:
<binding name="translator"
value="translator:number,pattern=#.#,omitZero=false"/>
The 'omitZero' property in
org.apache.tapestry.form.translator.NumberTranslator is true by
default. Paul Ferraro (who I believe contributed much of the
translation and validation system for Tap 4.0) argues that omitZero
should be false by default in this JIRA issue:
http://issues.apache.org/jira/browse/TAPESTRY-633
So vote for it if you agree.
-Ryan
On Oct 14, 2006, at 11:44 AM, Jabbar wrote:
Oops. The textfield component definition is
<component id="dailyHighThreshold" type="TextField">
<binding name="value"
value="currentChannelSetup.dailyThreshold.highThresholdDouble"/>
<binding name="translator"
value="translator:number,pattern=#.#"/>
<binding name="validators"
value="validators:required[You must
enter {0}!], min=0"/>
<binding name="displayName"
value="literal:Daily High Threshold"/>
<binding name="disabled"
value="!currentChannelSetup.dailyThreshold.dailyThresholdEnabled"/>
</component>
On 14/10/06, Jabbar <[EMAIL PROTECTED]> wrote:
Hello again,
I have another problem. It concerns the textfield the definition is
<component id="dailyHighThreshold" type="TextField">
<binding name="value"
value="currentChannelSetup.dailyThreshold.highThresholdDouble"/>
<!--
<binding name="translator"
value="translator:number,pattern=#.#"/>
<binding name="validators"
value="validators:required[You must
enter {0}!], min=0"/>
<binding name="displayName"
value="literal:Daily High Threshold"/>
-->
<binding name="disabled"
value="!currentChannelSetup.dailyThreshold.dailyThresholdEnabled"/>
</component>
when value is numeric 0 then the textfield also shows a blank. I
don't
understand this! Anybody got any ideas?
--
Thanks
A Jabbar Azam
--
Thanks
A Jabbar Azam
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Ryan Holmes, CISSP
[EMAIL PROTECTED]
ph. (213) 626-0026
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]