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
amitashtekaramitashtekar 

Keeping values populated within inputSecret field

Hi,

 

I want to keep values entered within apex:inputSecret field if the action failed.

 

I am not making the variable as transient , still the value disappear if action fails.

 

So is there any work around for it.

 

Thank you.

kiranmutturukiranmutturu

this component is for typing passwords not to keep the values when an action fails......

transient field on Visualforce page that is needed only for the duration of a page request but its not the part of the view state...construct the url with repest to ur input values that needs to be filled when an error hits

 

like

 

string Url1 = 'https://' + ApexPages.currentPage().getHeaders().get('Host') + '/apex/NewAppointment?AId='+AppointmentId;
PageReference PageRef = new PageReference(Url1);
PageRef.setRedirect(true);
return Pageref;