Examples of PageRequest


Examples of net.sf.regain.util.sharedtag.PageRequest

    catch(java.io.IOException exc) {
      throw new ExtendedJspException("Writing end tag failed", exc);
    }

    // Print the end tag
    PageRequest request = getPageRequest();
    PageResponse response = new JspPageResponse(pageContext);
    try {
      // Print the end tag
      mNestedTag.printEndTag(request, response);
     
View Full Code Here

Examples of net.sf.regain.util.sharedtag.PageRequest

   * If the adapter does not yet exist, it is created.
   *
   * @return The PageRequest adapter.
   */
  private PageRequest getPageRequest() {
    PageRequest request = (PageRequest) pageContext.getAttribute("SharedTagPageRequest");
    if (request == null) {
      request = new JspPageRequest(pageContext);
      pageContext.setAttribute("SharedTagPageRequest", request);
     
      // Add the error to the page attributes
      Throwable error = (Throwable) pageContext.getRequest().getAttribute("javax.servlet.jsp.jspException");
      if (error != null) {
        request.setContextAttribute("page.exception", error);
      }
    }
   
    return request;
  }
View Full Code Here

Examples of net.sf.regain.util.sharedtag.PageRequest

   * @throws Exception If executing the JSP page failed.
   */
  private void processFile(Request req, Response resp, File file)
    throws Exception
  {
    PageRequest request = new SimplePageRequest(req);
    PageResponse response = new SimplePageResponse(this, req, resp, null, null);
   
    SearchToolkit.sendFile(request, response, file);
  }
View Full Code Here

Examples of net.sf.regain.util.sharedtag.PageRequest

      req.setCharacterEncoding("UTF-8");
      pageContext = factory.getPageContext(this, req, resp,
        errorPageURL, needsSession, bufferSize, autoFlush);
   
      // Create a shared wrapper
      PageRequest request = new JspPageRequest(pageContext);
      PageResponse response = new JspPageResponse(pageContext);

      // Extract the file name
      String encoding = "utf-8"; // We use utf-8 in our JSPs
      String fileUrl = SearchToolkit.extractFileUrl(req.getRequestURI(), encoding);
View Full Code Here

Examples of net.sf.regain.util.sharedtag.PageRequest

      // This request does not come from localhost -> Send 403 Forbidden
      handle(req, resp, 403);
    }

    // Create a shared wrapper
    PageRequest request = new SimplePageRequest(req);
    PageResponse response = new SimplePageResponse(this, req, resp, null, null);

    // Get the request path (Without GET-Parameters)
    // NOTE: We don't use context.getRequestPath for this, because it decodes
    //       the URL, but we want to decode it ourselves using our encoding
View Full Code Here

Examples of org.apache.ambari.server.controller.spi.PageRequest

* PageRequestImpl tests.
*/
public class PageRequestImplTest {
  @Test
  public void testGetStartingPoint() throws Exception {
    PageRequest pageRequest = new PageRequestImpl(PageRequest.StartingPoint.Beginning, 20, 99, null, null);
    Assert.assertEquals(PageRequest.StartingPoint.Beginning, pageRequest.getStartingPoint());
  }
View Full Code Here

Examples of org.candlepin.paging.PageRequest

    @Test
    public void testGetPrevPage() {
        Page p = new Page();
        p.setMaxRecords(55);

        PageRequest pr = new PageRequest();
        p.setPageRequest(pr);

        pr.setPerPage(10);
        pr.setPage(3);

        assertEquals(Integer.valueOf(2), interceptor.getPrevPage(p));
    }
View Full Code Here

Examples of org.drools.guvnor.client.rpc.PageRequest

                clientFactory);
        this.restoreSelectedAssetCommand = restoreSelectedAssetCommand;
        this.deleteSelectedAssetCommand = deleteSelectedAssetCommand;
        setDataProvider( new AsyncDataProvider<AdminArchivedPageRow>() {
            protected void onRangeChanged(HasData<AdminArchivedPageRow> display) {
                PageRequest request = new PageRequest( pager.getPageStart(),
                                                                 pageSize );
                assetService.loadArchivedAssets( request,
                                                      new GenericCallback<PageResponse<AdminArchivedPageRow>>() {
                                                          public void onSuccess(PageResponse<AdminArchivedPageRow> response) {
                                                              updateRowCount( response.getTotalRowSize(),
View Full Code Here

Examples of org.drools.guvnor.client.rpc.PageRequest

        view.setOpenSelectedCommand(openSelectedCommand);
       
       
        AsyncDataProvider<PermissionsPageRow> dataProvider = new AsyncDataProvider<PermissionsPageRow>() {
            protected void onRangeChanged(HasData<PermissionsPageRow> display) {
                PageRequest request = new PageRequest();
                request.setStartRowIndex( view.pager.getPageStart() );
                request.setPageSize( view.pageSize );
                repositoryService.listUserPermissions( request,
                                                             new GenericCallback<PageResponse<PermissionsPageRow>>() {
                                                                 public void onSuccess(PageResponse<PermissionsPageRow> response) {
                                                                     updateRowCount( response.getTotalRowSize(),
                                                                                     response.isTotalRowSizeExact() );
View Full Code Here

Examples of org.drools.guvnor.client.rpc.PageRequest

        view.setOpenSelectedCommand(openSelectedCommand);
       
       
        AsyncDataProvider<PermissionsPageRow> dataProvider = new AsyncDataProvider<PermissionsPageRow>() {
            protected void onRangeChanged(HasData<PermissionsPageRow> display) {
                PageRequest request = new PageRequest();
                request.setStartRowIndex( view.pager.getPageStart() );
                request.setPageSize( view.pageSize );
                repositoryService.listUserPermissions( request,
                                                             new GenericCallback<PageResponse<PermissionsPageRow>>() {
                                                                 public void onSuccess(PageResponse<PermissionsPageRow> response) {
                                                                     updateRowCount( response.getTotalRowSize(),
                                                                                     response.isTotalRowSizeExact() );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.