You need to sign in to do that
Don't have an account?
the_wolf
CommandButton not work with URL rewriter as outputLink with $Page
Hi all,
in new feature URL rewriter to navigate correctly from one page to another, it need to use URLFOR function with $page variable. Example:
<apex:outputLink value="{!URLFOR($Page.myOtherPage)}" />
But i have this commandButton that not work with my site that have enabled URL rewriter ! It return "Site in Maintenence" after click this button, and not myPage!
This is the button:
<apex:commandButton action="{!search}" value=" " styleClass="trova" id="searchButton"/>
And here is the code in my controller:
public PageReference cerca() {
PageReference acctPage = Page.myPage;
acctPage.setRedirect(true);
return acctPage;
}
How to set good the apex:commandButton, as the outputLink with $Page variable?
Thanks in advance!
I can't seem to reproduce your problem. I have a (very) simple rewriter:
Using your commandbutton & controller code, I get redirected to /myPage?REWRITTEN=TRUE when I click the button.
Try adding debugging to the end of your rewriter to see what URLs it's actually generating, and then just straight copy & pasting those URLs to see if they're really valid.
Hi
Did you get any solution for this ?
Any help is greatly appreciated.
Thanks