当前位置: 首页>>代码示例>>Java>>正文


Java Item.getModelObject方法代码示例

本文整理汇总了Java中org.apache.wicket.markup.repeater.Item.getModelObject方法的典型用法代码示例。如果您正苦于以下问题:Java Item.getModelObject方法的具体用法?Java Item.getModelObject怎么用?Java Item.getModelObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.wicket.markup.repeater.Item的用法示例。


在下文中一共展示了Item.getModelObject方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

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

示例2: getTeamListing

import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
private DataView<TeamMembership> getTeamListing() {
	return new DataView<TeamMembership>("teams", provider = new TeamProvider(user)) {
		@Override
		protected void populateItem(Item<TeamMembership> item) {
			final TeamMembership team = item.getModelObject();
			Check<TeamMembership> check = newDeleteCheck(item);
			List<Role> roles = new ArrayList<>(Arrays.asList(Role.teamAssignableRoles()));
			item.add(check);
			DropDownChoice<Role> roleSelector = new DropDownChoice<>("td.role",
					new PropertyModel<Role>(team, "role"), roles
			);
			roleSelector.setNullValid(false);
			item.add(roleSelector);
			BookmarkablePageLink<TeamEditPage> editTeamLink = new BookmarkablePageLink<>("link.edit.team", TeamEditPage.class, new PageParameters().add("id", team.getTeam().getId()));
			editTeamLink.add(new Label("td.teamname", new PropertyModel<>(team.getTeam(), "name")));
			item.add(editTeamLink);
			item.setOutputMarkupId(true);
		}
	};
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:21,代码来源:UserEditPage.java

示例3: populateItem

import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
@Override
public void populateItem(Item<LdapUser> item, Check<LdapUser> check) {
	LdapUser user = item.getModelObject();
	item.add(new Label("username", new PropertyModel(user, "userName")));
	item.add(new ExternalLink("mail", "mailto:" + user.getMail()).add(new Label("mailText", new PropertyModel(user, "mail"))));
	item.add(new Label("firstName", new PropertyModel(user, "firstName")));
	item.add(new Label("lastName", new PropertyModel(user, "lastName")));
	item.add(new Image("photo", user.hasProfilePicture() ? user.getProfilePictureImage() : anonymousPicture));
	if (isSelectionEnabled()) {
		if (userService.ldapBasedUserExists(user)) {
			check.setVisible(false);
			item.add(new AttributeAppender("class", Model.of("warning")));
			item.add(new AttributeAppender("title", new StringResourceModel("table.users.warning.exists", this, null)));
		} else {
			item.add(new AttributeAppender("class", Model.of("success")));
		}
	}
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:19,代码来源:LdapUserListPanel.java

示例4: populateDataViewItem

import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
@Override
protected void populateDataViewItem(Item<QualityIndicator> item) {
    final QualityIndicator entity = item.getModelObject();
    BookmarkablePageLink<QualityIndicatorEditPage> link = new BookmarkablePageLink<>("link",
            QualityIndicatorEditPage.class, QualityIndicatorEditPage.forQualityIndicator(entity));
    link.add(new Label("name", Model.of(entity.getName()
            + " (" + entity.getNodeKey() + ")")).setRenderBodyOnly(true));
    item.add(link);
    
    BookmarkablePageLink<ProjectViewPage> projectLink = new BookmarkablePageLink<>("project",
            ProjectViewPage.class, ProjectViewPage.forProject(entity.getProject()));
    projectLink.add(new Label("projectKey", Model.of(entity.getProject().getNodeKey())));
    item.add(projectLink);
    
    item.add(new Label("value", Model.of(entity.getValue())));
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:17,代码来源:QualityIndicatorSearchResultsPanel.java

示例5: populateDataViewItem

import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
@Override
protected void populateDataViewItem(Item<Metric> item) {
    final Metric entity = item.getModelObject();
    BookmarkablePageLink<MetricEditPage> link = new BookmarkablePageLink<>("link",
            MetricEditPage.class, MetricEditPage.forMetric(entity));
    link.add(new Label("name", Model.of(entity.getName()
            + " (" + entity.getNodeKey() + ")")).setRenderBodyOnly(true));
    item.add(link);
    
    BookmarkablePageLink<ProjectViewPage> projectLink = new BookmarkablePageLink<>("project",
            ProjectViewPage.class, ProjectViewPage.forProject(entity.getProject()));
    projectLink.add(new Label("projectKey", Model.of(entity.getProject().getNodeKey())));
    item.add(projectLink);
    
    item.add(new Label("source", Model.of(entity.getMetricSource())));
    item.add(new Label("value", Model.of(entity.getValue())));
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:18,代码来源:MetricSearchResultsPanel.java

示例6: populateDataViewItem

import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
@Override
protected void populateDataViewItem(Item<QMMetric> item) {
    final QMMetric entity = item.getModelObject();
    BookmarkablePageLink<QMMetricEditPage> link = new BookmarkablePageLink<>("link",
            QMMetricEditPage.class, QMMetricEditPage.forMetric(entity));
    link.add(new Label("name", Model.of(entity.getName()
            + " (" + entity.getNodeKey() + ")")).setRenderBodyOnly(true));
    item.add(link);
    
    BookmarkablePageLink<QModelViewPage> QMlink = new BookmarkablePageLink<>("qmodel",
    		QModelViewPage.class, QModelViewPage.forQModel(entity.getQModel()));
    QMlink.add(new Label("qmKey", Model.of(entity.getQModel().getNodeKey())));
    item.add(QMlink);
    
    
    item.add(new Label("value", Model.of(entity.getTargetValue())));
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:18,代码来源:QMMetricSearchResultsPanel.java

示例7: populateDataViewItem

import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
@Override
protected void populateDataViewItem(Item<QMQualityIndicator> item) {
    final QMQualityIndicator entity = item.getModelObject();
    BookmarkablePageLink<QMQualityIndicatorEditPage> link = new BookmarkablePageLink<>("link",
            QMQualityIndicatorEditPage.class, QMQualityIndicatorEditPage.forQualityIndicator(entity));
    link.add(new Label("name", Model.of(entity.getName()
            + " (" + entity.getNodeKey() + ")")).setRenderBodyOnly(true));
    item.add(link);
    
    BookmarkablePageLink<QModelViewPage> QMlink = new BookmarkablePageLink<>("qmodel",
    		QModelViewPage.class, QModelViewPage.forQModel(entity.getQModel()));
    QMlink.add(new Label("qmKey", Model.of(entity.getQModel().getNodeKey())));
    item.add(QMlink);
    
    item.add(new Label("value", Model.of(entity.getTargetValue())));
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:17,代码来源:QMQualityIndicatorSearchResultsPanel.java

示例8: populateDataViewItem

import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
@Override
protected void populateDataViewItem(Item<User> item) {
    final User entity = item.getModelObject();
    BookmarkablePageLink<User> link = new BookmarkablePageLink<>("link", 
            UserEditPage.class, UserEditPage.linkToEdit(entity));
    link.add(new Label("name", Model.of(entity.getFullNameWithUserName())).setRenderBodyOnly(true));
    item.add(link);
    
    item.add(new Label("role", Model.of(entity.getRole())));
    item.add(new Label("email", Model.of(entity.getMail())));
 
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:13,代码来源:UserSearchResultsPanel.java

示例9: createDataTable

import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
private void createDataTable( List<RequestMod> mods )
{
    DataView< RequestMod > view = new DataView<RequestMod>("modstable", createDataProvider( mods ) )
    {
        private static final long serialVersionUID = 1L;

        @Override
        protected void populateItem(final Item<RequestMod> item)
        {

            RequestMod mod = item.getModelObject();
            item.add( new Label( "index", mod.getIndex() ) );
            item.add( new Label( "type", mod.getType() ) );
            item.add( new Label( "name", mod.getName() ) );
            item.add( new Label( "value", mod.getValue() ) );
            item.add( AttributeModifier.replace( "class", new AbstractReadOnlyModel<String>()
            {
                private static final long serialVersionUID = 1L;

                @Override
                public String getObject()
                {
                    return ( item.getIndex() % 2 == 1 ) ? "even" : "odd";
                }
            } ));
        }
    };
    addOrReplace( view );
}
 
开发者ID:apache,项目名称:directory-fortress-commander,代码行数:30,代码来源:AuditModDetailPanel.java

示例10: populateDataViewItem

import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
@Override
protected void populateDataViewItem(Item<Process> item) {
    final Process entity = item.getModelObject();
    BookmarkablePageLink<Process> link = new BookmarkablePageLink<>("link",
            ProcessAddEditPage.class, ProcessAddEditPage.linkToEdit(entity));
    link.add(new Label("name", Model.of(entity.getName())).
            setRenderBodyOnly(true));
    item.add(link);

    item.add(new Label("description", Model.of(entity.getDescription())));
    item.add(new Label("startdate", Model.of(entity.getStartDate())));
    item.add(new Label("enddate", Model.of(entity.getEndDate())));

}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:15,代码来源:ProcessSearchResultsPanel.java

示例11: populateDataViewItem

import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
@Override
protected void populateDataViewItem(Item<QModel> item) {
    final QModel entity = item.getModelObject();
    BookmarkablePageLink<QModelViewPage> link = new BookmarkablePageLink<>("link",
    		QModelViewPage.class, QModelViewPage.forQModel(entity));
    link.add(new Label("name", Model.of(entity.getName()
            + " (" + entity.getNodeKey() + ")")).setRenderBodyOnly(true));
    item.add(link);

    item.add(new Label("description", Model.of(entity.getDescription())));
    

}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:14,代码来源:QModelSearchResultsPanel.java

示例12: populateDataViewItem

import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
@Override
protected void populateDataViewItem(Item<Product> item) {
    final Product entity = item.getModelObject();
    BookmarkablePageLink<Product> link = new BookmarkablePageLink<>("link", 
            ProductAddEditPage.class, ProductAddEditPage.linkToEdit(entity));
    link.add(new Label("name", Model.of(entity.getName())).setRenderBodyOnly(true));
    item.add(link);
    
    item.add(new Label("description", Model.of(entity.getDescription())));
    item.add(new Label("version", Model.of(entity.getVersion())));
    item.add(new Label("date", Model.of(entity.getReleaseDate())));
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:13,代码来源:ProductSearchResultsPanel.java

示例13: populateDataViewItem

import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
@Override
protected void populateDataViewItem(Item<Project> item) {
    // TODO add quality indicator icon!
    final Project entity = item.getModelObject();
    BookmarkablePageLink<ProjectViewPage> link = new BookmarkablePageLink<>("link",
            ProjectViewPage.class, ProjectViewPage.forProject(entity));
    link.add(new Label("name", Model.of(entity.getName()
            + " (" + entity.getNodeKey() + ")")).setRenderBodyOnly(true));
    item.add(link);

    item.add(new Label("startdate", Model.of(entity.getStartDate())));
    item.add(new Label("enddate", Model.of(entity.getEndDate())));
    item.add(new Label("progress", Model.of(entity.
            getElapsedVsRemainingWithPercentageString())));
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:16,代码来源:ProjectSearchResultsPanel.java

示例14: ViewGroupPage

import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
public ViewGroupPage(PageParameters param) {
    super(ListGroupsPage.class, param);

    final Long groupId = param.get("gid").toLong();

    //BACK
    add(new BookmarkablePageLink<ListGroupsPage>("back-to-groups",ListGroupsPage.class));

    //FILTER
    final Filter filter = new Filter();
    final Form<Filter> filtersForm = new Form<>("filter-form", new Model<>(filter));
    add(filtersForm);
    filtersForm.add(new TextField<>("action-name-substr", new PropertyModel<String>(filter, "actionNameSubstring")));

    //GROUP PROPERTIES
    final UIGroupForView curGroup = groupService.getGroupById(groupId);

    add(new Label("groupName", curGroup.getName()));
    add(new Label("groupSubsystem", curGroup.getSubsystemName()));


    // SORTABLE DATA PROVIDER

    String[] fieldName = { "groupId","groupName","subsystemName","actionId", "actionName" };
    final SortableDataProvider<UIActionForCheckboxForGroup, String> actionDataProvider = new IndexedSortableDataProvider<UIActionForCheckboxForGroup>(fieldName) {

        private static final long serialVersionUID = 1L;

        public Iterator<? extends UIActionForCheckboxForGroup> iterator(long first,
                long count) {

            List<UIActionForCheckboxForGroup> list = groupService.getAllGroupMappedActions(first, count,
                    getSortFieldIndex(), isAscending(), groupId, filter.getActionNameSubstring());
            return list.iterator();
        }

        public long size() {
            return groupService.getAllGroupMappedActionsCount(groupId, filter.getActionNameSubstring());
        }

    };


    // DATAVIEW
    final DataView<UIActionForCheckboxForGroup> actionDataView = new PagingDataView<UIActionForCheckboxForGroup>("dataView",actionDataProvider){
        private static final long serialVersionUID = 1L;

        @Override
        protected void populateItem(Item<UIActionForCheckboxForGroup> item) {
            final UIActionForCheckboxForGroup action = item.getModelObject();
            item.add(new Label("action-id",String.valueOf(action.getActionId())));
            item.add(new Label("action-name",action.getActionName()));
        }

    };

    add(actionDataView);
    add(new OrderByLink<>("order-by-ActionID", "actionId", actionDataProvider));
    add(new OrderByLink<>("order-by-ActionName", "actionName", actionDataProvider));

    add(new SuperflyPagingNavigator("paging-navigator", actionDataView));

    add(new BookmarkablePageLink("group-actions", ChangeGroupActionsPage.class, PageParametersBuilder.fromPair("gid", groupId)));

}
 
开发者ID:payneteasy,项目名称:superfly,代码行数:66,代码来源:ViewGroupPage.java

示例15: populateDataViewItem

import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
@Override
protected void populateDataViewItem(Item<Team> item) {
    final Team entity = item.getModelObject();
    BookmarkablePageLink<TeamEditPage> link = new BookmarkablePageLink<>("link", 
            TeamEditPage.class, TeamEditPage.linkToEdit(entity));
    link.add(new Label("name", Model.of(entity.getName())).setRenderBodyOnly(true));
    item.add(link);
    
    item.add(new Label("description", Model.of(entity.getDescription())));
    
   
    item.add(new Label("member", Model.of(entity.getAllUsers())));
    
    
    
  
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:18,代码来源:TeamSearchResultsPanel.java


注:本文中的org.apache.wicket.markup.repeater.Item.getModelObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。