Package javax.faces.application

Examples of javax.faces.application.Application.createValueBinding()


            else
            {
                Object value = entry.getValue();
                if (UIComponentTag.isValueReference((String) value))
                {
                    valueBinding = application.createValueBinding((String) value);
                    value = valueBinding.getValue(facesContext);
                }
                list.add(ClassUtils.convertToType(value, valueClass));
            }
        }
View Full Code Here


  public static void setConverter(ValueHolder valueHolder, String converterId) {
    if (converterId != null && valueHolder.getConverter() == null) {
      final FacesContext facesContext = FacesContext.getCurrentInstance();
      final Application application = facesContext.getApplication();
      if (UIComponentTag.isValueReference(converterId)) {
        ValueBinding valueBinding = application.createValueBinding(converterId);
        if (valueHolder instanceof UIComponent) {
          ((UIComponent) valueHolder).setValueBinding(ATTR_CONVERTER, valueBinding);
        }
      } else {
        Converter converter = application.createConverter(converterId);
View Full Code Here

  public static void setAction(UICommand component, String type, String action) {
    String commandType;
    final FacesContext facesContext = FacesContext.getCurrentInstance();
    final Application application = facesContext.getApplication();
    if (type != null && UIComponentTag.isValueReference(type)) {
         commandType = (String) application.createValueBinding(type).getValue(facesContext);
    } else {
      commandType = type;
    }
    if (commandType != null
        && (commandType.equals(COMMAND_TYPE_NAVIGATE)
View Full Code Here

    private UIComponent createComponent(String id) {
        UIComponent component;
        Application application = context.getApplication();
        if (this.binding != null) {
            ValueBinding vb = application.createValueBinding(this.binding);
            component = application.createComponent(vb, context, getComponentType());
            component.setValueBinding("binding", vb);
        } else {
            component = application.createComponent(getComponentType());
        }
View Full Code Here

        System.out.println("Process Upload Called");
      try {
            FacesContext facesContext=FacesContext.getCurrentInstance();
            Application application = facesContext.getApplication();

              ApplicationGlobalContext context = (ApplicationGlobalContext)application.createValueBinding("#{applicationGlobalContext}").getValue(facesContext);
            System.out.println("File upload called");
              InputStream in = new BufferedInputStream(uploadedFile.getInputStream());
                    BufferedReader input =  new BufferedReader(new InputStreamReader(in));

              StringBuffer sb = new StringBuffer();
View Full Code Here

  private Notification[] notifications=null;
  public ExperimentStatus() {
    FacesContext facesContext = FacesContext.getCurrentInstance();
    if (facesContext != null) {
      Application application = facesContext.getApplication();
      String experimentID = (String) application.createValueBinding("#{experiment.experiment.id}").getValue(facesContext);
      try {
        ExpBldrWorkflow[] workflowInstances = super.getContext().getExpBuilderManager().getWorkflowInstances(
            experimentID);
        //TODO: Currently only one workflow is being created per experiment, should be extended to hierarchial workflows
        ExpBldrWorkflow workflow = workflowInstances[0];
View Full Code Here

              context.setXmcCatTestUser(gssCredential.getName().toString());
          }
            context.setPortalUserName(username);
            System.out.println("Getting Grid credential form Proxy worked for " + username);
             // to  create RegistryService instance
              ValueBinding binding = application.createValueBinding("#{applicationGlobalContext}");
          binding.setValue(facesContext, context);
          this.setContext(context);
          checkStatus = true;
            }else{
              UserInfo userInfo =  (UserInfo) facesContext.getExternalContext().getSessionMap().get("userInfo");
View Full Code Here

   */
  public AbstractBean() {
    FacesContext facesContext = FacesContext.getCurrentInstance();
    if (facesContext != null) {
      Application application = facesContext.getApplication();
      this.setContext((ApplicationGlobalContext) application
          .createValueBinding("#{applicationGlobalContext}")
          .getValue(facesContext));
     
    }
  }
View Full Code Here

  public ExperimentBean() {
    FacesContext facesContext = FacesContext.getCurrentInstance();
    if (facesContext != null) {
      Application application = facesContext.getApplication();
      requestcontext = facesContext.getExternalContext().getRequestContextPath();
      ProjectBean bean = ((ProjectBean) application.createValueBinding("#{project}").getValue(facesContext));
      if(bean != null && bean.getProject() != null ){
      String projectNameID = bean.getProject().getName();
    //  bean.getExperiment();
      setProjectID(projectNameID);
      setProjectName(projectNameID);
View Full Code Here

  public QMExtension() {
    FacesContext facesContext = FacesContext.getCurrentInstance();
    if (facesContext != null) {
      Application application = facesContext.getApplication();
      WorkflowBean bean = ((WorkflowBean) application.createValueBinding("#{workflow}").getValue(facesContext));
      Map<String, String> geoParam = bean.getGeoguiParam();
      QMExtension extension = new QMExtension();
      QMExtInput input = new QMExtInput();
      input.setEast(Integer.parseInt(geoParam.get("eastbc")));
      input.setNorth(Integer.parseInt(geoParam.get("eastbc")));
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.