You need to sign in to do that
Don't have an account?
<apexPage : InputField> and <apexPage: InputText>
Hi All
Below is the code,
<apex:repeat value="{!listASPSubCategories}" var="oneSubCategory" id="aspSubCategoriesShipment">
<tr>
<td style="white-space: nowrap; width:9%;">
<apex:outputField value="{!oneSubCategory.Material_Sub_Category__r.Name}" id="nameShipment" />
</td>
<apex:repeat value="{!oneSubCategory.ASP_Item_Volume__r}" var="oneASPItemVolforSubCatg" id="aspSubCategoriesShipment">
<td class="customTableNumberCell" style="width:7%;">
<apex:inputField styleClass="tableNumberTextField" value="{!oneASPItemVolforSubCatg.Volume_Forecast__c}" id="aspItemVolforSubCatgShipment" style="text-align: right !important;padding-left: 2px !important;padding-right: 2px !important; width:90%;" rendered="{!visibleCurrentSupplyPlan}"/><
/td>
<!--<td class="customTableNumberCell" style="width:7%;">
<apex:inputText styleClass="tableNumberTextField" value="{!oneASPItemVolforSubCatg.Volume_Forecast__c}" id="aspItemVolforSubCatgShipment" style="text-align: right !important;padding-left: 2px !important;padding-right: 2px !important; width:90%;" disabled="{!visibleCurrentSupplyPlan}" />
</td> -->
</apex:repeat>
<td class="customTableNumberCell" style="width:7%;">
<apex:outputField styleClass="tableNumberTextField" value="{!oneSubCategory.Total_Volume_Forecast__c}" id="aspSubCatgTotalShipment" />
</td>
</tr>
</apex:repeat>
I am facing issue in <apex:Inputfield>, if I am giving the render= true, it is not at all displaying the data. Actually I don't want to edit the data, I just want to view the data in <apex:Inputfield> and I also tried using <apex:Input text> disable attribute, it is showing the numbers with decimal point i.e..(123.0) I don't want to see the .0 value into the field.
This above is for Edit page, if "status=complete" have to make this table to be readonly.
Please help!
use outputfield tag then <apex:outputfield> and try
Hi Kiran
Thanks for the reply!
if status = complete then i need this table to be readonly, otherwise it should be editable so, for this requirement i can't use outputfield.
any other solutions?
Thanks!
You can have two components one after the other inside <apex:repeat>
<apex:inputField value="{!field__c}" rendered="{!NOT(completeStatus)}"/> here rendered if status not equal to complete, with value of the field. This will be editable
<apex:outputField value="{!field__c}" rendered="{!completeStatus}"/> here rendered if status is equal to complete, with value of the field. This will be read only
Set "completeStatus" variable to be true or false accordingly in the controller.
Patcs
If your concern is to remove the .0 from values like 123.0 while using the <apex:Inputtext> then you can remove it by using {!ROUND(somefield__c,0)}
remove somefield__c with the appropriate field name.
Hope that helps
Hi Sam,
when i tried, it is throwing an error "syntax error.Missing ')' "
below is the code
<apex:inputText styleClass="tableNumberTextField" value="{!ROUND(oneASPItemVolforSubCatg.Volume_Forecast__c,0)}" id="aspItemVolforSubCatgShipment" style="text-align: right !important;padding-left: 2px !important;padding-right: 2px !important; width:90%;" disabled="{!visibleCurrentSupplyPlan}"/>
is there any thing i did wrong,Please let me know.
Thanks!
yeah sorry,
I crossed check it, the global function wasn't working with <apex:inputText> tag.....I find it strange....would look why its not working but I guess then its not a solution in your case.
Hi sam
Thanks for your concern. is there any other way to achive this.
Howdy!!!
I have the same problem, Im using "apex:inputtext" because it allows me to disable it and update the object with the new values, but by the time it renders or pulls the the data from the object Im getting "1.0" when i just want to display an Integer "1"
Using FLOOR <apex:inputtext value="{!FLOOR(Object__c.field__c)}"/> returns an error
Save error: Error sintax. Missing ')' Page.page line 0 Force.com save problem
Any help will be appreciated !!!
Cheers!!!
I'm having the same issue.
I have the same issue..