Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B1264200D24 for ; Tue, 24 Oct 2017 15:01:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id ACD16160BF2; Tue, 24 Oct 2017 13:01:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 066D8160BDB for ; Tue, 24 Oct 2017 15:01:03 +0200 (CEST) Received: (qmail 16696 invoked by uid 500); 24 Oct 2017 13:01:02 -0000 Mailing-List: contact users-help@wicket.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@wicket.apache.org Delivered-To: mailing list users@wicket.apache.org Received: (qmail 16674 invoked by uid 99); 24 Oct 2017 13:01:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Oct 2017 13:01:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id D8F22C6C4A for ; Tue, 24 Oct 2017 13:01:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.48 X-Spam-Level: ** X-Spam-Status: No, score=2.48 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=solsoft-pl.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id unS6siijC6di for ; Tue, 24 Oct 2017 13:01:00 +0000 (UTC) Received: from mail-lf0-f47.google.com (mail-lf0-f47.google.com [209.85.215.47]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 888D35FB40 for ; Tue, 24 Oct 2017 13:01:00 +0000 (UTC) Received: by mail-lf0-f47.google.com with SMTP id p184so23852471lfe.12 for ; Tue, 24 Oct 2017 06:01:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=solsoft-pl.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=GwVHFlGc157LesmOZ241iRfz5yYiWOTok50QampC4uE=; b=ZccSEu7/ZaP+V2UZuCthpr2nUk0T2hXqBvCjC7cEgYQLhAvQymEHSAx1Jo7peL+1OY 6GHgEANwicpapn8fTH4lamETbv515o4wbPvFHT+K1orYa1a3ddfKDdrM4TzZ3UxA+z4I UUekPc9llZIwFYR2rj8QcLxxyfKK9knB5Cyz5ii7y6RLeJCsRVAlc+byHt1UHoivYWJT XW7ENVQrloB76lX74ecMMcM/F74/RxB23cRJ5NzvWgBRES9X0xsJxb+n2tY5oeXW6RVu 0UH6gGGF94JihFeJJFfMaj5PW6bPidj4AVzmMjxgFTgh9oYbk45jD9AgnHwx2I6IMfQf Qphw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=GwVHFlGc157LesmOZ241iRfz5yYiWOTok50QampC4uE=; b=Vcaw/3Qwtdv2XGyD9Iz8fueykQNdn5UGpqpJdJwIi8GvRsP1Xqmr6EnEF+zdzP9BwN JHSuft+FOKqK0r0i5HpY7bj2bBJ33KPVY34zkfZrGgPa08FFvMTAXPHPQ8oMRpIUCZkf ZLi3uyZZOamAO/+b8/bxPcGDmCY+55w//y+qkmYrUbkewoQ3lwHQruy9vhKX3UxdMXL4 JnNm0/ZAse5KkSRkxiHehhvplTCfieABBgQfC7BPdS2fpgq/0H12gf3wT/nTsXb1TDIU MY1DIsGbh9kfRcA+ukXS7oVUG/f7LNrk4smuRLGTKnx5xKUV2ov0tAmQeJrwpi3W3KWw TKsw== X-Gm-Message-State: AMCzsaU5lKuh5MQJwxcx5XjLZO9PFaAxp3WN7uAICxTqB1Qk0coXxL5t KE0s8MkRf/MqOX3KU4lPZqPnRPpg6bo= X-Google-Smtp-Source: ABhQp+R/SxKyrghtE0mFWLjs95m42gw9yUeo+u3kR3mGhnf+rymZxM/0c7Sng1vrjFeA1FFiIDIxYw== X-Received: by 10.46.95.19 with SMTP id t19mr7718516ljb.2.1508850059860; Tue, 24 Oct 2017 06:00:59 -0700 (PDT) Received: from [192.168.20.152] (maingate.solsoft.pl. [91.194.157.123]) by smtp.gmail.com with ESMTPSA id f14sm46400lfg.53.2017.10.24.06.00.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Oct 2017 06:00:59 -0700 (PDT) Subject: Re: How to format number in (Number)TextField? To: users@wicket.apache.org References: <3d850994-f220-1911-1638-0ac1156496e2@solsoft.pl> From: =?UTF-8?Q?Kamil_Pa=c5=9bko?= Message-ID: Date: Tue, 24 Oct 2017 15:00:59 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------EFC0C16B3DF3A8343FC5CF92" Content-Language: pl archived-at: Tue, 24 Oct 2017 13:01:04 -0000 --------------EFC0C16B3DF3A8343FC5CF92 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Maxim, I tried with:     private final class MyFormattedField extends TextField implements ITextFormatProvider {         private MyFormattedField(String id, IModel model) {             super(id, model);         }         @Override         public String getTextFormat() {             return "### ###.###";         }     } but this doesn't do anything. user can type "12321321321" and value is not formatted W dniu 2017-10-24 o 14:37, Maxim Solodovnik pisze: > I believe you can override "getTextFormat > ()" > method and provide your own format > According to right align: you can use CSS class for that :) > > On Tue, Oct 24, 2017 at 6:52 PM, Kamil Paśko > wrote: > > Dear Wicket user group, > > > I have a TextField (but I can use NumberTextField as well) and > when user types a number I want that: > > 1) number is positioned to the right > > 2) thousands are separated by spaces > > 3) floating point character is "." > > How can I "force" that format in a TextField? > > Kind regards, > > Kamil > > > > > -- > WBR > Maxim aka solomax --------------EFC0C16B3DF3A8343FC5CF92--