當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。