title: Transfer parameter from jsf with f:attribute to java variable?
body: <p>I want to transfer parameter #{myvar.tc} with f:attribute component. In the datatable cocukDoktor() method "dr_tc" came. I want to run drgor.sayfaYonlendirme() after parameter transfer. But #{myvar.tc} doesn't transfer. What can I do?     </p>
  
  <pre><code> &lt;h:dataTable value="#{doktor.cocukDoktor()}" var="myvar"&gt;
                      &lt;table&gt;
                          &lt;tr&gt;
                              &lt;td&gt;
                                  &lt;h:column&gt;
                                  &lt;h:graphicImage class="doktorfoto" value="resources/images/doktorfoto.jpg"/&gt;  
                                  &lt;/h:column&gt;
                              &lt;/td&gt;
                              &lt;td&gt;
                                  &lt;h:column&gt;
                                       &lt;h:form&gt;
                                           &lt;h:commandLink class="doktorismi" action="#{drgor.sayfaYonlendirme()}" actionListener="#{drgor.drtcAyarla}" &gt;#{myvar.dr_adi} #{myvar.dr_soyadi}
                                               &lt;f:attribute name="dr_tc" value="#{myvar.dr_tc}"/&gt;
                                      &lt;/h:commandLink&gt;   
                                      &lt;/h:form&gt;
                                  &lt;/h:column&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                     &lt;/table&gt;
                   &lt;/h:dataTable&gt;
  </code></pre>
  
  <p>Bean code</p>
  
  <pre><code>@ManagedBean( name="drgor")
  @SessionScoped
  public class doktorgoruntule {
  
    Connection conn = null;
    PreparedStatement ps = null;
    ResultSet rs = null;
    String drAdi;
    String drSoyadi;
  
    public String getDrAdi() {
        return drAdi;
    }
  
    public void setDrAdi(String drAdi) {
      this.drAdi = drAdi;
    }
  
    public String getDrSoyadi() {
      return drSoyadi;
    }
  
    public void setDrSoyadi(String drSoyadi) {
      this.drSoyadi = drSoyadi;
    }
  
  
    public String dr_tc;
  
    public void setDr_tc(String dr_tc) {
      this.dr_tc = dr_tc;
    }
  
    public String getDr_tc() {
      return dr_tc;
    }
  
    public void drtcAyarla(ActionEvent event){
      dr_tc = (String)event.getComponent().getAttributes().get("dr_tc");
    }
  
    public String sayfaYonlendirme(){
      return "cocukDoktorGoruntule?faces-redirect=true”";
    }
  
    public ResultSet cocukdoktorGoruntule() throws Exception{
  
  
       try{
          Class.forName("org.postgresql.Driver");
          conn = DriverManager.getConnection("jdbc:postgresql://localhost:5432/tipmerkezivt","postgres", "2569");   
          ps = conn.prepareStatement("select * from doktor \n" +
                                      "WHERE\n" +
                                      "dr_tc = '"+dr_tc+"'" , ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
          rs = ps.executeQuery();
  
          return rs;
  
  
      }
      catch (Exception e) {
          throw new Exception("Bağlantı başarısız!");
      }
  
      finally{
          conn.close();
      }         
    }
  
  }
  </code></pre>