title: JSF ViewScoped variable not surviving redirect to same page
body: <p>With the code below, i'm using a listener on the selectOneRadio to redirect to the page with a query string in the url.</p>
  
  <p>The problem is, when i get redirected, the value of <code>newsTitle</code> and <code>selectedNews</code> are null. Why is this? Is is because i'm doing a redirect using FacesContext?</p>
  
  <p>news.xhtml</p>
  
  <pre><code>&lt;h:outputLabel for="title" value="Title" style="font-weight: bold;"/&gt;
  &lt;p:inputText id="title" required="true" value="#{contentEditorBacking.newsTitle}" &gt;
      &lt;p:ajax event="blur"/&gt;
  &lt;/p:inputText&gt;
  &lt;h:outputLabel value="Site" style="font-weight: bold;" /&gt;
  &lt;p:selectOneRadio value="#{contentEditorBacking.selectedNews}" layout="pageDirection"&gt;
      &lt;f:selectItem itemLabel="Public" itemValue="Public" /&gt;
      &lt;f:selectItem itemLabel="Member" itemValue="Member" /&gt;
      &lt;p:ajax event="change" listener="#{contentEditorBacking.addNewsArticle}" update="path"/&gt;
  &lt;/p:selectOneRadio&gt;
  </code></pre>
  
  <p>contentEditorBacking.java</p>
  
  <pre><code>@ManagedBean
  @ViewScoped
  public class ContentEditorBacking {
    private String newsTitle = null;
    private String selectedNews = null;
  
    public String getNewsTitle() {
      return newsTitle;
    }
  
    public void setNewsTitle(String newsTitle) {
      this.newsTitle = newsTitle;
    }
  
    public String getSelectedNews() {
      return selectedNews;
    }
  
    public void setSelectedNews(String selectedNews) {
      this.selectedNews = selectedNews;
    }
  
    public void addNewsArticle() throws Exception {
  
      String year = String.valueOf(Calendar.getInstance().get(Calendar.YEAR)).length() &lt; 2 ? "0"+Calendar.getInstance().get(Calendar.YEAR) : String.valueOf(Calendar.getInstance().get(Calendar.YEAR));
      String month = String.valueOf(Calendar.getInstance().get(Calendar.MONTH)).length() &lt; 2 ? "0"+(Calendar.getInstance().get(Calendar.MONTH)+1) : String.valueOf(Calendar.getInstance().get(Calendar.MONTH));
      String day = String.valueOf(Calendar.getInstance().get(Calendar.DAY_OF_MONTH)).length() &lt; 2 ? "0"+Calendar.getInstance().get(Calendar.DAY_OF_MONTH) : String.valueOf(Calendar.getInstance().get(Calendar.DAY_OF_MONTH));
      String newsPath = null;
  
      newsPath = "/" + selectedNews + "/News/" + year + "/" + month + "/" + day + "/" + newsTitle;
  
      FacesContext.getCurrentInstance().getExternalContext().redirect("news.xhtml?path="+ newsPath);
      }
  
  }
  </code></pre>