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


Java WebMarkupContainer.get方法代码示例

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


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

示例1: getPropertyEditorsAtRow

import org.apache.wicket.markup.html.WebMarkupContainer; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private List<PropertyEditor<Serializable>> getPropertyEditorsAtRow(int index) {
	WebMarkupContainer table = (WebMarkupContainer) get("listEditor");
	RepeatingView rows = (RepeatingView) table.get("elements");

	int currentIndex = 0;
	Iterator<Component> it = rows.iterator();
	Component row = it.next();
	while (currentIndex++ < index) {
		row = it.next();
	}
	
	List<PropertyEditor<Serializable>> propertyEditors = new ArrayList<>();
	RepeatingView columns = (RepeatingView) row.get("properties");
	for (Component column: columns) {
		propertyEditors.add((PropertyEditor<Serializable>) column.get("propertyEditor"));
	}
	
	return propertyEditors;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:21,代码来源:ConcreteListPropertyEditor.java

示例2: AsyncDashboardPanel

import org.apache.wicket.markup.html.WebMarkupContainer; //导入方法依赖的package包/类
public AsyncDashboardPanel(String id, IModel<String> title, String icon, IModel<V> callableParameterModel,
                           Duration durationSecs, String boxCssClasses, boolean noPadding) {
    super(id, callableParameterModel, durationSecs);
    
    initLayout(noPadding);

    WebMarkupContainer dashboardTitle = (WebMarkupContainer) get(
            createComponentPath(ID_DASHBOARD_PARENT, ID_DASHBOARD_TITLE));

    Label label = (Label) dashboardTitle.get(ID_TITLE);
    label.setDefaultModel(title);

    if (boxCssClasses == null) {
    	boxCssClasses = GuiStyleConstants.CLASS_BOX_DEFAULT;
    }
    Component dashboardParent = get(ID_DASHBOARD_PARENT);
    dashboardParent.add(new AttributeAppender("class", " " + boxCssClasses));

    WebMarkupContainer iconI = new WebMarkupContainer(ID_ICON);
    iconI.add(AttributeModifier.replace("class", icon));
    dashboardTitle.add(iconI);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:23,代码来源:AsyncDashboardPanel.java

示例3: newActivityRow

import org.apache.wicket.markup.html.WebMarkupContainer; //导入方法依赖的package包/类
private Component newActivityRow(String id, PullRequestActivity activity) {
	WebMarkupContainer row = new WebMarkupContainer(id, Model.of(activity)) {

		@Override
		public void onEvent(IEvent<?> event) {
			super.onEvent(event);
			
			if (event.getPayload() instanceof RequestCommentDeleted) {
				RequestCommentDeleted commentRemoved = (RequestCommentDeleted) event.getPayload();
				remove();
				commentRemoved.getHandler().appendJavaScript(String.format("$('#%s').remove();", getMarkupId()));
			} 
		}
		
	};
	row.setOutputMarkupId(true);
	String anchor = activity.getAnchor();
	if (anchor != null)
		row.setMarkupId(anchor);
	
	if (row.get("content") == null) 
		row.add(activity.render("content"));
	
	WebMarkupContainer avatarColumn = new WebMarkupContainer("avatar");
	row.add(avatarColumn);
	
	if (activity instanceof OpenedActivity) {
		row.add(AttributeAppender.append("class", " discussion"));
		PullRequest request = ((OpenedActivity)activity).getRequest();
		avatarColumn.add(new AvatarLink("avatar", 
				User.getForDisplay(request.getSubmitter(), request.getSubmitterName())));
	} else if (activity instanceof CommentedActivity) {
		row.add(AttributeAppender.append("class", " discussion"));
		PullRequestComment comment = ((CommentedActivity)activity).getComment();
		avatarColumn.add(new AvatarLink("avatar", User.getForDisplay(comment.getUser(), comment.getUserName())));
	} else {
		row.add(AttributeAppender.append("class", " non-discussion"));
		avatarColumn.add(new WebMarkupContainer("avatar"));
	}
	
	if (activity instanceof UpdatedActivity)
		row.add(AttributeAppender.append("class", " update"));
	else
		row.add(AttributeAppender.append("class", " non-update"));

	return row;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:48,代码来源:RequestOverviewPage.java


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