本文整理匯總了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;
}
示例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);
}
示例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;
}