Package org.apache.wicket.model.util

Examples of org.apache.wicket.model.util.ListModel


                        panel = new AjaxPalettePanel("value", new PropertyModel<List<String>>(
                                ReportletConfModalPage.this.reportletConf, fieldName), new ListModel<String>(choices),
                                true);
                    } else if (listItemType.isEnum()) {
                        panel = new CheckBoxMultipleChoiceFieldPanel("value", new PropertyModel(
                                ReportletConfModalPage.this.reportletConf, fieldName), new ListModel(Arrays
                                .asList(listItemType.getEnumConstants())));
                    } else {
                        if (((List) wrapper.getPropertyValue(fieldName)).isEmpty()) {
                            ((List) wrapper.getPropertyValue(fieldName)).add(null);
                        }
View Full Code Here


    add(new Image("wmstatus_icon", getUpOrDownArrowRef(report.getWmStatus()
        .getStatus())));
    add(new Image("rmstatus_icon", getUpOrDownArrowRef(report.getRmStatus()
        .getStatus())));

    ListModel crawlerStatusListModel = new ListModel(report.getCrawlerStatus());
    add(new VisibilityAndSortToggler("crawler_toggler",
        "crawler_status_showall", "crawler_status_hide", "crawler_status_sort",
        "crawler_status_unsort", "crawler_status_more", crawlerStatusListModel));

    add(new ListView<CrawlerStatus>("crawler_status_list",
        crawlerStatusListModel) {
      /*
       * (non-Javadoc)
       *
       * @see
       * org.apache.wicket.markup.html.list.ListView#populateItem(org.apache
       * .wicket.markup.html.list.ListItem)
       */
      @Override
      protected void populateItem(ListItem<CrawlerStatus> statusItem) {
        CrawlerStatus status = statusItem.getModelObject();
        String statusString = status.getInfo().getCrawlerName() + " ("
            + status.getCrawlHost() + ":" + status.getInfo().getCrawlerPort()
            + ")";
        statusItem.add(new Label("crawler_name_and_url", statusString));
        statusItem.add(new Image("crawler_status_icon",
            getUpOrDownArrowRef(status.getStatus())));
      }
    });

    ListModel batchStubStatusListModel = new ListModel(
        report.getBatchStubStatus());
    add(new VisibilityAndSortToggler("batch_stub_toggler",
        "batch_stub_showall", "batch_stub_hide", "batch_stub_sort",
        "batch_stub_unsort", "batch_stub_more", batchStubStatusListModel));

    add(new ListView<PCSDaemonStatus>("batch_stub_list",
        batchStubStatusListModel) {

      @Override
      protected void populateItem(ListItem<PCSDaemonStatus> item) {
        item.add(new Label("batch_stub_url", item.getModelObject().getUrlStr()));
        item.add(new Image("batch_stub_status_icon", getUpOrDownArrowRef(item
            .getModelObject().getStatus())));

      }
    });

    List<JobHealthStatus> jobHealthStatusList = report.getJobHealthStatus();
    add(new ListView<JobHealthStatus>("jobstatus_list", jobHealthStatusList) {
      /*
       * (non-Javadoc)
       *
       * @see
       * org.apache.wicket.markup.html.list.ListView#populateItem(org.apache
       * .wicket.markup.html.list.ListItem)
       */
      @Override
      protected void populateItem(final ListItem<JobHealthStatus> item) {
        item.add(new Label("status_name", item.getModelObject().getStatus()));
        Link<String> countLink = new Link<String>("jobstatus_count_link",
            new Model<String>(item.getModelObject().getStatus())) {

          @Override
          public void onClick() {
            PageParameters params = new PageParameters();
            params.add("pageNum", "1");
            params.add("status", getModelObject());
            setResponsePage(instancesPage, params);
          }
        };
        countLink.add(new Label("status_num_jobs", String.valueOf(item
            .getModelObject().getNumPipelines())));
        item.add(countLink);
      }
    });

    List<Product> prodList = report.getLatestProductsIngested();
    final FileManagerUtils fm = new FileManagerUtils(fmUrlStr);

    add(new ListView<Product>("file_health_list", prodList) {
      /*
       * (non-Javadoc)
       *
       * @see
       * org.apache.wicket.markup.html.list.ListView#populateItem(org.apache
       * .wicket.markup.html.list.ListItem)
       */
      @Override
      protected void populateItem(ListItem<Product> item) {
        final Product product = item.getModelObject();
        product.setProductType(fm.safeGetProductTypeById(product
            .getProductType().getProductTypeId()));
        product.setProductReferences(fm.safeGetProductReferences(product));
        final Metadata prodMet = fm.safeGetMetadata(product);
        final String filePath = fm.getFilePath(product);

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

        link.add(new Label("file_path", filePath));
        item.add(link);
        item.add(new Label("file_ingest_datetime", prodMet.getMetadata("CAS."
            + CoreMetKeys.PRODUCT_RECEVIED_TIME)));

      }
    });

    ListModel crawlerHealthListModel = new ListModel(
        report.getCrawlerHealthStatus());
    add(new VisibilityToggler("crawler_health_toggler",
        "crawler_health_showall", "crawler_health_hide", "crawler_health_more",
        crawlerHealthListModel));

View Full Code Here

                        panel = new AjaxPalettePanel("value", new PropertyModel<List<String>>(
                                ReportletConfModalPage.this.reportletConf, fieldName), new ListModel<String>(choices),
                                true);
                    } else if (listItemType.isEnum()) {
                        panel = new CheckBoxMultipleChoiceFieldPanel("value", new PropertyModel(
                                ReportletConfModalPage.this.reportletConf, fieldName), new ListModel(Arrays
                                .asList(listItemType.getEnumConstants())));
                    } else {
                        if (((List) wrapper.getPropertyValue(fieldName)).isEmpty()) {
                            ((List) wrapper.getPropertyValue(fieldName)).add(null);
                        }
View Full Code Here

                        panel = new AjaxPalettePanel("value", new PropertyModel<List<String>>(
                                ReportletConfModalPage.this.reportletConf, fieldName), new ListModel<String>(choices),
                                true);
                    } else if (listItemType.isEnum()) {
                        panel = new CheckBoxMultipleChoiceFieldPanel("value", new PropertyModel(
                                ReportletConfModalPage.this.reportletConf, fieldName), new ListModel(Arrays
                                .asList(listItemType.getEnumConstants())));
                    } else {
                        if (((List) wrapper.getPropertyValue(fieldName)).isEmpty()) {
                            ((List) wrapper.getPropertyValue(fieldName)).add(null);
                        }
View Full Code Here

                        panel = new AjaxPalettePanel("value", new PropertyModel<List<String>>(
                                ReportletConfModalPage.this.reportletConf, fieldName), new ListModel<String>(choices),
                                true);
                    } else if (listItemType.isEnum()) {
                        panel = new CheckBoxMultipleChoiceFieldPanel("value", new PropertyModel(
                                ReportletConfModalPage.this.reportletConf, fieldName), new ListModel(Arrays
                                        .asList(listItemType.getEnumConstants())));
                    } else {
                        if (((List) wrapper.getPropertyValue(fieldName)).isEmpty()) {
                            ((List) wrapper.getPropertyValue(fieldName)).add(null);
                        }
View Full Code Here

                        panel = new AjaxPalettePanel("value", new PropertyModel<List<String>>(
                                ReportletConfModalPage.this.reportletConf, fieldName), new ListModel<String>(choices),
                                true);
                    } else if (listItemType.isEnum()) {
                        panel = new CheckBoxMultipleChoiceFieldPanel("value", new PropertyModel(
                                ReportletConfModalPage.this.reportletConf, fieldName), new ListModel(Arrays
                                .asList(listItemType.getEnumConstants())));
                    } else {
                        if (((List) wrapper.getPropertyValue(fieldName)).isEmpty()) {
                            ((List) wrapper.getPropertyValue(fieldName)).add(null);
                        }
View Full Code Here

      new SimpleNumberSeries<Double>(25d, 17.5d, 12.25d, 8.6d, 6.0d, 4.2d, 2.9d);

    SimpleNumberSeries<Integer> l3 = new SimpleNumberSeries<Integer>(4, 25, 13, 22, 14, 17, 15);

    @SuppressWarnings("unchecked")
    JQPlot chart3 = new JQPlot("chart3", new ListModel(Arrays.asList(l1, l2, l3)));
    PlotOptions chart3O = chart3.getOptions();
    chart3O.getLegend().setShow(true);
    chart3O.setTitle("Mixed Data Input Formats");

    PlotSeries chart3series1 = chart3O.addNewSeries();
View Full Code Here

    l1.addEntry(new NumberSeriesEntry<Double, Double>(4d, 16d));

    SimpleNumberSeries<Double> l2 = new SimpleNumberSeries<Double>(25d, 12.5d, 6.25d, 3.125d);

    @SuppressWarnings("unchecked")
    JQPlot chart4 = new JQPlot("chart4", new ListModel(Arrays.asList(l1, l2)));
    PlotOptions chart4O = chart4.getOptions();
    chart4O.getLegend().setShow(true);
    chart4O.setTitle("Customized Axes Ticks");
    chart4O.getGrid().setBackground("#f3f3f3").setGridLineColor("#accf9b");
View Full Code Here

            protected void onSelectionChange(AjaxRequestTarget target, String newValue) {
                // skip
            }
        });
        choices = new DropDownChoice<SelectOption<Integer, String>>("tweetMenu",
                new ListModel(), Arrays.asList(
                new SelectOption<Integer, String>(200, "200"),
                new SelectOption<Integer, String>(1000, "1000"),
                new SelectOption<Integer, String>(3200, "MAX")));
        choices.getModel().setObject(choices.getChoices().get(0));
        choices.setNullValid(false);
View Full Code Here

                        panel = new AjaxPalettePanel("value", new PropertyModel<List<String>>(
                                ReportletConfModalPage.this.reportletConf, fieldName), new ListModel<String>(choices),
                                true);
                    } else if (listItemType.isEnum()) {
                        panel = new CheckBoxMultipleChoiceFieldPanel("value", new PropertyModel(
                                ReportletConfModalPage.this.reportletConf, fieldName), new ListModel(Arrays
                                .asList(listItemType.getEnumConstants())));
                    } else {
                        if (((List) wrapper.getPropertyValue(fieldName)).isEmpty()) {
                            ((List) wrapper.getPropertyValue(fieldName)).add(null);
                        }
View Full Code Here

TOP

Related Classes of org.apache.wicket.model.util.ListModel

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.