You need to sign in to do that
Don't have an account?
Shirish Dwivedi
How to set a string value "True" in an inputText automatically without typing using JS or JS remoting? or any other way?
Here is my vf page code:
<apex:inputText value="{!searchString}" id="txtbxdo" onkeydown="if(event.keyCode==13){this.blur();}else{resetTimer();}" style="width:200px"/>
Here is my controller class
public with sharing class opportunityProductEntryExtension {
public String searchString {get;set;}
public String getsearchString(){
return 'True';
}
public String setsearchString(String searchString){
if (this.searchString==searchString) {
return 'true';
}
else {
return null;
}
}
<apex:inputText value="{!searchString}" id="txtbxdo" onkeydown="if(event.keyCode==13){this.blur();}else{resetTimer();}" style="width:200px"/>
Here is my controller class
public with sharing class opportunityProductEntryExtension {
public String searchString {get;set;}
public String getsearchString(){
return 'True';
}
public String setsearchString(String searchString){
if (this.searchString==searchString) {
return 'true';
}
else {
return null;
}
}
You can try using Constructor for same
public with sharing class opportunityProductEntryExtension {
public String searchString {get;set;}
public opportunityProductEntryExtension{
searchString = true;
}
}
I hope this helps
Thanks and Regards
Kanika Dua