当前位置: 首页>>代码示例>>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;未经允许,请勿转载。