Package org.primefaces.context

Examples of org.primefaces.context.RequestContext.execute()


  }

  public void createNew() {
    reset();
    RequestContext request = RequestContext.getCurrentInstance();
    request.execute("flightScheduleDialog.show()");
    log.info("createNew called");
  }

  public String delete() {
    em.remove(selectedFlightSchedule);
View Full Code Here


    em.merge(selectedFlightSchedule);

    FacesContext context = FacesContext.getCurrentInstance();
    context.addMessage(null, new FacesMessage("saved"));
    RequestContext request = RequestContext.getCurrentInstance();
    request.execute("flightScheduleDialog.hide()");

    reset();
    return null;
  }
View Full Code Here

  public String persist() {
    em.merge(selectedFareType);
    FacesContext context = FacesContext.getCurrentInstance();
    context.addMessage(null, new FacesMessage("saved"));
    RequestContext request = RequestContext.getCurrentInstance();
    request.execute("fareTypeDialog.hide()");
   
    return null;
  }
 
  public void onClose(CloseEvent e){
View Full Code Here

  public String persist() {
    em.merge(selectedPassenger);
    FacesContext context =  FacesContext.getCurrentInstance();
    context.addMessage(null, new FacesMessage("Saved!"));
    RequestContext request = RequestContext.getCurrentInstance();
    request.execute("passengerDialog.hide()");
    log.info("RESET CALLED by persist");

    reset();
   
    return null;
View Full Code Here

            RequestContext rc = RequestContext.getCurrentInstance();
            String componentId = be.getId();
            if (rc != null) {
               // rc.scrollTo(componentId);
                String js = "if(document.getElementById('" + componentId + "')){document.getElementById('" + componentId + "').focus();}";
                rc.execute(js);
            }
        }
    }

}
View Full Code Here

          + "$(this).attr('href', $(this).attr('data-oldhref'))"
          + ".removeAttr('data-oldhref').removeClass('ui-state-disabled');"
          + "});";
    }

    requestContext.execute(script);

    enabled = !enabled;
  }

  public void toogleEnabled(ActionEvent ae) {
View Full Code Here

                        sb.append(",");
                }
            }
            sb.append("}});");
           
            requestContext.execute(sb.toString());
            sb.setLength(0);
        }
        else {
            base.handleNavigation(context, fromAction, outcome);
        }
View Full Code Here

  public String add(){
    String result=UserService.adaugaStudent(this);
    if(result.equals("student existent")){
    RequestContext context = RequestContext.getCurrentInstance();
    context.execute("dlg4.hide();");
   
        }
    return null;
   
   
View Full Code Here

  public String add(){
    String result=UserService.adaugaStudent(this);
    if(result.equals("student existent")){
    RequestContext context = RequestContext.getCurrentInstance();
    context.execute("dlg4.hide();");
    return "Studentpage?faces-redirect=true";
        }
    else{ return result;}
   
   
View Full Code Here

  public String add(){
    String result=UserService.adaugaStudent(this);
    if(result.equals("student existent")){
    RequestContext context = RequestContext.getCurrentInstance();
    context.execute("dlg4.hide();");
   
        }
    return null;

  }
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.