Skip to main content
replaced http://salesforce.stackexchange.com/ with https://salesforce.stackexchange.com/
Source Link

I have one field "MyYear__c" on my custmon object. This field has following details:

Data Type: Number
Length: 4
Decimal Places: 0

At the visualforce page it looks like this:

<apex:inputField value="{!obj.MyYear_c}" required="true"/>

The user must fill this field out and then the outputPanel is re-rendered. After that there is a dot in this field:

enter image description here

Is there a way to remove the dot? I don't want to use any "not clear" solutions like Javascript. I want to know is there a "native" visualforce or apex solution for that. I know there are some workroundsworkrounds, but only for the outputText, not for inputField.

Thank you.


Here my code:

Page:

<apex:pageBlock id="mainBlock">
    <apex:pageBlockSection columns="2">
        <apex:inputField value="{!obj.MyNumber__c}" required="true"/>
        <apex:commandButton value="Validate" action="{!doValidation}" reRender="mainBlock"/>
    </apex:pageBlockSection>
</apex:pageBlock>

Controller:

public MyObject__c obj { get; set; }

public MyClass(){
    obj = new MyObject__c();
}

public PageReference doValidation(){
    // Validation stuff here
    return null;
}

I have one field "MyYear__c" on my custmon object. This field has following details:

Data Type: Number
Length: 4
Decimal Places: 0

At the visualforce page it looks like this:

<apex:inputField value="{!obj.MyYear_c}" required="true"/>

The user must fill this field out and then the outputPanel is re-rendered. After that there is a dot in this field:

enter image description here

Is there a way to remove the dot? I don't want to use any "not clear" solutions like Javascript. I want to know is there a "native" visualforce or apex solution for that. I know there are some workrounds, but only for the outputText, not for inputField.

Thank you.


Here my code:

Page:

<apex:pageBlock id="mainBlock">
    <apex:pageBlockSection columns="2">
        <apex:inputField value="{!obj.MyNumber__c}" required="true"/>
        <apex:commandButton value="Validate" action="{!doValidation}" reRender="mainBlock"/>
    </apex:pageBlockSection>
</apex:pageBlock>

Controller:

public MyObject__c obj { get; set; }

public MyClass(){
    obj = new MyObject__c();
}

public PageReference doValidation(){
    // Validation stuff here
    return null;
}

I have one field "MyYear__c" on my custmon object. This field has following details:

Data Type: Number
Length: 4
Decimal Places: 0

At the visualforce page it looks like this:

<apex:inputField value="{!obj.MyYear_c}" required="true"/>

The user must fill this field out and then the outputPanel is re-rendered. After that there is a dot in this field:

enter image description here

Is there a way to remove the dot? I don't want to use any "not clear" solutions like Javascript. I want to know is there a "native" visualforce or apex solution for that. I know there are some workrounds, but only for the outputText, not for inputField.

Thank you.


Here my code:

Page:

<apex:pageBlock id="mainBlock">
    <apex:pageBlockSection columns="2">
        <apex:inputField value="{!obj.MyNumber__c}" required="true"/>
        <apex:commandButton value="Validate" action="{!doValidation}" reRender="mainBlock"/>
    </apex:pageBlockSection>
</apex:pageBlock>

Controller:

public MyObject__c obj { get; set; }

public MyClass(){
    obj = new MyObject__c();
}

public PageReference doValidation(){
    // Validation stuff here
    return null;
}
make title clear that the "dot" is a thousands separator in the number
Link

Removing dot (thousands separator) in thea numeric apex:inputField (number)

Tweeted twitter.com/#!/StackSalesforce/status/306485841226784768
added 592 characters in body
Source Link
Sergej Utko
  • 22.1k
  • 11
  • 60
  • 88

I have one field "MyYear__c" on my custmon object. This field has following details:

Data Type: Number
Length: 4
Decimal Places: 0

At the visualforce page it looks like this:

<apex:inputField value="{!obj.MyYear_c}" required="true"/>

The user must fill this field out and then the outputPanel is re-rendered. After that there is a dot in this field:

enter image description here

Is there a way to remove the dot? I don't want to use any "not clear" solutions like Javascript. I want to know is there a "native" visualforce or apex solution for that. I know there are some workrounds, but only for the outputText, not for inputField.

Thank you.


Here my code:

Page:

<apex:pageBlock id="mainBlock">
    <apex:pageBlockSection columns="2">
        <apex:inputField value="{!obj.MyNumber__c}" required="true"/>
        <apex:commandButton value="Validate" action="{!doValidation}" reRender="mainBlock"/>
    </apex:pageBlockSection>
</apex:pageBlock>

Controller:

public MyObject__c obj { get; set; }

public MyClass(){
    obj = new MyObject__c();
}

public PageReference doValidation(){
    // Validation stuff here
    return null;
}

I have one field "MyYear__c" on my custmon object. This field has following details:

Data Type: Number
Length: 4
Decimal Places: 0

At the visualforce page it looks like this:

<apex:inputField value="{!obj.MyYear_c}" required="true"/>

The user must fill this field out and then the outputPanel is re-rendered. After that there is a dot in this field:

enter image description here

Is there a way to remove the dot? I don't want to use any "not clear" solutions like Javascript. I want to know is there a "native" visualforce or apex solution for that. I know there are some workrounds, but only for the outputText, not for inputField.

Thank you.

I have one field "MyYear__c" on my custmon object. This field has following details:

Data Type: Number
Length: 4
Decimal Places: 0

At the visualforce page it looks like this:

<apex:inputField value="{!obj.MyYear_c}" required="true"/>

The user must fill this field out and then the outputPanel is re-rendered. After that there is a dot in this field:

enter image description here

Is there a way to remove the dot? I don't want to use any "not clear" solutions like Javascript. I want to know is there a "native" visualforce or apex solution for that. I know there are some workrounds, but only for the outputText, not for inputField.

Thank you.


Here my code:

Page:

<apex:pageBlock id="mainBlock">
    <apex:pageBlockSection columns="2">
        <apex:inputField value="{!obj.MyNumber__c}" required="true"/>
        <apex:commandButton value="Validate" action="{!doValidation}" reRender="mainBlock"/>
    </apex:pageBlockSection>
</apex:pageBlock>

Controller:

public MyObject__c obj { get; set; }

public MyClass(){
    obj = new MyObject__c();
}

public PageReference doValidation(){
    // Validation stuff here
    return null;
}
deleted 4 characters in body; edited title
Source Link
Sergej Utko
  • 22.1k
  • 11
  • 60
  • 88
Loading
Source Link
Sergej Utko
  • 22.1k
  • 11
  • 60
  • 88
Loading