function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
chandra2ravichandra2ravi 

Vf page Old Values erased button click

Hi All,

 

I am using inputfile ,inputtext 

i am submit the button inputtext previous values erased. how to stop this.

without input file this is working fine.but  i want input file also.

 

 

<apex:inputFile value="{!document.body}" filename="{!document.name}" id="file"/>

 

regards,

ravi.

Pradeep_NavatarPradeep_Navatar

It seems that you are using "Transient" keyword before the FileBody property in Controller and due to this it is erasing the previous values from <apex:inputFile> VF tag on Page submit. Remove the "Transient" before the FileBody property in Controller to keep the previous values. Use like this-

 

            public Blob propFileBody{ get; set; }

 

Hope this helps.