本文整理匯總了Java中org.apache.wicket.markup.html.WebMarkupContainer.addOrReplace方法的典型用法代碼示例。如果您正苦於以下問題:Java WebMarkupContainer.addOrReplace方法的具體用法?Java WebMarkupContainer.addOrReplace怎麽用?Java WebMarkupContainer.addOrReplace使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.wicket.markup.html.WebMarkupContainer
的用法示例。
在下文中一共展示了WebMarkupContainer.addOrReplace方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: initLayout
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
private void initLayout(){
WebMarkupContainer policyRulesContainer = new WebMarkupContainer(ID_POLICY_RULES);
policyRulesContainer.setOutputMarkupId(true);
add(policyRulesContainer);
ListDataProvider<AssignmentEditorDto> provider = new ListDataProvider<AssignmentEditorDto>(this, getModel(), false);
BoxedTablePanel<AssignmentEditorDto> policyRulesTable = new BoxedTablePanel<AssignmentEditorDto>(ID_MAIN_POLICY_RULE_PANEL,
provider, initColumns(), UserProfileStorage.TableId.POLICY_RULES_TAB_TABLE,
(int) pageBase.getItemsPerPage(UserProfileStorage.TableId.POLICY_RULES_TAB_TABLE)){
private static final long serialVersionUID = 1L;
@Override
public int getItemsPerPage() {
return pageBase.getSessionStorage().getUserProfile().getTables().get(UserProfileStorage.TableId.ASSIGNMENTS_TAB_TABLE);
}
};
policyRulesTable.setOutputMarkupId(true);
// policyRulesTable.setCurrentPage(getPaging());
policyRulesContainer.addOrReplace(policyRulesTable);
}
示例2: addPrivilegesPanel
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
private void addPrivilegesPanel(WebMarkupContainer body){
privilegesNames = getPrivilegesNamesList();
ListView<String> privilegesListComponent = new ListView<String>(ID_PRIVILEGES_LIST, privilegesNames){
private static final long serialVersionUID = 1L;
@Override
protected void populateItem(ListItem<String> item) {
Label privilageNameLabel = new Label(ID_PRIVILEGE, item.getModel());
item.add(privilageNameLabel);
}
};
privilegesListComponent.setOutputMarkupId(true);
privilegesListComponent.add(new VisibleEnableBehaviour(){
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible(){
if (!UserDtoStatus.ADD.equals(getModelObject().getStatus())){
return true;
}
return false;
}
});
body.addOrReplace(privilegesListComponent);
}
示例3: addOrReplaceSearchPanel
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
private void addOrReplaceSearchPanel(WebMarkupContainer headerPanel) {
final Form searchForm = new Form(ID_SEARCH_FORM);
searchForm.add(new VisibleEnableBehaviour() {
public boolean isVisible() {
return !isCatalogOidEmpty()
&& !AssignmentViewType.USER_TYPE.equals( getRoleCatalogStorage().getViewType());
}
});
searchForm.setOutputMarkupId(true);
SearchPanel search = new SearchPanel(ID_SEARCH, (IModel) searchModel, false) {
private static final long serialVersionUID = 1L;
@Override
public void searchPerformed(ObjectQuery query, AjaxRequestTarget target) {
AssignmentCatalogPanel.this.searchPerformed(query, target);
}
};
searchForm.add(search);
headerPanel.addOrReplace(searchForm);
}
示例4: initObjectsPanel
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
private void initObjectsPanel(WebMarkupContainer objectsPanel){
MergeObjectDetailsPanel mergeObjectPanel = new MergeObjectDetailsPanel(ID_MERGE_OBJECT_DETAILS_PANEL,
mergeObjectModel.getObject(), type);
mergeObjectPanel.setOutputMarkupId(true);
objectsPanel.addOrReplace(mergeObjectPanel);
MergeObjectDetailsPanel mergeWithObjectPanel = new MergeObjectDetailsPanel(ID_MERGE_WITH_OBJECT_DETAILS_PANEL,
mergeWithObjectModel.getObject(), type);
mergeWithObjectPanel.setOutputMarkupId(true);
objectsPanel.addOrReplace(mergeWithObjectPanel);
mergeResultObject = getMergeObjectsResult();
WebMarkupContainer mergeResultPanelContainer = new WebMarkupContainer(ID_MERGE_RESULT_PANEL_CONTAINER);
mergeResultPanelContainer.setOutputMarkupId(true);
objectsPanel.addOrReplace(mergeResultPanelContainer);
mergeResultPanelContainer.addOrReplace(getMergeResultObjectPanel());
}
示例5: addOrReplaceEditor
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
private void addOrReplaceEditor(WebMarkupContainer inputAce) {
AceEditor editor = new AceEditor(ID_ACE_EDITOR, xmlEditorModel);
editor.setOutputMarkupId(true);
editor.setModeForDataLanguage(dataLanguage);
editor.add(new AjaxFormComponentUpdatingBehavior("blur") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
}
});
inputAce.addOrReplace(editor);
}
示例6: setBody
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
public void setBody(Popupable popupable){
setTitle(popupable.getTitle());
setInitialHeight(popupable.getHeight());
setInitialWidth(popupable.getWidth());
WebMarkupContainer content = (WebMarkupContainer) get(getContentId());
popupable.getComponent().setOutputMarkupId(true);
content.addOrReplace(popupable.getComponent());
}
示例7: initDeltasPanel
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
private void initDeltasPanel(WebMarkupContainer eventPanel){
List<ObjectDeltaOperationType> deltas = recordModel.getObject().getDelta();
RepeatingView deltaScene = new RepeatingView(ID_DELTA_LIST_PANEL);
for(ObjectDeltaOperationType deltaOp :deltas){
ObjectDeltaOperationPanel deltaPanel = new ObjectDeltaOperationPanel(deltaScene.newChildId(), Model.of(deltaOp), this);
deltaPanel.setOutputMarkupId(true);
deltaScene.add(deltaPanel);
}
eventPanel.addOrReplace(deltaScene);
}
示例8: addOrReplaceAssignmentsTable
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
private void addOrReplaceAssignmentsTable(WebMarkupContainer assignmentsContainer){
fillInRelationAssignmentsMap();
DropDownChoicePanel relation = WebComponentUtil.createEnumPanel(RelationTypes.class, ID_RELATION,
WebComponentUtil.createReadonlyModelFromEnum(RelationTypes.class), relationModel, this, false);
relation.getBaseFormComponent().add(new AjaxFormComponentUpdatingBehavior("change") {
private static final long serialVersionUID = 1L;
@Override
protected void onUpdate(AjaxRequestTarget target) {
relationModel.setObject((RelationTypes)relation.getBaseFormComponent().getConvertedInput());
addOrReplaceAssignmentsTable(getAssignmentsContainer());
target.add(AssignmentDataTablePanel.this.get(ID_ASSIGNMENTS).get(ID_ASSIGNMENTS_TABLE));
}
});
relation.setOutputMarkupId(true);
relation.setOutputMarkupPlaceholderTag(true);
assignmentsContainer.addOrReplace(relation);
AjaxButton showAllAssignmentsButton = new AjaxButton(ID_SHOW_ALL_ASSIGNMENTS_BUTTON,
createStringResource("AssignmentTablePanel.menu.showAllAssignments")) {
@Override
public void onClick(AjaxRequestTarget ajaxRequestTarget) {
showAllAssignments(ajaxRequestTarget);
}
};
assignmentsContainer.addOrReplace(showAllAssignmentsButton);
ListDataProvider<AssignmentEditorDto> assignmentsProvider = new ListDataProvider<AssignmentEditorDto>(this,
Model.ofList(relationAssignmentsMap.get(relationModel.getObject())), false){
private static final long serialVersionUID = 1L;
@Override
protected void saveProviderPaging(ObjectQuery query, ObjectPaging paging) {
getAssignmentsStorage().setPaging(paging);
}
};
BoxedTablePanel<AssignmentEditorDto> assignmentTable = new BoxedTablePanel<AssignmentEditorDto>(ID_ASSIGNMENTS_TABLE,
assignmentsProvider, initColumns(), UserProfileStorage.TableId.ASSIGNMENTS_TAB_TABLE,
(int) pageBase.getItemsPerPage(UserProfileStorage.TableId.ASSIGNMENTS_TAB_TABLE)){
private static final long serialVersionUID = 1L;
@Override
protected Item<AssignmentEditorDto> customizeNewRowItem(Item<AssignmentEditorDto> item, IModel<AssignmentEditorDto> model) {
item.add(AttributeModifier.append("class", AssignmentsUtil.createAssignmentStatusClassModel(model)));
return item;
}
@Override
public int getItemsPerPage() {
return pageBase.getSessionStorage().getUserProfile().getTables().get(UserProfileStorage.TableId.ASSIGNMENTS_TAB_TABLE);
}
};
assignmentTable.setOutputMarkupId(true);
assignmentTable.setCurrentPage(getAssignmentsStorage().getPaging());
assignmentsContainer.addOrReplace(assignmentTable);
}
示例9: initAuditLogHistoryPanel
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
private void initAuditLogHistoryPanel(WebMarkupContainer eventPanel){
AuditEventRecordProvider provider = new AuditEventRecordProvider(PageAuditLogDetails.this){
private static final long serialVersionUID = 1L;
public Map<String, Object> getParameters() {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put(TASK_IDENTIFIER_PARAMETER, recordModel.getObject().getTaskIdentifier());
return parameters;
}
};
BoxedTablePanel<AuditEventRecordType> table = new BoxedTablePanel<AuditEventRecordType>(
ID_HISTORY_PANEL, provider, initColumns(), UserProfileStorage.TableId.TASK_EVENTS_TABLE, TASK_EVENTS_TABLE_SIZE) {
@Override
protected Item<AuditEventRecordType> customizeNewRowItem(final Item<AuditEventRecordType> item,
final IModel<AuditEventRecordType> rowModel) {
if (rowModel.getObject().getTimestamp().equals(recordModel.getObject().getTimestamp())){
item.add(new AttributeAppender("style", "background-color: #eee; border-color: #d6d6d6; color: #000"));
}
item.add(new AjaxEventBehavior("click") {
private static final long serialVersionUID = 1L;
@Override
protected void onEvent(AjaxRequestTarget target) {
PageAuditLogDetails.this.rowItemClickPerformed(target, item, rowModel);
}
});
return item;
}
};
table.getFooterMenu().setVisible(false);
table.getFooterCountLabel().setVisible(false);
//TODO hidden temporarily
table.setVisible(false);
table.setOutputMarkupId(true);
table.setAdditionalBoxCssClasses("without-box-header-top-border");
eventPanel.addOrReplace(table);
}