title: PrimeFaces view with dynamic added component
body: <p>I need a very dynamic View in PrimeFaces. The View must build to runtime and add PrimeFaces components.</p>
  
  <p>In my View I had a panelgrid and added Elements from backing Bean. My Problem is that no setter is called. I added a ValueExpression and the getter is called, but never the setter.</p>
  
  <p>my View</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:p="http://primefaces.org/ui"
        xmlns:f="http://xmlns.jcp.org/jsf/core"&gt;
      &lt;h:head&gt;
          &lt;title&gt;&lt;/title&gt;
          &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"/&gt;
          &lt;link href="#{request.contextPath}/resources/css/primefaces-9/theme.css" rel="stylesheet" type="text/css"/&gt;
          &lt;link href="#{request.contextPath}/resources/css/p_css.css" rel="stylesheet" type="text/css"/&gt;
      &lt;/h:head&gt;
      &lt;h:body style="font-family: Arial; font-size: 8pt;"&gt;
          &lt;h:form id="buttonForm"&gt;
  
              &lt;p:calendar id="test" value="#{editor.dt_vrAufnahmeDatum}" mindate="#{editor.str_currentDate}" navigator="true" locale="de" pattern="dd.MM.yyyy" /&gt;
              &lt;p:selectOneMenu id="selTest" /&gt;
              &lt;p:commandButton id="reloadPanelGrid" action="#{editor.setUiComponents()}" value="new" /&gt;                
          &lt;/h:form&gt;
  
          &lt;h:form id="dynaForm"&gt;
  
              &lt;p:panelGrid id="tiles" columns="1" &gt;
                  &lt;h:outputText value="hallo" /&gt;
                  &lt;p:commandButton value="Submit" actionListener="#{editor.storeDataVr()}" process="dynaForm"/&gt;
              &lt;/p:panelGrid&gt;
  
          &lt;/h:form&gt;
      &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>my Backing Bean</p>
  
  <pre><code>package com._9.controller.global;
  
  import java.io.Serializable;
  import java.text.ParseException;
  import java.text.SimpleDateFormat;
  import java.util.Date;
  import java.util.logging.Level;
  import java.util.logging.Logger;
  import javax.annotation.PostConstruct;
  import javax.el.ValueExpression;
  import javax.faces.bean.ManagedBean;
  import javax.faces.bean.ViewScoped;
  import javax.faces.component.UISelectItem;
  import javax.faces.component.html.HtmlPanelGroup;
  import javax.faces.context.FacesContext;
  import org.primefaces.component.panelgrid.PanelGrid;
  import org.primefaces.context.RequestContext;
  import org.primefaces.event.SelectEvent;
  
  @ManagedBean(name = "editor")
  @ViewScoped
  public class Editor implements Serializable
  {
  
      private static final long serialVersionUID = -33430593454354523L;
  
      private String str_Text = "";
  
  
      @PostConstruct
      public void init()
      {
  
      }
  
  
      public String getStr_Text()
      {
          return this.str_Text;
      }
  
      public void setStr_Text(String str_Text)
      {
          this.str_Text = str_Text;
      }
  
      public void setUiComponents()
      {
          org.primefaces.component.inputtext.InputText inpt_obj = new org.primefaces.component.inputtext.InputText();
          inpt_obj.setValueExpression("value", createValueExpression("#{editor.str_text}", String.class));
  
          HtmlPanelGroup tile = new HtmlPanelGroup();
          tile.setId("testPanelGroup");
  
          tile.getChildren().add(0, inpt_obj);
  
  
          PanelGrid tiles;
  
          tiles = (PanelGrid) FindComponent.doFind(FacesContext.getCurrentInstance(), "dynaForm:tiles");
  
          tiles.getChildren().add(2, tile);
  
  
          RequestContext.getCurrentInstance().update("dynaForm:tiles");
      }
  
      public ValueExpression createValueExpression(String valueExpression, Class&lt;?&gt; valueType)
      {
          FacesContext facesContext = FacesContext.getCurrentInstance();
          return facesContext.getApplication().getExpressionFactory().createValueExpression(facesContext.getELContext(), valueExpression, valueType);
      }
  
      public void StoreDataVr()
      {
          int i = 0;
      }
  }
  </code></pre>
  
  <p>Is there any problem in my setValueExpression that causes setter to not work?</p>