Привет! Я пытаюсь перенаправить страницу visualforce на страницу google.com.
вот мой код VF
<apex:page controller="google_redir">
<!-- Begin Default Content REMOVE THIS -->
<h1>Congratulations</h1>
This is your new Page
<!-- End Default Content REMOVE THIS -->
<apex:form >
<apex:commandButton action="{! hello1}" value="Save New Account Value"/>
</apex:form>
</apex:page>
и вот мой код контроллера apex
public class google_redir{
public PageReference hello1(){
PageReference reference=new PageReference('http://www.google.com');
reference.setRedirect(true);
return reference;
}
}
страница, не перенаправленная на google.com, показывает пустую страницу.
Пожалуйста, помогите мне исправить ошибку, если я ошибаюсь, почему она не перенаправляет на страницу google.com.