Package javax.faces.component

Examples of javax.faces.component.ActionSource.addActionListener()


      if (ComponentHandler.isNew(parent)) {
        final ActionSource actionSource = (ActionSource) parent;
        if (execute == null) {
          actionSource.addActionListener(new ResetFormActionListener());
        } else if (execute.isLiteral())  {
          actionSource.addActionListener(new ResetInputActionListener(ComponentUtils.splitList(execute.getValue())));
        } else {
          final ValueExpression forValueExpression = execute.getValueExpression(faceletContext, String.class);
          actionSource.addActionListener(new ValueExpressionResetInputActionListener(forValueExpression));
        }
      }
View Full Code Here


          actionSource.addActionListener(new ResetFormActionListener());
        } else if (execute.isLiteral())  {
          actionSource.addActionListener(new ResetInputActionListener(ComponentUtils.splitList(execute.getValue())));
        } else {
          final ValueExpression forValueExpression = execute.getValueExpression(faceletContext, String.class);
          actionSource.addActionListener(new ValueExpressionResetInputActionListener(forValueExpression));
        }
      }
    } else {
      throw new TagException(tag, "Parent is not of type ActionSource, type is: " + parent);
    }
View Full Code Here

    final ActionSource actionSource = (ActionSource) component;

    component.setValueExpression(Attributes.FOR, forValue);

    if (forValue.isLiteralText()) {
      actionSource.addActionListener(new PopupActionListener(
          (String) forValue.getValue(FacesContext.getCurrentInstance().getELContext())));
    } else {
      component.setValueExpression(Attributes.FOR, forValue);
    }
    return (SKIP_BODY);
View Full Code Here

            listener = new LegacySetPropertyListener(
                    new LegacyValueBinding(valueExpr),
                    new LegacyValueBinding(targetExpr));
        }

        src.addActionListener(listener);
    }


    public String getFor() {
        String result = null;
View Full Code Here

  public void apply(FaceletContext faceletContext, UIComponent parent) throws IOException, FacesException, FaceletException, ELException {
    if (ComponentSupport.isNew(parent)) {
      ValueExpression valueVE = value.getValueExpression(faceletContext, Object.class);
     
      ActionSource actionSource = (ActionSource) parent;
      actionSource.addActionListener(new FileDownloadActionListener(valueVE));
    }
  }
}
View Full Code Here

        removeFromVE = removeFrom.getValueExpression(faceletContext, Object.class);
       
      ValueExpression valueVE = value.getValueExpression(faceletContext, Object.class);
     
      ActionSource actionSource = (ActionSource) parent;
      actionSource.addActionListener(new Collector(addToVE, removeFromVE, valueVE));
    }
  }
}
View Full Code Here

      if(postProcessor != null) {
        postProcessorME = postProcessor.getMethodExpression(faceletContext, null, new Class[]{Object.class});
      }
     
      ActionSource actionSource = (ActionSource) parent;
      actionSource.addActionListener(new DataExporter(targetVE, typeVE, fileNameVE, excludeColumnsVE, preProcessorME, postProcessorME));
    }
  }

}
View Full Code Here

        else
            al.setValue(value);

        al.setPropertyBinding(app.createValueBinding(propertyAttr.getValue()));

        actionSource.addActionListener(al);
    }

    private boolean sourceHasProperty(ActionSource source)
    {
        ActionListener[] listeners = source.getActionListeners();
View Full Code Here

        ActionSource src = (ActionSource) parent;
        ValueExpression valueExpr = _value.getValueExpression(faceletContext, Object.class);
        ValueExpression targetExpr = _target.getValueExpression(faceletContext, Object.class);

        src.addActionListener(new SetPropertyListener(valueExpr, targetExpr));
    }

    /**
     * TODO: Document me!
     */
 
View Full Code Here

        if (this.binding != null)
        {
            b = this.binding.getValueExpression(faceletContext, ActionListener.class);
        }
        ActionListener listener = new LazyActionListener(this.listenerType, b);
        as.addActionListener(listener);
    }

    /**
     * TODO: Document me!
     */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.