Package org.richfaces.component

Examples of org.richfaces.component.UIInplaceSelect


    }
  }

  @Override
  protected void doDecode(FacesContext context, UIComponent component) {
    UIInplaceSelect inplaceSelect = null;

    if (component instanceof UIInplaceSelect) {
      inplaceSelect = (UIInplaceSelect) component;
    } else {
      if (logger.isDebugEnabled()) {
        logger.debug("No decoding necessary since the component " + component.getId()
            + " is not an instance or a sub class of UIInplaceSelect");
      }
      return;
    }

    String clientId = inplaceSelect.getClientId(context);
    if (clientId == null) {
      throw new NullPointerException("component client id is NULL");
    }

    if (InputUtils.isDisabled(inplaceSelect) || InputUtils.isReadOnly(inplaceSelect)) {
      if (logger.isDebugEnabled()) {
        logger.debug(("No decoding necessary since the component " + component.getId() + " is disabled"));
      }
      return;
    }

    Map <String,String> request = context.getExternalContext().getRequestParameterMap();
    String newValue = (String) request.get(clientId);
    if (newValue != null) {
      inplaceSelect.setSubmittedValue(newValue);
    } else {
      inplaceSelect.setSubmittedValue(null);
    }
  }
View Full Code Here


      return null;
    }

    List<PreparedSelectItem> itemsList = new ArrayList<PreparedSelectItem>();

    UIInplaceSelect inplaceSelect = (UIInplaceSelect) component;
    List<SelectItem> selectItems = SelectUtils.getSelectItems(context, inplaceSelect);
    for (SelectItem selectItem : selectItems) {
      String convertedValue = getConvertedStringValue(context, inplaceSelect, selectItem.getValue());
      String label = selectItem.getLabel().trim();
      itemsList.add(new PreparedSelectItem(convertedValue, label));
View Full Code Here

    return itemsList;
  }

  public void encodeItems(FacesContext context, UIComponent component, List<PreparedSelectItem> items) throws IOException, IllegalArgumentException {
    if (items != null) {
      UIInplaceSelect inplaceSelect = (UIInplaceSelect) component;

      for (PreparedSelectItem preparedSelectItem : items) {

        encodeSuggestion(context, inplaceSelect, preparedSelectItem.getLabel(), RICH_INPLACE_SELECT_CLASSES);
      }
View Full Code Here

    private static final String CONTROLS_FACET = "controls";
    private static final String EMPTY_DEFAULT_LABEL = "\u00a0\u00a0\u00a0";

    @Override
    protected void doDecode(FacesContext context, UIComponent component) {
  UIInplaceSelect inplaceSelect = null;

  if (component instanceof UIInplaceSelect) {
      inplaceSelect = (UIInplaceSelect) component;
  } else {
      if (logger.isDebugEnabled()) {
    logger.debug("No decoding necessary since the component " + component.getId()
      + " is not an instance or a sub class of UIInplaceSelect");
      }
      return;
  }
 
  String clientId = inplaceSelect.getClientId(context);
  if (clientId == null) {
      throw new NullPointerException("component client id is NULL");
  }

  if (InputUtils.isDisabled(inplaceSelect) || InputUtils.isReadOnly(inplaceSelect)) {
      if (logger.isDebugEnabled()) {
    logger.debug(("No decoding necessary since the component " + component.getId() + " is disabled"));
      }
      return;
  }
 
  Map <String,String> request = context.getExternalContext().getRequestParameterMap();
  String newValue = (String) request.get(clientId);
  if (newValue != null && newValue.length()!= 0) {
      inplaceSelect.setSubmittedValue(newValue);
  } else {
      inplaceSelect.setSubmittedValue(null);
  }
    }
View Full Code Here

  }

  List<Object> parentList = new ArrayList<Object>();
  List<String> labels = new ArrayList<String>();
 
  UIInplaceSelect inplaceSelect = (UIInplaceSelect) component;
  ResponseWriter writer = context.getResponseWriter();
  List<SelectItem> selectItems = SelectUtils.getSelectItems(context, inplaceSelect);
  for (SelectItem selectItem : selectItems) {
      String value = getConvertedStringValue(context, inplaceSelect, selectItem.getValue());
      String label = selectItem.getLabel();
View Full Code Here

    private static final String CONTROLS_FACET = "controls";
    private static final String EMPTY_DEFAULT_LABEL = "\u00a0\u00a0\u00a0";

    @Override
    protected void doDecode(FacesContext context, UIComponent component) {
  UIInplaceSelect inplaceSelect = null;

  if (component instanceof UIInplaceSelect) {
      inplaceSelect = (UIInplaceSelect) component;
  } else {
      if (logger.isDebugEnabled()) {
    logger.debug("No decoding necessary since the component " + component.getId()
      + " is not an instance or a sub class of UIInplaceSelect");
      }
      return;
  }
 
  String clientId = inplaceSelect.getClientId(context);
  if (clientId == null) {
      throw new NullPointerException("component client id is NULL");
  }

  if (InputUtils.isDisabled(inplaceSelect) || InputUtils.isReadOnly(inplaceSelect)) {
      if (logger.isDebugEnabled()) {
    logger.debug(("No decoding necessary since the component " + component.getId() + " is disabled"));
      }
      return;
  }
 
  Map <String,String> request = context.getExternalContext().getRequestParameterMap();
  String newValue = (String) request.get(clientId);
  if (newValue != null && newValue.length()!= 0) {
      inplaceSelect.setSubmittedValue(newValue);
  } else {
      inplaceSelect.setSubmittedValue(null);
  }
    }
View Full Code Here

  }

  List<Object> parentList = new ArrayList<Object>();
  List<String> labels = new ArrayList<String>();
 
  UIInplaceSelect inplaceSelect = (UIInplaceSelect) component;
  List<SelectItem> selectItems = SelectUtils.getSelectItems(context, inplaceSelect);
  for (SelectItem selectItem : selectItems) {
      String value = getConvertedStringValue(context, inplaceSelect, selectItem.getValue());
      String label = selectItem.getLabel().trim();
      labels.add(label);
View Full Code Here

    }
  }

  @Override
  protected void doDecode(FacesContext context, UIComponent component) {
    UIInplaceSelect inplaceSelect = null;

    if (component instanceof UIInplaceSelect) {
      inplaceSelect = (UIInplaceSelect) component;
    } else {
      if (logger.isDebugEnabled()) {
        logger.debug("No decoding necessary since the component " + component.getId()
            + " is not an instance or a sub class of UIInplaceSelect");
      }
      return;
    }

    String clientId = inplaceSelect.getClientId(context);
    if (clientId == null) {
      throw new NullPointerException("component client id is NULL");
    }

    if (InputUtils.isDisabled(inplaceSelect) || InputUtils.isReadOnly(inplaceSelect)) {
      if (logger.isDebugEnabled()) {
        logger.debug(("No decoding necessary since the component " + component.getId() + " is disabled"));
      }
      return;
    }

    Map <String,String> request = context.getExternalContext().getRequestParameterMap();
    String newValue = (String) request.get(clientId);
    if (newValue != null) {
      inplaceSelect.setSubmittedValue(newValue);
    } else {
      inplaceSelect.setSubmittedValue(null);
    }
  }
View Full Code Here

      return null;
    }

    List<PreparedSelectItem> itemsList = new ArrayList<PreparedSelectItem>();

    UIInplaceSelect inplaceSelect = (UIInplaceSelect) component;
    List<SelectItem> selectItems = SelectUtils.getSelectItems(context, inplaceSelect);
    for (SelectItem selectItem : selectItems) {
      String convertedValue = getConvertedStringValue(context, inplaceSelect, selectItem.getValue());
      String label = selectItem.getLabel().trim();
      itemsList.add(new PreparedSelectItem(convertedValue, label));
View Full Code Here

    return itemsList;
  }

  public void encodeItems(FacesContext context, UIComponent component, List<PreparedSelectItem> items) throws IOException, IllegalArgumentException {
    if (items != null) {
      UIInplaceSelect inplaceSelect = (UIInplaceSelect) component;

      for (PreparedSelectItem preparedSelectItem : items) {

        encodeSuggestion(context, inplaceSelect, preparedSelectItem.getLabel(), RICH_INPLACE_SELECT_CLASSES);
      }
View Full Code Here

TOP

Related Classes of org.richfaces.component.UIInplaceSelect

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.