Results 1 to 2 of 2

Thread: Webflow+Primefaces:Datatable's LazyLoading Exception cannot be thrown

  1. #1
    Join Date
    Jan 2012
    Posts
    2

    Question Webflow+Primefaces:Datatable's LazyLoading Exception cannot be thrown

    Hellow!
    I use Webflow(2.3.0) and Primefaces(ver 2.2.1) to develop Web Application.
    But I face the follow problem.
    If somebody know that,Please teach me.

    I refer Primefaces's Datatable like follow:

    Code:
        @Override
        public List<Car> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String,String> filters) {
           page=pageSize/first+1; 
           List<Car> data = new ArrayList<Car>();
           data =ApplicaiontService.doSearch(page,sortField,sortOrder);
              
            }
    
            //rowCount
            int dataSize = data.size();
            this.setRowCount(dataSize);
    ApplicationService.doSearch that is impossible to cause Exception as like DB down.
    So I want to use the follow webflow definition to Catch the Exception:
    <transion on-exception="ApplicationException" to="error.xhtml">

    Somebody who can help me,Please.
    kaku

  2. #2
    Join Date
    Jan 2012
    Posts
    2

    Question

    additional remarks:
    I try to throw ApplicationException from load method like follow:
    public List<Car> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String,String> filters) throws Application

    but it seems that I am not be allowed to do that.The message show below:imcompatible.
    So I also try to catch the ApplicationException like follow:
    Code:
    try{
    data =ApplicaiontService.doSearch(page,sortField,sortOrder);
    }catch(ApplicationException e)
       RequestContext requestContext = RequestContextHolder.getRequestContext();
       RequestControlContext rec = (RequestControlContext) requestContext;
       rec.handleEvent(new Event(this, "error"));
    }
    The webflow definition is follow:
    Code:
    <transion on="error" to="error.xhtml">
    The error.xhtml is in parent-webflow.xml.

    but it cannot be work fun.
    Somebody else help me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •