Package org.richfaces.model.ScrollableTableDataModel

Examples of org.richfaces.model.ScrollableTableDataModel.SimpleRowKey


   */
  public Object getAsObject(FacesContext context, UIComponent component,
      String value) {
    try {
      int i = Integer.parseInt(value);
      return new SimpleRowKey(i);
    } catch(Exception e) {
      throw new ConverterException("Unable to convert value " + value + "to " + SimpleRowKey.class, e);
    }
  }
View Full Code Here


   * @see javax.faces.convert.Converter#getAsString(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
   */
  public String getAsString(FacesContext context, UIComponent component,
      Object value) {
    if (value instanceof SimpleRowKey) {
      SimpleRowKey key = (SimpleRowKey) value;
      return key.toString();
    }
    throw new ConverterException("Value " + value + " is not supported by this converter");
  }
View Full Code Here

      String value) {
    try {
      String prefix = SimpleRowKey.PREFIX;
      if (value != null && value.startsWith(prefix)) {
        int i = Integer.parseInt(value.substring(prefix.length()));
        return new SimpleRowKey(i);
      }
      return new Integer(value);
    } catch(Exception e) {
      throw new ConverterException("Unable to convert value " + value + "to " + SimpleRowKey.class, e);
    }
View Full Code Here

 
  public String takeSelection() {
    getSelectedCars().clear();
    Iterator<SimpleRowKey> iterator = getSelection().getKeys();
    while (iterator.hasNext()){
      SimpleRowKey key = iterator.next();
      getSelectedCars().add(getAllCars().get(key.intValue()));
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of org.richfaces.model.ScrollableTableDataModel.SimpleRowKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.