title: How to set converter properties for each row/item of h:dataTable/ui:repeat?
body: <p>I have created a custom ISO date time <code>Converter</code>:</p>
  
  <pre><code>public class IsoDateTimeConverter implements Converter, StateHolder {
  
      private Class type;
      private String pattern;
  
      private boolean transientValue = false;
  
      public void setType(Class type) {
          this.type = type;
      }
  
      public void setPattern(String pattern) {
          this.pattern = pattern;
      }
  
      @Override
      public Object getAsObject(FacesContext context, UIComponent component, String value) throws ConverterException {
          if (StringCheck.isNullOrEmpty(value)) {
              throw new ConverterException("value not specified");
          }
  
          try {
              if (IsoDate.class.equals(type)) {
  
                  if (WebConst.ISO_DATE_NONE.equals(value)) {
                      return IsoDate.DUMMY;
                  } else {
                      //TODO User spezifische TimeZone auslesen
                      return new IsoDate(value, TimeZone.getDefault().getID());
                  }
  
              } else if (IsoTime.class.equals(type)) {
  
                  if (WebConst.ISO_TIME_NONE.equals(value)) {
                      return IsoTime.DUMMY;
                  } else {
                      //TODO User spezifische TimeZone auslesen
                      return new IsoTime(value, TimeZone.getDefault().getID());
                  }
  
              } else if (IsoTimestamp.class.equals(type)) {
  
                  if (WebConst.ISO_TIMESTAMP_NONE.equals(value)) {
                      return IsoTimestamp.DUMMY;
                  } else {
                      //TODO User spezifische TimeZone auslesen
                      return new IsoTimestamp(value, TimeZone.getDefault().getID());
                  }
  
              } else {
                  throw new ConverterException("value not convertible");
              }
          } catch (Exception e) {
              throw new ConverterException(e.getMessage());
          }
      }
  
      @Override
      public String getAsString(FacesContext context, UIComponent component, Object value) throws ConverterException {
          if (value == null) {
              throw new ConverterException("value not specified");
          }
  
          if (IsoDate.class.equals(value)) {
              IsoDate isoDate = (IsoDate) value;
  
              if (isoDate.isDummy()) {
                  return WebConst.ISO_DATE_NONE;
              } else {
                  //TODO User spezifische TimeZone auslesen
                  return isoDate.toString(pattern, TimeZone.getDefault().getID(), false);
              }
  
          } else if (IsoTime.class.equals(value)) {
              IsoTime isoTime = (IsoTime) value;
  
              if (isoTime.isDummy()) {
                  return WebConst.ISO_TIME_NONE;
              } else {
                  //TODO User spezifische TimeZone auslesen
                  return isoTime.toString(pattern, TimeZone.getDefault().getID(), false);
              }
  
          } else if (IsoTimestamp.class.equals(value)) {
              IsoTimestamp isoTimestamp = (IsoTimestamp) value;
  
              if (isoTimestamp.isDummy()) {
                  return WebConst.ISO_TIMESTAMP_NONE;
              } else {
                  //TODO User spezifische TimeZone auslesen
                  return isoTimestamp.toString(pattern, TimeZone.getDefault().getID(), false);
              }
  
          } else {
              throw new ConverterException("value not convertible");
          }
      }
  
      @Override
      public Object saveState(FacesContext context) {
          return new Object[]{type, pattern};
      }
  
      @Override
      public void restoreState(FacesContext context, Object state) {
          type = (Class) ((Object[]) state)[0];
          pattern = (String) ((Object[]) state)[1];
      }
  
      @Override
      public boolean isTransient() {
          return transientValue;
      }
  
      @Override
      public void setTransient(boolean transientValue) {
          this.transientValue = transientValue;
      }
  }
  </code></pre>
  
  <p>And I use the <code>Converter</code> as <code>&lt;mh:IsoDateTimeConverter&gt;</code> in the following view:</p>
  
  <pre><code>&lt;p:dataTable value="#{imports.list}" var="item"&gt;
      &lt;p:column&gt;
          &lt;h:outputText value="#{item.balanceDate}" immediate="true"&gt;
              &lt;mh:IsoDateTimeConverter type="#{webConst.ISO_DATE_CLASS}" pattern="#{webConst.ISO_DATE_FORMAT}"/&gt;
          &lt;/h:outputText&gt;
      &lt;/p:column&gt;
  &lt;/p:dataTable&gt;
  </code></pre>
  
  <p>The problem is, when I first open this view, all properties are set in my <code>Converter</code> class only once and then the datatable renders and converts the values based on initial properties.</p>
  
  <p>I expected that the properties are set on a per-row basis. How can I achieve this?</p>