⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 deletete.java

📁 一个虚拟训练系统.主要使用j2ee框架实现.
💻 JAVA
字号:
package com.jsfcompref.trainer.backing;

import com.jsfcompref.trainer.TrainingEvent;
import com.jsfcompref.trainer.TrainingEventRegistry;
import com.jsfcompref.trainer.util.JSFUtil;

import javax.faces.application.Application;
import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;

/**
 * Backing bean for delete_te.jsp
 */


public class DeleteTe {
  public DeleteTe() {
  }


  public String deleteTEAction() {
    FacesContext ctx = FacesContext.getCurrentInstance();
    Application app = ctx.getApplication();

    //Get TrainingEvent to be delete and store locally as "te"
    TrainingEvent te = (TrainingEvent)JSFUtil.getManagedObject("EditTrainingEvent");

    // Get TrainingEventRegistry  - store in "eventRegistry"
   TrainingEventRegistry eventRegistry = (TrainingEventRegistry) JSFUtil.getManagedObject("TrainingEventRegistry");

    // Call TE registry method to delete the selected training event.
    eventRegistry.deleteTrainingEvent(te);
    return "main";
  }


}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -