Package org.apache.wicket

Examples of org.apache.wicket.PageParameters


             *
             * @see org.apache.wicket.markup.html.link.Link#onClick()
             */
            @Override
            public void onClick() {
              PageParameters params = new PageParameters();
              params.add("name", this.getModelObject().getName());
              params.add("pageNum", "1");
              setResponsePage(typeBrowser, params);

            }
          };
          typeCountLink.add(new Label("type_count", String.valueOf(type
              .getModelObject().getCounts().get(0))));
          type.add(typeCountLink);
          Link<ProductType> type2Link = new Link<ProductType>(
              "type2_count_link") {
            /*
             * (non-Javadoc)
             *
             * @see org.apache.wicket.Component#isVisible()
             */
            @Override
            public boolean isVisible() {
              return false;
            }

            @Override
            public void onClick() {
            }
          };
          type.add(new Label("type2_name", BLANK_SPACE));
          type2Link.add(new Label("type2_count", BLANK_SPACE));
          type.add(type2Link);

        } else {
          type.add(new Label("type_name", type.getModelObject().getTypes().get(
              0).getName()));
          Link<ProductType> typeCountLink = new Link<ProductType>(
              "type_count_link", new ProductTypeModel(type.getModelObject()
                  .getTypes().get(0))) {
            /*
             * (non-Javadoc)
             *
             * @see org.apache.wicket.markup.html.link.Link#onClick()
             */
            @Override
            public void onClick() {
              PageParameters params = new PageParameters();
              params.add("name", this.getModelObject().getName());
              params.add("pageNum", "1");
              setResponsePage(typeBrowser, params);

            }
          };
          typeCountLink.add(new Label("type_count", String.valueOf(type
              .getModelObject().getCounts().get(0))));
          type.add(typeCountLink);
          type.add(new Label("type2_name", type.getModelObject().getTypes()
              .get(1).getName()));
          Link<ProductType> type2Link = new Link<ProductType>(
              "type2_count_link", new ProductTypeModel(type.getModelObject()
                  .getTypes().get(1))) {
            /*
             * (non-Javadoc)
             *
             * @see org.apache.wicket.markup.html.link.Link#onClick()
             */
            @Override
            public void onClick() {
              PageParameters params = new PageParameters();
              params.add("name", this.getModelObject().getName());
              params.add("pageNum", "1");
              setResponsePage(typeBrowser, params);

            }
          };
          type2Link.add(new Label("type2_count", String.valueOf(type
View Full Code Here


           *
           * @see org.apache.wicket.markup.html.link.Link#onClick()
           */
          @Override
          public void onClick() {
            PageParameters params = new PageParameters();
            params.add("id", this.getModelObject().getProductId());
            setResponsePage(produdctBrowser, params);

          }
        };

        prodPageLink.add(new Label("product_name", prodItem.getModelObject()
            .getProductName()));
        prodItem.add(prodPageLink);

        prodItem.add(new Label("product_transfer_status", prodItem
            .getModelObject().getTransferStatus()));
        try {
          prodItem.add(new Label("product_pct_transferred", NumberFormat
              .getPercentInstance().format(
                  fm.getFm()
                      .getProductPctTransferred(prodItem.getModelObject()))));
        } catch (DataTransferException e) {
          LOG.log(Level.WARNING,
              "Unable to obtain transfer percentage for product: ["
                  + prodItem.getModelObject().getProductName() + "]: Reason: "
                  + e.getMessage());
        }

        String prodReceivedTime = fm.getProdReceivedTime(prodItem
            .getModelObject());
        prodItem.add(new Label("product_received_time", prodReceivedTime));
        PopupSettings refSettings = new PopupSettings();
        refSettings.setWidth(525).setHeight(450).setWindowName("_refWin");
        Link<String> refLink = new Link<String>("ref_page_link",
            new Model<String>(prodItem.getModelObject().getProductId())) {

          /*
           * (non-Javadoc)
           *
           * @see org.apache.wicket.markup.html.link.Link#onClick()
           */
          @Override
          public void onClick() {
            PageParameters params = new PageParameters();
            params.add("id", getModelObject());
            setResponsePage(prodRefsBrowser, params);

          }
        };
        refLink.setPopupSettings(refSettings);
        prodItem.add(refLink);

        SerializableMetadata met = new SerializableMetadata(fm
            .getMetadata(prodItem.getModelObject()));
        Link<String> metLink = new Link<String>("met_page_link", new Model(
            prodItem.getModelObject().getProductId())) {

          /*
           * (non-Javadoc)
           *
           * @see org.apache.wicket.markup.html.link.Link#onClick()
           */
          @Override
          public void onClick() {
            PageParameters params = new PageParameters();
            params.add("id", getModelObject());
            setResponsePage(prodMetBrowser, params);

          }

        };
View Full Code Here

       * @see org.apache.wicket.markup.html.list.ListView#populateItem(org.apache.wicket.markup.html.list.ListItem)
       */
      @Override
      protected void populateItem(ListItem<WorkflowCondition> item) {
         WorkflowCondition cond = item.getModelObject();
         final PageParameters params = new PageParameters();
         params.add("id", cond.getConditionId());
         Link condLink = new Link("condition_page_link"){
               /* (non-Javadoc)
               * @see org.apache.wicket.markup.html.link.Link#onClick()
               */
              @Override
View Full Code Here

      criteria.add(new TermQueryCriteria(tc.getElem().getElementName(), tc
          .getValue()));
      ((FMBrowserSession) getSession()).setCriteria(criteria);
      refreshProductPage();
      computeStartEndIdx();
      PageParameters parameters = new PageParameters();
      parameters.add("name", type.getName());
      parameters.add("pageNum", String.valueOf(pageNum));
      setResponsePage(getPage().getClass(), parameters);
    }
View Full Code Here

        if (cr.getElementName().equals(crit.getElementName())) {
          criteria.remove(i);
          ((FMBrowserSession) getSession()).setCriteria(criteria);
          refreshProductPage();
          computeStartEndIdx();
          PageParameters parameters = new PageParameters();
          parameters.add("name", type.getName());
          parameters.add("pageNum", String.valueOf(pageNum));
          setResponsePage(getPage().getClass(), parameters);
          break;
        }
      }
    }
View Full Code Here

      add(new ListView<PageNumDisplay>("page_repeater", pnums) {

        @Override
        protected void populateItem(ListItem<PageNumDisplay> item) {
          PageParameters params = new PageParameters();
          params.add("name", productTypeName);
          params.put("pageNum", item.getModelObject().getNum());
          BookmarkablePageLink pageLink = new BookmarkablePageLink("pageLink",
              typeBrowserPage, params);
          pageLink.add(new Label("pageNum", String.valueOf(item
              .getModelObject().getNum())));
          pageLink.add(new SimpleAttributeModifier("class", item
View Full Code Here

    String pageMapName = pageInfo != null ? pageInfo.getPageMapName() : null;
    Integer pageVersion = pageInfo != null ? pageInfo.getVersionNumber() : null;
    Integer pageId = pageInfo != null ? pageInfo.getPageId() : null;

    // decode parameters
    PageParameters parameters = new PageParameters(decodeParameters(
      extraction.getUrlAfterExtraction(), requestParameters.getParameters()));

    if (requestParameters.getPageMapName() == null)
    {
      requestParameters.setPageMapName(pageMapName);
    }
    else
    {
      pageMapName = requestParameters.getPageMapName();
    }

    // do some extra work for checking whether this is a normal request to a
    // bookmarkable page, or a request to a stateless page (in which case a
    // wicket:interface parameter should be available
    final String interfaceParameter = (String)parameters.remove(WebRequestCodingStrategy.INTERFACE_PARAMETER_NAME);

    // we need to remember the amount of trailing slashes after the redirect
    // (otherwise we'll break relative urls)
    int originalUrlTrailingSlashesCount = getTrailingSlashesCount(extraction.getUrlAfterExtraction());
View Full Code Here

    if (matches(requestTarget) == false)
    {
      throw new IllegalArgumentException("Unsupported request target type.");
    }

    PageParameters parameters = getPageParameters(requestTarget);
    PageInfo pageInfo = getPageInfo(requestTarget);

    final AppendingStringBuffer url = new AppendingStringBuffer(40);
    url.append(getMountPath());
View Full Code Here

    @Override
    protected Page newPage(Class pageClass, RequestCycle requestCycle)
    {
      Page page = super.newPage(pageClass, requestCycle);
      page.setMetaData(PAGE_PARAMETERS_META_DATA_KEY, new PageParameters(getPageParameters()));
      page.setMetaData(ORIGINAL_TRAILING_SLASHES_COUNT_METADATA_KEY, new Integer(
        originalUrlTrailingSlashesCount));
      return page;
    }
View Full Code Here

  }

  public IRequestTarget decode(RequestParameters requestParameters)
  {
    String pageMapName = requestParameters.getPageMapName();
    final PageParameters parameters = new PageParameters(requestParameters.getParameters());

    // This might be a request to a stateless page, so check for an
    // interface name.
    if (requestParameters.getInterfaceName() != null)
    {
View Full Code Here

TOP

Related Classes of org.apache.wicket.PageParameters

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.