code: private static Object saveBindings(FacesContext context,
                                         Map<String, ValueExpression> bindings) {
  
          // Note: This code is copied from UIComponentBase.  In a future
          // version of the JSF spec, it would be useful to define a
          // attribute/property/bindings/state helper object that can be
          // shared across components/behaviors/validaters/converters.
          
          if (bindings == null) {
              return (null);
          }
  
          Object values[] = new Object[2];
          values[0] = bindings.keySet().toArray(new String[bindings.size()]);
  
          Object[] bindingValues = bindings.values().toArray();
          for (int i = 0; i < bindingValues.length; i++) {
              bindingValues[i] = UIComponentBase.saveAttachedState(context, bindingValues[i]);
          }
  
          values[1] = bindingValues;
  
          return (values);
      }
docs: Utility for saving bindings state