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


Java Label.setEscapeModelStrings方法代碼示例

本文整理匯總了Java中org.apache.wicket.markup.html.basic.Label.setEscapeModelStrings方法的典型用法代碼示例。如果您正苦於以下問題:Java Label.setEscapeModelStrings方法的具體用法?Java Label.setEscapeModelStrings怎麽用?Java Label.setEscapeModelStrings使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.wicket.markup.html.basic.Label的用法示例。


在下文中一共展示了Label.setEscapeModelStrings方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initLayout

import org.apache.wicket.markup.html.basic.Label; //導入方法依賴的package包/類
public void initLayout(final String messageKey){
    WebMarkupContainer content = new WebMarkupContainer(ID_CONTENT);
    add(content);

    Label helpLabel = new Label(ID_HELP, new AbstractReadOnlyModel<String>() {

        @Override
        public String getObject() {
            return getString(messageKey);
        }
    });
    helpLabel.setEscapeModelStrings(false);
    content.add(helpLabel);

    AjaxLink ok = new AjaxLink(ID_BUTTON_OK) {

        @Override
        public void onClick(AjaxRequestTarget target) {
            closePerformed(target);
        }
    };
    content.add(ok);
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:24,代碼來源:HelpInfoPanel.java

示例2: initLayout

import org.apache.wicket.markup.html.basic.Label; //導入方法依賴的package包/類
public void initLayout(WebMarkupContainer content){
    Label helpLabel = new Label(ID_HELP, new AbstractReadOnlyModel<String>() {

        @Override
        public String getObject() {
            return getString(determineHelpKey());
        }
    });
    helpLabel.setEscapeModelStrings(false);
    content.add(helpLabel);

    AjaxLink ok = new AjaxLink(ID_BUTTON_OK) {

        @Override
        public void onClick(AjaxRequestTarget target) {
            closePerformed(target);
        }
    };
    content.add(ok);
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:21,代碼來源:WizardHelpDialog.java

示例3: initLayout

import org.apache.wicket.markup.html.basic.Label; //導入方法依賴的package包/類
private void initLayout() {
	Label titleLabel = new Label(ID_TITLE, new PropertyModel<>(getModel(), InformationType.F_TITLE.getLocalPart()));
	titleLabel.add(new VisibleBehaviour(() -> getModelObject().getTitle() != null));
	add(titleLabel);

	ListView<InformationPartType> list = new ListView<InformationPartType>(ID_PARTS,
			new PropertyModel<>(getModel(), InformationType.F_PART.getLocalPart())) {
		@Override
		protected void populateItem(ListItem<InformationPartType> item) {
			InformationPartType part = item.getModelObject();
			Label label = new Label(ID_PART, part.getText());
			if (Boolean.TRUE.equals(part.isHasMarkup())) {
				label.setEscapeModelStrings(false);
			}
			item.add(label);
		}
	};
	add(list);
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:20,代碼來源:InformationPanel.java

示例4: createValueLabel

import org.apache.wicket.markup.html.basic.Label; //導入方法依賴的package包/類
private Component createValueLabel(String id, final IModel<String> facetNameModel, final IModel<String> valueModel) {
    final String fieldName = facetNameModel.getObject();

    if (FacetConstants.FIELD_LANGUAGE_CODE.equals(facetNameModel.getObject())) {
        return new LanguageInfoLink(id, valueModel, facetNameModel);
    } else if (SMART_LINK_FIELDS.contains(fieldName)) {
        // create label that generates links
        return new SmartLinkFieldValueLabel(id, new HandleLinkModel(valueModel), facetNameModel);
    } else {
        // add a label for the facet value
        final Label fieldLabel = new FieldValueLabel(id, valueModel, facetNameModel);

        // some selected fields may have HTML that needs to be preserved...
        fieldLabel.setEscapeModelStrings(!UNESCAPED_VALUE_FIELDS.contains(fieldName));
        return fieldLabel;
    }
}
 
開發者ID:acdh-oeaw,項目名稱:vlo-curation,代碼行數:18,代碼來源:FieldsTablePanel.java


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