Package com.ibm.xsp

Examples of com.ibm.xsp.FacesExceptionEx


                    writeAutoLoginBasic(context, rootEx, stClient, (BasicEndpoint)stServer);
                } else if(stServer instanceof SSOEndpoint) {
                    writeAutoLoginToken(context, rootEx, stClient, (SSOEndpoint)stServer);
                }
            } catch(ClientServicesException ex) {
                throw new FacesExceptionEx(ex);
            }
        }
    }
View Full Code Here


                    return new ArrayBlock(index,data);
                } else {
                    return new EmptyBlock(index);
                }
            } catch(Exception ex) {
                throw new FacesExceptionEx(ex,"Error while reading the JSON stream");
            }
        }
View Full Code Here

  protected VFS createImportVFS(ImportSource source) {
    if(StringUtil.equals(source.getSource(), "file")) {
      String location=source.getLocation().trim();
      File baseDir=new File(location);
      if(!baseDir.exists()) {
        throw new FacesExceptionEx(null, "Import directory {0} does not exist", location);
      }
      FileVFS vfs=new FileVFS(baseDir);
      return vfs;
    } else if(StringUtil.equals(source.getSource(), "github")) {
      String location=source.getLocation().trim();
      if(StringUtil.isEmpty(location)) {
        throw new FacesExceptionEx(null, "GitHub: Location is empty", location);
      }
      GitVFS vfs=new GitVFS(location, source.getUserName(), source.getPassword());
      return vfs;
    }
    throw new FacesExceptionEx(null, "Import action is not available for a source type {0}", source.getSource());
  }
View Full Code Here

      @SuppressWarnings("rawtypes")
      Class delegateClass = DominoFacesContextFactoryImpl.class;
      inst = delegateClass.newInstance();
    } catch (Exception e) {
      e.printStackTrace();
      throw new FacesExceptionEx(e);
    }
    if (inst instanceof FacesContextFactory) {
      _delegate = (FacesContextFactory) inst;
    } else {
      System.out.println("WARNING: Delegate for OpenntfFacesContextFactory is null. Many things will probably break.");
View Full Code Here

  public DocumentDataContainer doNewDocument(final FacesContext context) throws FacesExceptionEx {
    try {
      OpenntfDominoDocument ntfDoc = createDocument();
      return new DominoDocumentDataContainer(getBeanId(), getUniqueId(), ntfDoc);
    } catch (Exception localException) {
      throw new FacesExceptionEx("Unable to create document", localException);
    }
  }
View Full Code Here

        return doNewDocument(context);
      }
      OpenntfDominoDocument ntfDoc = openDocument(noteId);
      return new DominoDocumentDataContainer(getBeanId(), getUniqueId(), ntfDoc);
    } catch (Exception localException) {
      throw new FacesExceptionEx(ResourceHandler.getString("DominoDocumentData.Couldnotopenthedocument"), localException);
    }
  }
View Full Code Here

        msg = msg + fe.getCause().getLocalizedMessage();
      }
      XspOpenLogUtil.getXspOpenLogItem().logErrorEx(fe.getCause(), msg, null, null);
    } else if ("com.ibm.xsp.FacesExceptionEx".equals(error.getClass().getName())) {
      // FacesException, so error is on event - doesn't get hit in examples. Can this still get hit??
      FacesExceptionEx fe = (FacesExceptionEx) error;
      try {
        if ("lotus.domino.NotesException".equals(fe.getCause().getClass().getName())) {
          // sometimes the cause is a NotesException
          NotesException ne = (NotesException) fe.getCause();

          msg = msg + "NotesException - " + Integer.toString(ne.id) + " " + ne.text;
        } else if ("java.io.IOException".equals(error.getClass().getName())) {
          IOException e = (IOException) error;

          msg = "Java IO:" + error.toString();
          XspOpenLogUtil.getXspOpenLogItem().logErrorEx(e.getCause(), msg, null, null);
        } else {
          EvaluationExceptionEx ee = (EvaluationExceptionEx) fe.getCause();
          InterpretException ie = (InterpretException) ee.getCause();

          msg = "Error on " + ee.getErrorComponentId() + " " + ee.getErrorPropertyId() + " property/event:\n\n"
              + Integer.toString(ie.getErrorLine()) + ":\n\n" + ie.getLocalizedMessage() + "\n\n" + ie.getExpressionText();
        }
      } catch (Throwable t) {
        msg = "Unexpected error class: " + fe.getCause().getClass().getName() + "\n Message recorded is: "
            + fe.getCause().getLocalizedMessage();
        ;
      }
      XspOpenLogUtil.getXspOpenLogItem().logErrorEx(fe.getCause(), msg, null, null);

    } else if ("javax.faces.el.PropertyNotFoundException".equals(error.getClass().getName())) {
      // Hit by ErrorOnProperty.xsp
      // Property not found exception, so error is on a component property
      PropertyNotFoundException pe = (PropertyNotFoundException) error;
View Full Code Here

      Vector<ViewColumn> vc = (Vector<ViewColumn>) getView().getColumns();

      // Look for the key column
      if ((valueIndex = findSortColumnIndex(vc)) < 0) {
        throw new FacesExceptionEx(null, "Cannot find a value column in the view {0}", getView().getName()); // $NLX-DominoViewPickerData.Cannotfindavaluecolumnintheview0-1$
      }

      // Look for the label column
      String labelName = getLabelColumn();
      if (StringUtil.isNotEmpty(labelName)) {
        if ((labelIndex = findColumnIndex(vc, labelName)) < 0) {
          throw new FacesExceptionEx(null, "Cannot find label column {0}", labelName); // $NLX-DominoViewPickerData.Cannotfindlabelcolumn0-1$
        }
      } else {
        labelIndex = -1;
      }
View Full Code Here

    @Override
    public View openView() throws NotesException {
      // Find the database
      Database nabDb = findNAB();
      if (nabDb == null) {
        throw new FacesExceptionEx(null, "Not able to find a valid address book for the name picker"); // $NLX-DominoNABNamePickerData.Notabletofindavalidaddressbookfor-1$
      }
      // Find the view
      String viewName = getViewName();
      if (StringUtil.isEmpty(viewName)) {
        throw new FacesExceptionEx(null, "Not able to find a view in the address book that matches the selection criterias"); // $NLX-DominoNABNamePickerData.Notabletofindaviewintheaddressboo-1$
      }

      View view = nabDb.getView(viewName);
      return view;
    }
View Full Code Here

            }
          }
        } else if (sel.equals(NAB_DATABASENAME)) {
          return DominoUtils.openDatabaseByName(getAddressBookDb());
        } else {
          throw new FacesExceptionEx(null, "Unknown address book selection type {0}", sel); // $NLX-DominoNABNamePickerData.Unknownaddressbookselectiontype0.1-1$
        }
      } else {
        // If no NAB is avail, request authentication
        // We force the authetication here, but it does not work outside of basic authentication
        // Moreover, the page is not refreshed afterwards to show the new user.
View Full Code Here

TOP

Related Classes of com.ibm.xsp.FacesExceptionEx

Copyright © 2018 www.massapicom. 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.