當前位置: 首頁>>代碼示例>>Java>>正文


Java WebMarkupContainer.addOrReplace方法代碼示例

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

    }
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:23,代碼來源:PolicyRulesPanel.java

示例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);
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:26,代碼來源:DelegationEditorPanel.java

示例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);
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:22,代碼來源:AssignmentCatalogPanel.java

示例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());
    }
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:20,代碼來源:MergeObjectsPanel.java

示例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);
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:12,代碼來源:PageImportObject.java

示例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());
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:9,代碼來源:MainPopupDialog.java

示例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);

}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:15,代碼來源:PageAuditLogDetails.java

示例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);

}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:60,代碼來源:AssignmentDataTablePanel.java

示例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);

}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:44,代碼來源:PageAuditLogDetails.java


注:本文中的org.apache.wicket.markup.html.WebMarkupContainer.addOrReplace方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。