當前位置: 首頁>>代碼示例>>Java>>正文


Java Item類代碼示例

本文整理匯總了Java中org.apache.wicket.markup.repeater.Item的典型用法代碼示例。如果您正苦於以下問題:Java Item類的具體用法?Java Item怎麽用?Java Item使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Item類屬於org.apache.wicket.markup.repeater包,在下文中一共展示了Item類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: populateItem

import org.apache.wicket.markup.repeater.Item; //導入依賴的package包/類
@Override
protected void populateItem(Item<Var> item) {
    String name = item.getModel().getObject().getName();
    item.add(new AjaxLink("show") {
        @Override
        public void onClick(AjaxRequestTarget target) {
            selectedName = name;
            Component headerPanel = getPage().get(BasePage.STICKY_HEADER_ID);
            VarModel varModel = new VarModel(model.getSessionId(), name);
            VarPanel varPanel = new VarPanel(BasePage.STICKY_HEADER_ID, varModel, VarsRefreshingView.this);                
            headerPanel = headerPanel.replaceWith(varPanel);
            target.add(headerPanel);
            Component varsPanel = getPage().get(BasePage.LEFT_NAV_ID);
            target.add(varsPanel);
        }
    }.add(new Label("name", name)));
    String type = item.getModel().getObject().getValue().getTypeAsShortString();
    item.add(new Label("type", type));
    if (name.equals(selectedName)) {
        item.add(new AttributeModifier("class", "success"));
    }
}
 
開發者ID:intuit,項目名稱:karate,代碼行數:23,代碼來源:VarsRefreshingView.java

示例2: populateCrawlRow

import org.apache.wicket.markup.repeater.Item; //導入依賴的package包/類
private void populateCrawlRow(Item<Crawl> item) {
  item.add(new AjaxLink<Crawl>("edit", item.getModel()) {
    @Override
    public void onClick(AjaxRequestTarget target) {
      editCrawl(target, getModel());
    }
  }.add(new Label("crawlName")));
  item.add(new Label("seedList.name"));

  item.add(new Label("progress"));
  item.add(createStatusLabel());
  item.add(new Link<Crawl>("start", item.getModel()) {
    @Override
    public void onClick() {
      crawlService.startCrawl(getModelObject().getId(), getCurrentInstance());
    }
  });

  item.add(new Link<Crawl>("delete", item.getModel()) {
    @Override
    public void onClick() {
      crawlService.deleteCrawl(getModelObject().getId());
    }
  });
}
 
開發者ID:jorcox,項目名稱:GeoCrawler,代碼行數:26,代碼來源:CrawlsPage.java

示例3: SettingsPage

import org.apache.wicket.markup.repeater.Item; //導入依賴的package包/類
public SettingsPage() {
  settingsTable = new WebMarkupContainer("settingsTable");
  settingsTable.setOutputMarkupId(true);
  RefreshingView<NutchConfig> nutchConfig = new RefreshingView<NutchConfig>(
      "settings") {

    @Override
    protected Iterator<IModel<NutchConfig>> getItemModels() {
      return new CpmIteratorAdapter<NutchConfig>(
          convertNutchConfig(nutchService.getNutchConfig(getCurrentInstance()
              .getId())));
    }

    @Override
    protected void populateItem(Item<NutchConfig> item) {
      item.add(new Label("name"));
      item.add(new TextField<String>("value"));
    }
  };
  settingsTable.add(nutchConfig);
  add(settingsTable);
}
 
開發者ID:jorcox,項目名稱:GeoCrawler,代碼行數:23,代碼來源:SettingsPage.java

示例4: refreshingView

import org.apache.wicket.markup.repeater.Item; //導入依賴的package包/類
private RefreshingView<NutchInstance> refreshingView() {
  RefreshingView<NutchInstance> instances = new RefreshingView<NutchInstance>(
      "instances") {

    @Override
    protected Iterator<IModel<NutchInstance>> getItemModels() {
      return new CpmIteratorAdapter<NutchInstance>(
          instanceService.getInstances());
    }

    @Override
    protected void populateItem(Item<NutchInstance> item) {
      populateInstanceRow(item);
    }
  };
  return instances;
}
 
開發者ID:jorcox,項目名稱:GeoCrawler,代碼行數:18,代碼來源:InstancesPage.java

示例5: populateItem

import org.apache.wicket.markup.repeater.Item; //導入依賴的package包/類
@Override
public void populateItem(Item<ICellPopulator<T>> cellItem, String componentId,
                         final IModel<T> rowModel) {
	
	IModel model = createLinkModel(rowModel);
    cellItem.add(new LinkPanel(componentId, model) {
    	private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            LinkColumn.this.onClick(target, rowModel);
        }

        @Override
        public boolean isEnabled() {
            return LinkColumn.this.isEnabled(rowModel);
        }
    });
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:20,代碼來源:LinkColumn.java

示例6: createPropertyColumn

import org.apache.wicket.markup.repeater.Item; //導入依賴的package包/類
private static <T> PropertyColumn<T, String> createPropertyColumn(String name, String sortableProperty,
		final String expression, final boolean multivalue) {

	return new PropertyColumn<T, String>(createStringResource(name), sortableProperty, expression) {
		private static final long serialVersionUID = 1L;

		@Override
		public void populateItem(Item item, String componentId, IModel rowModel) {
			if (multivalue) {
				IModel<List> values = new PropertyModel<List>(rowModel, expression);
				RepeatingView repeater = new RepeatingView(componentId);
				for (final Object task : values.getObject()) {
					repeater.add(new Label(repeater.newChildId(), task.toString()));
				}
				item.add(repeater);
				return;
			}

			super.populateItem(item, componentId, rowModel);
		}
	};

}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:24,代碼來源:ColumnUtils.java

示例7: populateItem

import org.apache.wicket.markup.repeater.Item; //導入依賴的package包/類
@Override
public void populateItem(Item<ICellPopulator<T>> cellItem, String componentId,
                         final IModel<T> rowModel) {
	
	IModel<ObjectType> superModel = createLinkModel(rowModel);
	final ObjectType targetObjectType = superModel.getObject();
	IModel<String> nameModel = new PropertyModel<String>(superModel, FocusType.F_NAME.getLocalPart() + ".orig");
    cellItem.add(new LinkPanel(componentId, nameModel) {
    	private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            ObjectLinkColumn.this.onClick(target, rowModel, targetObjectType);
        }

        @Override
        public boolean isEnabled() {
            return ObjectLinkColumn.this.isEnabled(rowModel);
        }
    });
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:22,代碼來源:ObjectLinkColumn.java

示例8: populateItem

import org.apache.wicket.markup.repeater.Item; //導入依賴的package包/類
@Override
    public void populateItem(final Item<ICellPopulator<T>> cellItem, String componentId,
                             final IModel<T> rowModel) {
        IModel<Boolean> selected = getCheckBoxValueModel(rowModel);

        CheckBoxPanel check = new CheckBoxPanel(componentId, selected, enabled) {

            @Override
            public void onUpdate(AjaxRequestTarget target) {
                DataTable table = findParent(DataTable.class);
                onUpdateRow(target, table, rowModel);

                //updating table row
//                target.add(cellItem.findParent(SelectableDataTable.SelectableRowItem.class));
            }
        };
        check.setOutputMarkupId(true);

        cellItem.add(check);
    }
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:21,代碼來源:CheckBoxColumn.java

示例9: initResultColumns

import org.apache.wicket.markup.repeater.Item; //導入依賴的package包/類
private List<IColumn<OperationResult, String>> initResultColumns() {
	List<IColumn<OperationResult, String>> columns = new ArrayList<IColumn<OperationResult, String>>();
	columns.add(new PropertyColumn<>(createStringResource("pageTaskEdit.opResult.token"), "token"));
	columns.add(new PropertyColumn<>(createStringResource("pageTaskEdit.opResult.operation"), "operation"));
	columns.add(new PropertyColumn<>(createStringResource("pageTaskEdit.opResult.status"), "status"));
	columns.add(new AbstractColumn<OperationResult, String>(createStringResource("pageTaskEdit.opResult.message"), "message") {
		@Override
		public void populateItem(Item<ICellPopulator<OperationResult>> cellItem, String componentId,
				IModel<OperationResult> rowModel) {
			Label label = new Label(componentId, new AbstractReadOnlyModel<String>() {
				@Override
				public String getObject() {
					return WebComponentUtil.nl2br(rowModel.getObject().getMessage());
				}
			});
			label.setEscapeModelStrings(false);
			cellItem.add(label);
		}
	});
	//columns.add(new PropertyColumn(createStringResource("pageTaskEdit.opResult.message"), "message"));
	return columns;
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:23,代碼來源:TaskResultTabPanel.java

示例10: populateItem

import org.apache.wicket.markup.repeater.Item; //導入依賴的package包/類
@Override
protected void populateItem(Item<Count> item) {
    //model for actual value
    final PropertyModel<String> valueModel = new PropertyModel<>(item.getModel(), "name");

    //checkbox
    final Component selector = createValueCheckbox("selector", valueModel.getObject());
    item.add(selector);

    //label
    item.add(new WebMarkupContainer("label")
            //child label
            .add(new FieldValueLabel("name", valueModel, fieldNameModel))
            //count label
            .add(new Label("count", new PropertyModel<String>(item.getModel(), "count")))
            //reference to checkbox
            .add(new AttributeModifier("for", selector.getMarkupId()))
            .add(new AttributeAppender("class", valueModel, " "))
    );

    //description as tooltip (title)
    final IModel<FieldValueDescriptor> descriptorModel = new MapValueModel<>(descriptorsModel, valueModel);
    final IModel<String> descriptionModel = new PropertyModel<>(descriptorModel, "description");
    item.add(new AttributeModifier("title", descriptionModel));
}
 
開發者ID:acdh-oeaw,項目名稱:vlo-curation,代碼行數:26,代碼來源:AvailabilityFacetPanel.java

示例11: newRowItem

import org.apache.wicket.markup.repeater.Item; //導入依賴的package包/類
@Override
protected Item<T> newRowItem(final String id, final int index, final IModel<T> model) {
	final Item<T> rowItem = new Item<T>(id, index, model);
	rowItem.add(

			new AjaxEventBehavior("onclick") {
				private static final long serialVersionUID = 6720512493017210281L;

				@Override
				protected void onEvent(final AjaxRequestTarget target) {
					// callback or do some stuff
				}

			});
	return rowItem;

}
 
開發者ID:bptlab,項目名稱:Unicorn,代碼行數:18,代碼來源:SelectableDataTable.java

示例12: addProcessModelTable

import org.apache.wicket.markup.repeater.Item; //導入依賴的package包/類
@SuppressWarnings("unchecked")
private Component addProcessModelTable() {
	this.columns = new ArrayList<IColumn<AbstractBPMNElement, String>>();
	this.columns.add(new AbstractColumn<AbstractBPMNElement, String>(new Model("Element")) {

		@Override
		public void populateItem(final Item cellItem, final String componentId, final IModel rowModel) {
			final String elementName = ((AbstractBPMNElement) rowModel.getObject()).toString();
			cellItem.add(new Label(componentId, elementName));
		}
	});
	this.columns.add(new PropertyColumn<AbstractBPMNElement, String>(Model.of("Predecessors"), "predecessors"));
	this.columns.add(new PropertyColumn<AbstractBPMNElement, String>(Model.of("Successors"), "successors"));
	this.columns.add(new PropertyColumn<AbstractBPMNElement, String>(Model.of("Monitoring Points"), "monitoringPoints"));

	this.processModelTable = new DefaultDataTable<AbstractBPMNElement, String>("processModelElements", this.columns, this.processModelProvider, 40);
	this.processModelTable.setOutputMarkupId(true);
	this.processModelTable.setOutputMarkupPlaceholderTag(true);

	return this.processModelTable;
}
 
開發者ID:bptlab,項目名稱:Unicorn,代碼行數:22,代碼來源:BPMNProcessUploadPanel.java

示例13: createColumns

import org.apache.wicket.markup.repeater.Item; //導入依賴的package包/類
private List<IColumn<TypeTreeNode, String>> createColumns() {
	final List<IColumn<TypeTreeNode, String>> columns = new ArrayList<IColumn<TypeTreeNode, String>>();

	columns.add(new PropertyColumn<TypeTreeNode, String>(Model.of("ID"), "ID"));
	columns.add(new TreeColumn<TypeTreeNode, String>(Model.of("Attributes")));

	columns.add(new AbstractColumn<TypeTreeNode, String>(new Model("Select")) {
		@Override
		public void populateItem(final Item cellItem, final String componentId, final IModel rowModel) {
			final TypeTreeNode attribute = ((TypeTreeNode) rowModel.getObject());
			cellItem.add(new AttributeSelectionPanel(componentId, attribute, AttributeTreePanel.this.attributeIdentifiersAndExpressions, AttributeTreePanel.this.attributeIdentifiersWithExternalKnowledge, AttributeTreePanel.this.advancedRuleEditorPanel.getPatternBuilderPanel()));

		}
	});

	return columns;
}
 
開發者ID:bptlab,項目名稱:Unicorn,代碼行數:18,代碼來源:AttributeTreePanel.java

示例14: addEventTable

import org.apache.wicket.markup.repeater.Item; //導入依賴的package包/類
@SuppressWarnings({"rawtypes", "unchecked"})
private void addEventTable() {
	this.columns = new ArrayList<IColumn<EapEvent, String>>();
	this.columns.add(new PropertyColumn<EapEvent, String>(Model.of("ID"), "ID"));
	this.columns.add(new PropertyColumn<EapEvent, String>(Model.of("Timestamp"), "timestamp"));
	this.columns.add(new PropertyColumn<EapEvent, String>(Model.of("EventType"), "eventType"));
	this.columns.add(new PropertyColumn<EapEvent, String>(Model.of("Values"), "values"));
	this.columns.add(new PropertyColumn<EapEvent, String>(Model.of("Process Instances"), "processInstances"));

	this.columns.add(new AbstractColumn<EapEvent, String>(new Model("Select")) {
		private static final long serialVersionUID = 1L;

		@Override
		public void populateItem(final Item cellItem, final String componentId, final IModel rowModel) {
			final int entryId = ((EapEvent) rowModel.getObject()).getID();
			cellItem.add(new SelectEntryPanel(componentId, entryId, Export.this.eventProvider));
		}
	});

	this.dataTable = new DefaultDataTable<EapEvent, String>("events", this.columns, this.eventProvider, 20);
	this.dataTable.setOutputMarkupId(true);
	this.add(this.dataTable);
}
 
開發者ID:bptlab,項目名稱:Unicorn,代碼行數:24,代碼來源:Export.java

示例15: ForAdmins

import org.apache.wicket.markup.repeater.Item; //導入依賴的package包/類
/**
 * Construct.
 * 
 * @param id
 */
public ForAdmins(String id, final BodyFrame index) {
	super(id);
	
	// generate data-view to populate the table
	DataView<NavigationItem> naviView = new DataView<NavigationItem>("adminNavis",
			new ListDataProvider<NavigationItem>(index.getAdminNavigationList())) {

		@Override
		protected void populateItem(Item<NavigationItem> item) {
			NavigationItem naviItem = item.getModelObject();

			// link to the page
			ChangeFramePageLink link = new ChangeFramePageLink("linkToAdminPage", index, naviItem.getPageClass());
			link.add(new Label("adminLinkLabel", naviItem.getPageName()));
			item.add(link);
		}
	};
	
	add(naviView);
}
 
開發者ID:citlab,項目名稱:Intercloud,代碼行數:26,代碼來源:NavigationFrame.java


注:本文中的org.apache.wicket.markup.repeater.Item類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。