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


Java Item.getModel方法代碼示例

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


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

示例1: 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

示例2: addItemColumns

import org.apache.wicket.markup.repeater.Item; //導入方法依賴的package包/類
@Override
protected void addItemColumns(Item<QueuedTaskHolder> item, IModel<? extends QueuedTaskHolder> itemModel) {
	IModel<QueuedTaskHolder> queuedTaskHolderModel = item.getModel();
	TaskResultPanel result = new TaskResultPanel("result", BindingModel.of(queuedTaskHolderModel, CoreJpaMoreBindings.queuedTaskHolder().result())).hideIfEmpty();
	
	NotTreatedObjectsPanel notTreatedObjectsPanel = new NotTreatedObjectsPanel("notTreatedObjectsPanel",
			new TaskBatchReportBeanModel<>(ShowcaseBatchReportBean.class, queuedTaskHolderModel));
	EnclosureContainer notTreatedObjects = new EnclosureContainer("notTreatedObjects")
			.condition(Condition.componentVisible(notTreatedObjectsPanel));
	BootstrapPopoverOptions popoverOptions = new BootstrapPopoverOptions();
	popoverOptions.setTitleModel(new ResourceModel("tasks.list.notTreatedObjects"));
	popoverOptions.setContentComponent(notTreatedObjectsPanel);
	popoverOptions.setHtml(true);
	notTreatedObjects.add(new BootstrapPopoverBehavior(popoverOptions));
	item.add(notTreatedObjectsPanel, notTreatedObjects);
	
	item.add(
			new CoreLabel("queueId", BindingModel.of(queuedTaskHolderModel, CoreJpaMoreBindings.queuedTaskHolder().queueId())).showPlaceholder(new ResourceModel("tasks.queue.default")),
			new CoreLabel("type", BindingModel.of(queuedTaskHolderModel, CoreJpaMoreBindings.queuedTaskHolder().taskType())).showPlaceholder(),
			new CoreLabel("name", BindingModel.of(queuedTaskHolderModel, CoreJpaMoreBindings.queuedTaskHolder().name())).showPlaceholder(),
			new TaskStatusPanel("status", BindingModel.of(queuedTaskHolderModel, CoreJpaMoreBindings.queuedTaskHolder().status())).hideIfEmpty(), //.add(new EnclosureBehavior().model(statusModel)),
			result,
			new DefaultPlaceholderPanel("resultPlaceholder").condition(Condition.componentVisible(result)),
			new DateLabel("creationDate", BindingModel.of(queuedTaskHolderModel, CoreJpaMoreBindings.queuedTaskHolder().creationDate()), DatePattern.SHORT_DATETIME).showPlaceholder(),
			new DateLabel("startDate", BindingModel.of(queuedTaskHolderModel, CoreJpaMoreBindings.queuedTaskHolder().startDate()), DatePattern.SHORT_DATETIME).showPlaceholder(),
			new DateLabel("endDate", BindingModel.of(queuedTaskHolderModel, CoreJpaMoreBindings.queuedTaskHolder().endDate()), DatePattern.SHORT_DATETIME).showPlaceholder()
	);
}
 
開發者ID:openwide-java,項目名稱:owsi-core-parent,代碼行數:29,代碼來源:TaskPortfolioPanel.java

示例3: newShareCheck

import org.apache.wicket.markup.repeater.Item; //導入方法依賴的package包/類
private Check<User> newShareCheck(final Item<User> item) {
       return new Check<User>("userCheck", item.getModel(), userGroup) {

           @Override
           protected void onConfigure() {
               super.onConfigure();
               setVisible(!Objects.equals(item.getModelObject().getId(), UQSession.get().getLoggedInUser().getId()));
           }
       };
}
 
開發者ID:U-QASAR,項目名稱:u-qasar.platform,代碼行數:11,代碼來源:DashboardSharePage.java

示例4: getListing

import org.apache.wicket.markup.repeater.Item; //導入方法依賴的package包/類
private DataView<T> getListing() {
    return new DataView<T>("data", getMetaDataProvider(this.clazz)) {
        @Override
        protected void populateItem(Item<T> item) {
            Check<T> check = new Check<>("check", item.getModel(), checkGroup);
            item.add(check);
            TextField nameField = new TextField("name", new PropertyModel(item.
                    getModel(), "name"));
            item.
                    add(new InputBeanValidationBorder<>("nameValidationBorder", nameField));
            item.add(newIsInUseIndicator("inUse", item.getModelObject()));
        }
    };
}
 
開發者ID:U-QASAR,項目名稱:u-qasar.platform,代碼行數:15,代碼來源:MetaDataEditPanel.java

示例5: newDeleteCheck

import org.apache.wicket.markup.repeater.Item; //導入方法依賴的package包/類
private Check<TeamMembership> newDeleteCheck(final Item<TeamMembership> item) {
	Check<TeamMembership> check = new Check<TeamMembership>("memberCheck", item.getModel(), teamGroup) {

		@Override
		protected void onConfigure() {
			super.onConfigure();
			// TODO when to hide or disable team delete checkbox?
		}
	};
	return check;
}
 
開發者ID:U-QASAR,項目名稱:u-qasar.platform,代碼行數:12,代碼來源:EditTeamPanel.java

示例6: newDeleteCheck

import org.apache.wicket.markup.repeater.Item; //導入方法依賴的package包/類
private Check<User> newDeleteCheck(final Item<User> item) {
       return new Check<User>("userCheck", item.getModel(), userGroup) {

           @Override
           protected void onConfigure() {
               super.onConfigure();
               setVisible(!Objects.equals(item.getModelObject().getId(), UQSession.get().getLoggedInUser().getId()));
           }
       };
}
 
開發者ID:U-QASAR,項目名稱:u-qasar.platform,代碼行數:11,代碼來源:UserListPage.java

示例7: newDeleteCheck

import org.apache.wicket.markup.repeater.Item; //導入方法依賴的package包/類
private Check<Company> newDeleteCheck(final Item<Company> item) {
       return new Check<Company>("companyCheck", item.getModel(), companyGroup) {

           @Override
           protected void onConfigure() {
               super.onConfigure();
               setVisible(!Objects.equals(item.getModelObject().getId(), UQSession.get().getLoggedInUser().getId()));
           }
       };
}
 
開發者ID:U-QASAR,項目名稱:u-qasar.platform,代碼行數:11,代碼來源:CompanyListPage.java

示例8: newDeleteCheck

import org.apache.wicket.markup.repeater.Item; //導入方法依賴的package包/類
private Check<TeamMembership> newDeleteCheck(final Item<TeamMembership> item) {
       return new Check<>("teamCheck", item.getModel(), teamGroup);
}
 
開發者ID:U-QASAR,項目名稱:u-qasar.platform,代碼行數:4,代碼來源:UserEditPage.java


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