You need to sign in to do that
Don't have an account?
Manjeet
InputText Reset issue ???????
Hi All
Will Anybody let me know how to reset a apex:inputText component . I have tried ajax to rerender the id of this textbox but nothing works for me .
<apex:inputText value="{!test}" id="123"/>
<apex:commandButton action="{!reset}" value="RESET" rerender="123"/>
controller
public string test {get;set;}
public PageReference reset(){
test = null;
retrun null;
}
thanks to all of you ..
Hi Manjeet,
I tried the same code. It works fine for me.
I am putting my code below, Please check
Are you using something else also on the page?
Yes the page contain many search fields including inputfiled of type text ,inputtext, inputfield of type pickList .
Input Text and input Filed of type Pick List are creating problem during reset .
Yes, you are right.
I think its because of inputField Picklist that your inputText is not resetting.
Are you also trying to reset your picklist?
And If yes, is it happening?
I am trying to reset all filter fields when user click on reset button . but only inputfield of type text reset its value ,not pickList and inputText .
Please can you post your code.
And if possible try not using inputfield for Picklist and inputText also, use custom picklists and inputText instead.
Controller
is Reset is so complex on force.com . why they didnt make a simple solution for it ?
Hi Manjeet,
Please alter your code as follows:
If your inputField is of type picklist do the following:
Also instead of InputField of type inputText, use a normal inputText only.
This will definitely solve your issue.