You need to sign in to do that
Don't have an account?

new() in visualforce page..
Hi i have developed a visualforce page ...and i have defined acommandbutton (New).UP on command button i invoked an action called newrecord().
and code for newrecord() is as follows .
public PageReference newRecord()and my command button is as follows.
{
PageReference pr = System.Page.caftest6; // or 'new PageReference('url');//
pr.setRedirect(true);
return pr;
}
<apex:commandButton disabled="{!isNewButtonDisabled}" value="New" action="{!newRecord}" />
Now when ever i click new button its redirected back to d same page...so as u know redirection will take moretime instead of redirection i want to be in d same page but want to define a new mode for d page.so dat wen i click new button standard new button functionality is achieved ..So what i expect is without redirecting to d same page again i want to be in d same pagein new mode.. I have tried it by clearing d fields but den d page is not in new mode.....
So someone plz help me with an saqmple example of defining new mode for new button instead of redirecting to the same page again...
