本文整理汇总了Java中org.apache.struts2.interceptor.validation.SkipValidation类的典型用法代码示例。如果您正苦于以下问题:Java SkipValidation类的具体用法?Java SkipValidation怎么用?Java SkipValidation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SkipValidation类属于org.apache.struts2.interceptor.validation包,在下文中一共展示了SkipValidation类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: execute
import org.apache.struts2.interceptor.validation.SkipValidation; //导入依赖的package包/类
@SkipValidation
@Override
public String execute() {
logger.debug("execute start.");
// 读取数据
loadData();
// 读取区块
loadBlock();
if (notFoundFlag) {
return HTTPHEADER404;
}
if (this.hasErrors()) {
logger.debug("execute abnormally end.");
setHasError(true);
return FREEMARKER_ERROR;
}
logger.debug("execute normally end.");
return FREEMARKER;
}
开发者ID:luckyyeah,项目名称:YiDu-Novel,代码行数:20,代码来源:AbstractPublicAndUserBaseAction.java
示例2: execute
import org.apache.struts2.interceptor.validation.SkipValidation; //导入依赖的package包/类
@SkipValidation
@Override
@Action(value = "wxlogin")
public String execute() {
logger.debug("execute normally end.");
String backUri =this.getDomain()+"/getopenid";
backUri+="?forwardUrl="+forwardUrl;
String url;
try {
url = WeixinUtils.buildOAuthUrl(backUri);
this.setForwardUrl(url);
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return GOTO_REDIRECT;
}
开发者ID:luckyyeah,项目名称:YiDu-Novel,代码行数:19,代码来源:WXLoginAction.java
示例3: execute
import org.apache.struts2.interceptor.validation.SkipValidation; //导入依赖的package包/类
@SkipValidation
@Override
@Action(value = "wxregister")
public String execute() {
logger.debug("execute normally end.");
String backUri =this.getDomain()+"/wxregisteruser";
backUri+="?forwardUrl="+forwardUrl;
String url;
try {
url = WeixinUtils.buildOAuthUserInfoUrl(backUri);
this.setForwardUrl(url);
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return GOTO_REDIRECT;
}
开发者ID:luckyyeah,项目名称:YiDu-Novel,代码行数:19,代码来源:WXRegisterAction.java
示例4: execute
import org.apache.struts2.interceptor.validation.SkipValidation; //导入依赖的package包/类
@SkipValidation
@Override
@Action(value = "paycallback")
public String execute() {
logger.debug("execute normally end.");
try {
Thread.sleep(1000);
TUser user = new TUser();
//修改金额
user = userService.getByNo(LoginManager.getLoginUser().getUserno());
// 登录处理
LoginManager.doLogin(user);
HttpSession session = LoginManager.getSession(false);
if (Utils.isDefined(session)) {
String forwardUrl =(String)session.getAttribute("paypreurl");
this.setForwardUrl(forwardUrl);
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return GOTO_REDIRECT;
}
开发者ID:luckyyeah,项目名称:YiDu-Novel,代码行数:26,代码来源:PayCallBackAction.java
示例5: toDataAnalysePage
import org.apache.struts2.interceptor.validation.SkipValidation; //导入依赖的package包/类
/**
* ȥ�����ݷ���ҳ��
*
* @return
*/
@SkipValidation
public String toDataAnalysePage() {
getBlogNumsWithTag();
getQuestionNumsWithCategory();
feedBackList = feedBackService.findAllFeedBacks();
int registedUserNums = userService.getRegistedUserNums();
application.put("registedUserNums", registedUserNums);
application.put("blogNumsWithTag", blogNumsWithTag);
application.put("questionNumsWithTag", questionNumsWithTag);
if (application.get("count") == null
|| (Integer) (application.get("count")) == 0) {
application.put("count", 0);
}
return "dataAnalysePage";
}
开发者ID:creatorYC,项目名称:yechblog,代码行数:21,代码来源:LoginAction.java
示例6: getBlogNumsWithTag
import org.apache.struts2.interceptor.validation.SkipValidation; //导入依赖的package包/类
/**
* �õ�����ij����ǩ�IJ��͵�����(���ڽ������ݷ���)
* @return
*/
@SkipValidation
public void getBlogNumsWithTag() {
List<Blog> blogs = blogService.findAllBlogs();// �õ�����blog
// �õ�����ij����ǩ�IJ��͵�����(���ڽ������ݷ���)
for (int i = 0; i < blogs.size(); i++) {
// �õ��˲��͵ı�ǩ
List<Tag> tags = new ArrayList<Tag>(blogs.get(i).getTags());
for (int j = 0; j < tags.size(); j++) {
// map���Ѿ��д˴α�������tag,ֱ�ӽ����д�tag�IJ�����+1
if (blogNumsWithTag.keySet().contains(tags.get(j).getTagName())) {
Integer num = blogNumsWithTag.get(tags.get(j).getTagName());
blogNumsWithTag.put(tags.get(j).getTagName(), ++num);
} else { // map���治���˴α�������tag,���ú��д˱�ǩ�IJ�����Ϊ1
blogNumsWithTag.put(tags.get(j).getTagName(), 1);
}
}
}
JSONObject object = new JSONObject(blogNumsWithTag);
try {
response.setContentType("application/json; charset=UTF-8");
response.getWriter().print(object);
System.out.println("key= "+object);
} catch (Exception e) {
}
}
开发者ID:creatorYC,项目名称:yechblog,代码行数:30,代码来源:LoginAction.java
示例7: getQuestionNumsWithCategory
import org.apache.struts2.interceptor.validation.SkipValidation; //导入依赖的package包/类
/**
* �õ�����ij��������������(���ڽ������ݷ���)
*/
@SkipValidation
public void getQuestionNumsWithCategory() {
List<Question> questions = questionService.queryAllQuestions();
for (int i = 0; i < questions.size(); i++) {
// map���Ѿ��д˴α����õ���question�ķ���,ֱ�ӽ����д˷����������+1
if (questionNumsWithTag.keySet().contains(
questions.get(i).getCategory())) {
Integer num = questionNumsWithTag.get(questions.get(i)
.getCategory());
questionNumsWithTag.put(questions.get(i).getCategory(), ++num);
} else {
// map���治���˴α�������question�ķ���,���ú��д˴˷����������Ϊ1
questionNumsWithTag.put(questions.get(i).getCategory(), 1);
}
}
JSONObject object = new JSONObject(questionNumsWithTag);
try {
response.setContentType("application/json; charset=UTF-8");
response.getWriter().print(object);
System.out.println("key= "+object);
} catch (Exception e) {
}
}
开发者ID:creatorYC,项目名称:yechblog,代码行数:27,代码来源:LoginAction.java
示例8: logout
import org.apache.struts2.interceptor.validation.SkipValidation; //导入依赖的package包/类
/**
* �˳���¼
*/
@SkipValidation
public String logout() {
// 1����������-1����ȡ������������������>0����-1
Integer count = (Integer) application.get("count");
User user = (User) sessionMap.get("user");
if (count != null && count > 0) {
count--;
application.put("count", count);
// �˳���¼ʱ�Ƴ����û�
userInfo.remove(user.getUsername());
}
//��Cookie�ÿ�
Cookie emailCookie = new Cookie("email", "");
Cookie pswCookie = new Cookie("password", "");
response.addCookie(emailCookie);
response.addCookie(pswCookie);
sessionMap.clear();
// 2��sessionʧЧ��ǿתΪSessionMap������invalidate����
((SessionMap<String, Object>) sessionMap).invalidate();
Global.user = null;
// ֻ�о�̬�������ڵ�¼��ص�֮ǰ��ҳ�棬��Ȼ originUrl ��Ϊnull
originUrl = request.getHeader("referer");
originUrl = originUrl.substring(originUrl.lastIndexOf("/")+1);
return "keepOriginUrl";
}
开发者ID:creatorYC,项目名称:yechblog,代码行数:29,代码来源:LoginAction.java
示例9: view
import org.apache.struts2.interceptor.validation.SkipValidation; //导入依赖的package包/类
/**
* Método que se encarga de la recuperación del elemento que queremos ver y
* llevarnos a la jsp correspondientes para poder visualizarlo.
*
* @return
* @throws Exception
*/
@SkipValidation
public String view() throws Exception {
try {
//Comprobacion de si recoge el dato de un boton volver
if (this.id == null && this.idElement != null) {
this.id = this.idElement;
}
this.incidencias = new PaginatedListHibernate<UserAuditoryCVO>(request);
if (actionName.equals("view")) {
this.current = ApplicationCVOFacade.obtainApplicationCVOFromView(userName, Long.valueOf(id), incidencias);
} else if (actionName.equals("edit")) {
this.current = ApplicationCVOFacade.obtainApplicationCVOFromEdit(userName, Long.valueOf(id), incidencias);
}
return SUCCESS;
} catch(InternalErrorException ex) {
addActionError(getText("application.application.message.view.error"));
return INPUT;
}
}
开发者ID:adriannovegil,项目名称:struts2-examples,代码行数:28,代码来源:ApplicationActionHandler.java
示例10: view
import org.apache.struts2.interceptor.validation.SkipValidation; //导入依赖的package包/类
/**
* Método que se encarga de la recuperación del elemento que queremos ver y
* llevarnos a la jsp correspondientes para poder visualizarlo.
*
* @return
* @throws Exception
*/
@SkipValidation
public String view() throws Exception {
try {
//Comprobacion de si recoge el dato de un boton volver
if (this.id == null && this.idElement != null) {
this.id = this.idElement;
}
this.acciones = new PaginatedListHibernate<Action>(request);
if (actionName.equals("view")) {
this.current = ModuleCVOFacade.obtainModuleCVOFromView(userName, Long.valueOf(id), acciones);
} else if (actionName.equals("edit")) {
this.current = ModuleCVOFacade.obtainModuleCVOFromView(userName, Long.valueOf(id), acciones);
}
return SUCCESS;
} catch(InternalErrorException ex) {
addActionError(getText("module.module.message.view.error"));
return INPUT;
}
}
开发者ID:adriannovegil,项目名称:struts2-examples,代码行数:28,代码来源:ModuleActionHandler.java
示例11: view
import org.apache.struts2.interceptor.validation.SkipValidation; //导入依赖的package包/类
@SkipValidation
public String view() throws Exception {
try {
//Comprobacion de si recoge el dato de un boton volver
if (this.id == null && this.idElement != null) {
this.id = this.idElement;
}
if (actionName.equals("view")) {
this.current = RolCVOFacade.obtainRolCVOFromView(userName, Long.valueOf(id));
} else if (actionName.equals("edit")) {
this.current = RolCVOFacade.obtainRolCVOFromEdit(userName, Long.valueOf(id));
}
return SUCCESS;
} catch (InternalErrorException ex) {
addActionError(getText("rol.rol.message.view.error"));
return INPUT;
}
}
开发者ID:adriannovegil,项目名称:struts2-examples,代码行数:20,代码来源:RolActionHandler.java
示例12: localidadesAjax
import org.apache.struts2.interceptor.validation.SkipValidation; //导入依赖的package包/类
@SkipValidation
public String localidadesAjax() throws Exception {
List<Localidad> listaLocalidads;
if (!this.filtroisla.equals("-1")) {
listaLocalidads = LocalidadFacade.findLocalidad(userName, "", Long.valueOf(this.filtroisla), Long.valueOf(this.filtroprovincia));
} else {
listaLocalidads = LocalidadFacade.findLocalidad(userName, "", null, Long.valueOf(this.filtroprovincia));
}
for (Localidad l : listaLocalidads) {
Territorio t = new Territorio();
t.setId(l.getId());
t.setNombre(l.getNombre());
this.listaLocalidades.add(t);
}
return SUCCESS;
}
开发者ID:adriannovegil,项目名称:struts2-examples,代码行数:17,代码来源:UsuarioCreateFromScratchActionHandler.java
示例13: view
import org.apache.struts2.interceptor.validation.SkipValidation; //导入依赖的package包/类
@SkipValidation
public String view() throws Exception {
try {
//Comprobacion de si recoge el dato de un boton volver
if (this.id == null && this.idElement != null) {
this.id = this.idElement;
}
this.usuarios2 = new PaginatedListHibernate<UserCVO>(request);
if (actionName.equals("view")) {
this.current = GroupCVOFacade.obtainGroupCVOFromView(userName, Long.valueOf(id), usuarios2);
} else if (actionName.equals("edit")) {
this.current = GroupCVOFacade.obtainGroupCVOFromEdit(userName, Long.valueOf(id), usuarios2);
}
return SUCCESS;
} catch (InternalErrorException ex) {
addActionError(getText("group.group.message.view.error"));
return INPUT;
}
}
开发者ID:adriannovegil,项目名称:struts2-examples,代码行数:20,代码来源:GroupActionHandler.java
示例14: view
import org.apache.struts2.interceptor.validation.SkipValidation; //导入依赖的package包/类
@SkipValidation
public String view() throws Exception {
try {
//Comprobacion de si recoge el dato de un boton volver
if (this.id == null && this.idElement != null) {
this.id = this.idElement;
}
if (this.id == null && current.getId().toString() != null) {
this.id = current.getId().toString();
}
List<Application> apps = ApplicationFacade.listApplication(userName);
this.idApp = apps.get(0).getId().toString();
this.incidencias = new PaginatedListHibernate<UserAuditory>(request);
if (actionName.equals("view")) {
this.current = UserCVOFacade.obtainUserCVOFromView(userName, Long.valueOf(id), incidencias);
} else if (actionName.equals("edit")) {
this.current = UserCVOFacade.obtainUserCVOFromEdit(userName, Long.valueOf(id), incidencias);
}
return SUCCESS;
} catch (InternalErrorException ex) {
addActionError(getText("usuarios.usuarios.message.view.error"));
return INPUT;
}
}
开发者ID:adriannovegil,项目名称:struts2-examples,代码行数:26,代码来源:UsuarioActionHandler.java
示例15: logout
import org.apache.struts2.interceptor.validation.SkipValidation; //导入依赖的package包/类
/**
*
* @return
*/
@SkipValidation
public String logout() {
try {
System.out.println("Intentando Usuario saliendo de la sesión " + ActionContext.getContext().getSession().get("dni"));
if (ActionContext.getContext().getSession().containsKey("dni")) {
System.out.println("Usuario saliendo de la sesión " + ActionContext.getContext().getSession().get("dni"));
// empleado = (EmpleadoVO) ActionContext.getContext().getSession().get("empleado");
ActionContext.getContext().getSession().remove("empleado");
ActionContext.getContext().getSession().remove("dni");
// logger.info("El empleado " + empleado.getNombre() + " con dni " + empleado.getDni() + " salió de la sesión.");
}
} catch (Exception e) {
System.err.println("Error saliendo de la sesión con el actionContext");
return ERROR;
}
return SUCCESS;
}
开发者ID:adriannovegil,项目名称:struts2-examples,代码行数:24,代码来源:LoginActionHandler.java
示例16: recuperarSedeExtAjax
import org.apache.struts2.interceptor.validation.SkipValidation; //导入依赖的package包/类
@SkipValidation
public String recuperarSedeExtAjax() throws Exception {
this.noempleados = new PaginatedListHibernate<EmpleadoCVO>(request);
this.departamentos = new PaginatedListHibernate<DepartamentoCVO>(request);
SedeExteriorCVO sede = SedeExteriorCVOFacade.obtainSedeVistaFromView(userName, Long.valueOf(id), noempleados, departamentos, "popup");
//Guardo los datos que necesito en la vista
sedePopup = new SedeExterior();
sedePopup.setNombre(sede.getSede().getNombre());
sedePopup.setHorario(sede.getSede().getHorario());
sedePopup.setMail(sede.getSede().getMail());
sedePopup.setTelefono(sede.getSede().getTelefono());
sedePopup.setExtension(sede.getSede().getExtension());
sedePopup.setFax(sede.getSede().getFax());
sedePopup.setWeb(sede.getWeb());
this.dirSedePopup = sede.getSede().getAddress().getFormatted();
this.dirSedePopup = this.dirSedePopup.replace("<br>", "\n");
this.noempleados = null;
this.departamentos = null;
return SUCCESS;
}
开发者ID:adriannovegil,项目名称:struts2-examples,代码行数:26,代码来源:AboutActionHandler.java
示例17: recuperarDepartamentoAjax
import org.apache.struts2.interceptor.validation.SkipValidation; //导入依赖的package包/类
@SkipValidation
public String recuperarDepartamentoAjax() throws Exception {
// departamentoPopup = DepartamentoFacade.obtainDepartamento(userName, Long.valueOf(this.id));
//Recuperamos los datos del departamento
Departamento d1 = DepartamentoFacade.obtainDepartamento(userName, Long.valueOf(this.id));
//Guardamos solo aquellos datos que se van a mostrar en el popup
this.departamentoPopup = new Departamento();
this.departamentoPopup.setNombre(d1.getNombre());
this.departamentoPopup.setHorario(d1.getHorario());
this.departamentoPopup.setWeb(d1.getWeb());
this.departamentoPopup.setMail(d1.getMail());
this.departamentoPopup.setTelefono(d1.getTelefono());
this.departamentoPopup.setExtension(d1.getExtension());
this.departamentoPopup.setFax(d1.getFax());
return SUCCESS;
}
开发者ID:adriannovegil,项目名称:struts2-examples,代码行数:17,代码来源:AboutActionHandler.java
示例18: getQueryList
import org.apache.struts2.interceptor.validation.SkipValidation; //导入依赖的package包/类
@SkipValidation
public String getQueryList(){
try {
int offId = ((LoginBean)session.get("user")).getFid();
List<QueryBean> queryList = queryService.getQueryListFromOffId(offId);
if(queryList==null||queryList.size()==0)
addActionMessage("No Queries for u!");
else
queryBean.setQueryList(queryList);
return SUCCESS;
}
catch(Exception e){
addActionError("There was a problem while retrieving query information.Please Contact Admin");
logger.error(e.getMessage(), e);
return ERROR;
}
}
开发者ID:veereshbeeram,项目名称:Farmer_Information_system,代码行数:18,代码来源:QueryAction.java
示例19: postQuery
import org.apache.struts2.interceptor.validation.SkipValidation; //导入依赖的package包/类
@SkipValidation
public String postQuery()
{
try {
int fid = ((LoginBean)session.get("user")).getFid();
queryBean.setFid(fid);
queryService.postQuery(queryBean);
addActionMessage("Your Query was posted successfully");
queryBean.setOffNames(queryService.getOffNames());
return SUCCESS;
}
catch(Exception e){
addActionError("There was a problem while inserting query information.Please Contact Admin");
logger.error(e.getMessage(), e);
return ERROR;
}
}
开发者ID:veereshbeeram,项目名称:Farmer_Information_system,代码行数:18,代码来源:QueryAction.java
示例20: checkUid
import org.apache.struts2.interceptor.validation.SkipValidation; //导入依赖的package包/类
@SkipValidation
public String checkUid(){
try{
if(registerService.checkUid(registerBean.getUid())==null)
{
status = "is available";
addActionMessage(registerBean.getUid()+"is available");
}
else
{
status = "is not available..Please select some other UserID";
addActionMessage(registerBean.getUid()+"is not available");
}
return SUCCESS;
}
catch(Exception e){
addActionError("There was a problem while registering.Please Contact Admin");
logger.error(e.getMessage(), e);
return ERROR;
}
}
开发者ID:veereshbeeram,项目名称:Farmer_Information_system,代码行数:22,代码来源:RegisterAction.java
注:本文中的org.apache.struts2.interceptor.validation.SkipValidation类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论