title: How I can consult fields when selecting a row in p:dataTable?
body: <p>I have a form and data table, <strong>my problem is when I select a row in my table, all fields are consulted expect a field because it depends with another field.</strong> I will appreciate if you help me to consult this field.</p>
  
  <p>my form</p>
  
  <pre><code>&lt;p:outputLabel for="Portfolio" value="#{msg['Portfolio']}" /&gt;
                      &lt;p:selectOneMenu id="Portfolio" value="#{cashMvtView.beanCashMvt.portfolio}" style="width:120px"&gt;
                          &lt;p:ajax listener="#{cashMvtView.onPortfolioChange}" update="Cashaccount" /&gt;
                          &lt;f:selectItem itemLabel="Selectionner un portefeuille" itemValue="" noSelectionOption="true" /&gt;
                          &lt;f:selectItems value="#{cashMvtView.portfolios}" /&gt;
                      &lt;/p:selectOneMenu&gt;
  
                      &lt;p:outputLabel for="Cashaccount" value="#{msg['Cashaccount']}" /&gt;
                      &lt;p:selectOneMenu id="Cashaccount" value="#{cashMvtView.beanCashMvt.cashAccount}" style="width:120px"&gt;
                          &lt;f:selectItem itemLabel="Selectionner un compte" itemValue="" noSelectionOption="true" /&gt;
                          &lt;f:selectItems value="#{cashMvtView.cashAccounts}" /&gt;
                      &lt;/p:selectOneMenu&gt;
  </code></pre>
  
  <p>cashMvtView.onPortfolioChange:</p>
  
  <pre><code>public void onPortfolioChange() {        
      if(beanCashMvt.getPortfolio() !=null &amp;&amp; !beanCashMvt.getPortfolio().equals("")){            
          cashAccounts = data.get(beanCashMvt.getPortfolio());            
      }
      else
          cashAccounts = new HashMap&lt;String, String&gt;();
  }
  </code></pre>
  
  <p>CashMvtView.java:</p>
  
  <pre><code>private Map&lt;String,Map&lt;String,String&gt;&gt; data = new HashMap&lt;String, Map&lt;String,String&gt;&gt;();
  private String portfolio; 
  private String cashAccount;  
  private Map&lt;String,String&gt; portfolios;
  private Map&lt;String,String&gt; cashAccounts;
  
  @PostConstruct
  public void init() {
      portfolios  = new HashMap&lt;String, String&gt;();
      portfolios.put("Portefeuille1", "Portefeuille1");
      portfolios.put("Portefeuille2", "Portefeuille2");
      portfolios.put("Portefeuille3", "Portefeuille3");
  
      Map&lt;String,String&gt; map = new HashMap&lt;String, String&gt;();
      map.put("Portefeuille1_1", "Portefeuille1_1");
      map.put("Portefeuille1_2", "Portefeuille1_2");
      map.put("Portefeuille1_3", "Portefeuille1_3");
      data.put("Portefeuille1", map);
  
      map = new HashMap&lt;String, String&gt;();
      map.put("Portefeuille2_1", "Portefeuille2_1");
      map.put("Portefeuille2_2", "Portefeuille2_2");
      map.put("Portefeuille2_3", "Portefeuille2_3");
      data.put("Portefeuille2", map);
  
      map = new HashMap&lt;String, String&gt;();
      map.put("Portefeuille3_1", "Portefeuille3_1");
      map.put("Portefeuille3_2", "Portefeuille3_2");
      map.put("Portefeuille3_3", "Portefeuille3_3");
      data.put("Portefeuille3", map);
  }
  
  public Map&lt;String, Map&lt;String, String&gt;&gt; getData() {
      return data;
  }
  
  public String getPortfolio() {
      return portfolio;
  }
  
  public void setPortfolio(String portfolio) {
      this.portfolio = portfolio;
  }
  
  public String getCashAccount() {
      return cashAccount;
  }
  
  public void setCashAccount(String cashAccount) {
      this.cashAccount = cashAccount;
  }
  
  public Map&lt;String, String&gt; getPortfolios() {
      return portfolios;
  }
  
  public Map&lt;String, String&gt; getCashAccounts() {
      return cashAccounts;
  }
  </code></pre>
  
  <p>my data table:</p>
  
  <pre><code>&lt;p:dataTable var="cashMvt"  value="#{cashMvtView.listeFilteredCashMvt}" 
                                   selectionMode="single" filteredValue="#{cashMvtView.listeFilteredCashMvt}"
                                   selection="#{cashMvtView.selectedCashMvt}" 
                                   rowKey="#{cashMvt.id}"  tableStyle="width:auto"
                                   paginator="true" widgetVar="tabRecherche" id="tabRecherche"
                                   paginatorPosition="bottom"  rows="14"
                                   paginatorTemplate="{Exporters} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} 
                                   {RowsPerPageDropdown} {JumpToPageDropdown} {Controle}" 
                                   &gt;
                          &lt;p:ajax event="rowSelect"  listener="#{cashMvtView.onRowSelect}"  update="form form2" id="ajaxRS" /&gt;
  
                              &lt;p:column style="white-space: nowrap" headerText="#{msg['Portfolio']}" sortBy="#{cashMvt.portfolio}" &gt;&lt;h:outputText value="#{cashMvt.portfolio}" /&gt;&lt;/p:column&gt;
                              &lt;p:column style="white-space: nowrap" headerText="#{msg['Cashaccount']}" sortBy="#{cashMvt.cashAccount}" &gt;&lt;h:outputText value="#{cashMvt.cashAccount}"/&gt; &lt;/p:column&gt;
  </code></pre>
  
  <p></p>
  
  <p>cashMvtView.listeFilteredCashMvt is a list that return what I want to display in my form</p>
  
  <p>this is a screen for my web app
  <a href="https://i.stack.imgur.com/DJM8B.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>As you see, all fields are consulted expect "comptes especes" (cashaccount in my code) 
  Note that "portefeuille" in this scrren is portfolio in my code.</p>