本文整理汇总了Java中org.apache.wicket.util.template.PackageTextTemplate类的典型用法代码示例。如果您正苦于以下问题:Java PackageTextTemplate类的具体用法?Java PackageTextTemplate怎么用?Java PackageTextTemplate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PackageTextTemplate类属于org.apache.wicket.util.template包,在下文中一共展示了PackageTextTemplate类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: renderHead
import org.apache.wicket.util.template.PackageTextTemplate; //导入依赖的package包/类
@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
response.render(CssHeaderItem.forReference(STYLE_CSS));
response.render(CssHeaderItem.forReference(DIAGRAM_CSS));
response.render(CssHeaderItem.forReference(BPMN_CSS));
response.render(JavaScriptHeaderItem.forReference(BPMN_MODELER_JS));
Map<String, Object> params = new HashMap<String, Object>();
params.put("componentId", getMarkupId());
params.put("xmlComponentId", xml.getMarkupId());
params.put("lang", getLocale().getLanguage());
TextTemplate template = new PackageTextTemplate(BpmnModeler.class, "bpmnmodeler.tmpl.js");
response.render(OnDomReadyHeaderItem.forScript(template.asString(params)));
}
开发者ID:OrienteerBAP,项目名称:wicket-bpmn-io,代码行数:18,代码来源:BpmnModeler.java
示例2: onInitialize
import org.apache.wicket.util.template.PackageTextTemplate; //导入依赖的package包/类
/**
* @see org.apache.wicket.Component#onInitialize()
*/
@Override
protected void onInitialize()
{
super.onInitialize();
final Form<Void> colorForm = new Form<Void>("colorForm");
add(colorForm);
final TextField<String> colorField = new TextField<String>("color", new PropertyModel<String>(this, "selectedColor"));
colorField.add(new AjaxFormComponentUpdatingBehavior("onChange") {
private static final long serialVersionUID = 1L;
/**
* @see org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior#onUpdate(org.apache.wicket.ajax.AjaxRequestTarget)
*/
@Override
protected void onUpdate(final AjaxRequestTarget target)
{
onColorUpdate(selectedColor);
}
});
colorForm.add(colorField);
// colorpicker js
final JavaScriptTemplate jsTemplate = new JavaScriptTemplate(new PackageTextTemplate(ColorPickerPanel.class, "ColorPicker.js.template"));
final String javaScript = jsTemplate.asString(new MicroMap<String, String>("markupId", colorField.getMarkupId()));
add(new Label("template", javaScript).setEscapeModelStrings(false));
}
开发者ID:micromata,项目名称:projectforge-webapp,代码行数:29,代码来源:ColorPickerPanel.java
示例3: renderHead
import org.apache.wicket.util.template.PackageTextTemplate; //导入依赖的package包/类
@Override
public void renderHead(Component component, IHeaderResponse response) {
super.renderHead(component, response);
response.render(CssHeaderItem.forReference(new PackageResourceReference(SlidebarBehavior.class, "slidebars.css")));
response.render(CssHeaderItem.forUrl("css/slidebar.css"));
response.render(JavaScriptHeaderItem.forReference(new PackageResourceReference(SlidebarBehavior.class, "slidebars.js")));
Map<String, String> vars = new HashMap<String, String>();
// vars.put("siteClose", "true");
PackageTextTemplate template = new PackageTextTemplate(SlidebarBehavior.class, "slidebar-behavior.template.js");
// template.interpolate(vars);
response.render(OnDomReadyHeaderItem.forScript(template.getString()));
}
开发者ID:nextreports,项目名称:nextreports-server,代码行数:17,代码来源:SlidebarBehavior.java
示例4: renderHead
import org.apache.wicket.util.template.PackageTextTemplate; //导入依赖的package包/类
@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
response.render(JavaScriptHeaderItem.forReference(BPMN_VIEWER_JS));
Map<String, Object> params = new HashMap<String, Object>();
params.put("componentId", getMarkupId());
params.put("xml", escapeAndWrapAsJavaScriptString(getModelObject()));
TextTemplate template = new PackageTextTemplate(BpmnViewer.class, "bpmnviewer.tmpl.js");
response.render(OnDomReadyHeaderItem.forScript(template.asString(params)));
}
开发者ID:OrienteerBAP,项目名称:wicket-bpmn-io,代码行数:12,代码来源:BpmnViewer.java
示例5: renderHead
import org.apache.wicket.util.template.PackageTextTemplate; //导入依赖的package包/类
@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
response.render(CssHeaderItem.forReference(STYLE_CSS));
response.render(CssHeaderItem.forReference(DIAGRAM_CSS));
response.render(CssHeaderItem.forReference(CMMN_CSS));
response.render(JavaScriptHeaderItem.forReference(CMMN_MODELER_JS));
Map<String, Object> params = new HashMap<String, Object>();
params.put("componentId", getMarkupId());
params.put("xml", escapeAndWrapAsJavaScriptString(getModelObject()));
TextTemplate template = new PackageTextTemplate(CmmnModeler.class, "cmmnmodeler.tmpl.js");
response.render(OnDomReadyHeaderItem.forScript(template.asString(params)));
}
开发者ID:OrienteerBAP,项目名称:wicket-bpmn-io,代码行数:15,代码来源:CmmnModeler.java
示例6: renderHead
import org.apache.wicket.util.template.PackageTextTemplate; //导入依赖的package包/类
@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
response.render(JavaScriptHeaderItem.forReference(CMMN_VIEWER_JS));
Map<String, Object> params = new HashMap<String, Object>();
params.put("componentId", getMarkupId());
params.put("xml", escapeAndWrapAsJavaScriptString(getModelObject()));
TextTemplate template = new PackageTextTemplate(CmmnViewer.class, "cmmnviewer.tmpl.js");
response.render(OnDomReadyHeaderItem.forScript(template.asString(params)));
}
开发者ID:OrienteerBAP,项目名称:wicket-bpmn-io,代码行数:12,代码来源:CmmnViewer.java
示例7: renderHead
import org.apache.wicket.util.template.PackageTextTemplate; //导入依赖的package包/类
@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
response.render(JavaScriptHeaderItem.forReference(DMN_MODELER_JS));
response.render(CssReferenceHeaderItem.forReference(DMN_CSS));
response.render(CssReferenceHeaderItem.forReference(STYLE_CSS));
Map<String, Object> params = new HashMap<String, Object>();
params.put("componentId", getMarkupId());
params.put("xml", escapeAndWrapAsJavaScriptString(getModelObject()));
TextTemplate template = new PackageTextTemplate(DmnModeler.class, "dmnmodeler.tmpl.js");
response.render(OnDomReadyHeaderItem.forScript(template.asString(params)));
}
开发者ID:OrienteerBAP,项目名称:wicket-bpmn-io,代码行数:14,代码来源:DmnModeler.java
示例8: renderHead
import org.apache.wicket.util.template.PackageTextTemplate; //导入依赖的package包/类
@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
response.render(CssReferenceHeaderItem.forReference(DMN_CSS));
response.render(JavaScriptHeaderItem.forReference(DMN_VIEWER_JS));
Map<String, Object> params = new HashMap<String, Object>();
params.put("componentId", getMarkupId());
params.put("xml", escapeAndWrapAsJavaScriptString(getModelObject()));
TextTemplate template = new PackageTextTemplate(BpmnViewer.class, "dmnviewer.tmpl.js");
response.render(OnDomReadyHeaderItem.forScript(template.asString(params)));
}
开发者ID:OrienteerBAP,项目名称:wicket-bpmn-io,代码行数:13,代码来源:DmnViewer.java
示例9: createJsonEditor
import org.apache.wicket.util.template.PackageTextTemplate; //导入依赖的package包/类
private void createJsonEditor(DocumentEditorData editorData) {
// render json-editor script
Map<String, Object> map = new HashMap<>();
map.put("schema", editorData.getSchema());
// editor for document creation
if (editorData.getUseCase() == EditorUseCase.CREATE) {
map.put("startval", "{}");
map.put("readonly", false);
// document update / show
} else {
map.put("startval", editorData.getDocument());
map.put("usecase", EditorUseCase.UPDATE);
map.put("readonly", editorData.isReadonly());
try {
String jsonMap = new ObjectMapper().writeValueAsString(editorData.getDiffMap());
map.put("diffData", jsonMap);
} catch (JsonProcessingException ex) {
logger.error(ex);
}
}
ptt = new PackageTextTemplate(DocumentCreate.class, "../../../../../../editor.js");
labelModel = Model.of(ptt.asString(map));
myScript = new Label("jsonEditor", labelModel);
myScript.setOutputMarkupId(true);
myScript.setEscapeModelStrings(false);
this.add(myScript);
}
开发者ID:martin-kanis,项目名称:relax-dms,代码行数:33,代码来源:DocumentEditor.java
示例10: readInterpolatedString
import org.apache.wicket.util.template.PackageTextTemplate; //导入依赖的package包/类
private String readInterpolatedString(String path) {
try {
PackageTextTemplate resource = new PackageTextTemplate(scope, path);
return PropertyVariableInterpolator.interpolate(resource.getString(), this);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
开发者ID:alancnet,项目名称:artifactory,代码行数:9,代码来源:ResourcePackage.java
示例11: renderHead
import org.apache.wicket.util.template.PackageTextTemplate; //导入依赖的package包/类
@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
CharSequence script = sortableAjaxBehavior.getCallbackFunctionBody();
Map<String, String> vars = new HashMap<>();
vars.put("component", get("columnContainer").getMarkupId());
vars.put("stopBehavior", script.toString());
PackageTextTemplate template = new PackageTextTemplate(DashboardColumnPanel.class, "res/sort-behavior.template.js");
template.interpolate(vars);
response.render(OnDomReadyHeaderItem.forScript(template.getString()));
}
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:16,代码来源:DashboardColumnPanel.java
示例12: getTemplate
import org.apache.wicket.util.template.PackageTextTemplate; //导入依赖的package包/类
private static TextTemplate getTemplate() {
return new PackageTextTemplate(ZeroClipboardBehavior.class, ZERO_CLIPBOARD_LINK_JS);
}
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:4,代码来源:ZeroClipboardBehavior.java
注:本文中的org.apache.wicket.util.template.PackageTextTemplate类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论