Skip to Content
avatar image
Former Member

Input field issue

HI,

I have an input field UI lement which is mapped to a static attribute of type integer.When I input the field with some integer say 1000,in the fiel, its comming as 1,000(comma is comming inbetween).

Similarly if I input 123450 in the input field.its comming like 1,23,450 in the input fiels UI element.

Can any one of you plz suggest how to remove the (,comma) from the input field.

Regards

-Sandip

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 30, 2008 at 09:01 AM

    Hi Sandip,

    Create a simple type in local dictionary of built in type integer. In the representation tab you can give any format you want. For your requirement you can give ####### in the format. You can also try other formats like ##,#### etc. Now create a context attribute and in it's type property give the simple type you have created by selecting the appropriate folder. Now map this attribute with the input field.

    Regards

    Raghu

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 30, 2008 at 07:07 AM

    Hi,

    refer this thread

    ho-to-set-the-format-of-an-inputfield-of-type-inte

    Regards,

    ramesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 30, 2008 at 12:29 PM

    Hi,

    Try to use StringTockenizer in this case.,

    use StringTockenizer to split the strings by comma

    http://java.sun.com/j2se/1.3/docs/api/java/util/StringTokenizer.html

    String str = "strting1,string2,string3";

    StringTokenizer st = new StringTokenizer( str, ",");

    while( st.hasMoreTokens())

    {

    wdComponentAPI.getMessageManager().reportSuccess( st.nextToken());

    }

    Regards,

    Gurprit Bhatia

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 30, 2008 at 05:11 PM

    Sandip,

    Create a 'Simple Type' of Built in type integer. On representation tab, in 'External representation' area enter ## in for 'Format'. This should remove the commas from display. Use this SimpleType as Type of your context attribute.

    For more formatting options see [this page|http://www.exampledepot.com/egs/java.text/FormatNum.html].

    For more dictionary queries, [this article|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00c062ec-f90d-2a10-52bd-df57de2d1ddb] is excellent.

    Hope this helps.

    Vishwas.

    Add comment
    10|10000 characters needed characters exceeded