Example #1
0
  /**
   * Notifies components of input from the client via the <code>Component.processInput()</code>
   * method.
   *
   * @see nextapp.echo.app.Component#processInput(java.lang.String, java.lang.Object)
   */
  void process() {
    // Process application-level property updates.
    Iterator applicationUpdateIt = applicationUpdateMap.keySet().iterator();
    while (applicationUpdateIt.hasNext()) {
      String propertyName = (String) applicationUpdateIt.next();
      Object propertyValue = applicationUpdateMap.get(propertyName);
      applicationInstance.processInput(propertyName, propertyValue);
    }

    // Process property updates.
    Iterator componentUpdateIt = clientComponentUpdateMap.values().iterator();
    while (componentUpdateIt.hasNext()) {
      ClientComponentUpdate update = (ClientComponentUpdate) componentUpdateIt.next();
      Iterator inputNameIt = update.getInputNames();
      while (inputNameIt.hasNext()) {
        String inputName = (String) inputNameIt.next();
        update.getComponent().processInput(inputName, update.getInputValue(inputName));
      }
    }

    // Process action.
    if (actionComponent != null) {
      actionComponent.processInput(actionName, actionValue);
    }
  }