Package org.hdiv.idGenerator

Examples of org.hdiv.idGenerator.PageIdGenerator


   *            http session
   */
  protected void initPageIdGenerator(ApplicationContext context, HttpSession httpSession) {

    // Obtain new instance of PageIdGenerator
    PageIdGenerator pageIdGenerator = context.getBean(PageIdGenerator.class);
    httpSession.setAttribute(Constants.PAGE_ID_GENERATOR_NAME, pageIdGenerator);
  }
View Full Code Here


   */
  public int getPageId() {

    HttpSession session = this.getHttpSession();

    PageIdGenerator pageIdGenerator = (PageIdGenerator) session.getAttribute(this.pageIdGeneratorName);
    if (pageIdGenerator == null) {
      throw new HDIVException("session.nopageidgenerator");
    }

    int id = pageIdGenerator.getNextPageId();
   
    // PageId must be greater than 0
    if(id <= 0){
      throw new HDIVException("Incorrect PageId generated [" + id + "]. PageId must be greater than 0.");
    }
View Full Code Here

TOP

Related Classes of org.hdiv.idGenerator.PageIdGenerator

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.