本文整理了Java中org.apache.wicket.markup.html.basic.Label.getMarkupId()
方法的一些代码示例,展示了Label.getMarkupId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.getMarkupId()
方法的具体详情如下:
包路径:org.apache.wicket.markup.html.basic.Label
类名称:Label
方法名:getMarkupId
暂无
代码示例来源:origin: com.googlecode.wicket-jquery-ui/jquery-ui-core
@Override
protected String $() {
StringBuilder statements = new StringBuilder();
statements.append("jQuery('#").append(Slider.this.input.getMarkupId()).append("').on('change', function() { ");
statements.append("jQuery('#").append(Slider.this.label.getMarkupId()).append("').slider('value', jQuery(this).val()); "); //change the slider value (+slide)
statements.append("} );");
return String.format("jQuery(function() { %s });", statements);
}
};
代码示例来源:origin: com.googlecode.wicket-jquery-ui/jquery-ui-core
@Override
protected String $() {
StringBuilder statements = new StringBuilder();
statements.append("jQuery('#").append(lower.getMarkupId()).append("').on('change', function() { ");
statements.append("jQuery('#").append(label.getMarkupId()).append("').slider('values', 0, jQuery(this).val()); "); //change the slider value (+slide)
statements.append("} );");
return String.format("jQuery(function() { %s });", statements);
}
};
代码示例来源:origin: micromata/projectforge
/**
* @see org.projectforge.web.wicket.flowlayout.ComponentWrapperPanel#getComponentOutputId()
*/
@Override
public String getComponentOutputId()
{
projektAsStringLabel.setOutputMarkupId(true);
return projektAsStringLabel.getMarkupId();
}
代码示例来源:origin: com.googlecode.wicket-jquery-ui/jquery-ui-core
@Override
protected String $() {
StringBuilder statements = new StringBuilder();
statements.append("jQuery('#").append(upper.getMarkupId()).append("').on('change', function() { ");
statements.append("jQuery('#").append(label.getMarkupId()).append("').slider('values', 1, jQuery(this).val()); "); //change the slider value (+slide)
statements.append("} );");
return String.format("jQuery(function() { %s });", statements);
}
};
代码示例来源:origin: sebfz1/wicket-jquery-ui
@Override
protected String $()
{
StringBuilder statements = new StringBuilder();
statements.append("jQuery('#").append(upper.getMarkupId()).append("').on('change', function() { ");
statements.append(" jQuery('#").append(label.getMarkupId()).append("').slider('values', 1, jQuery(this).val()); "); // change the slider value (+slide)
statements.append("});");
return statements.toString();
}
};
代码示例来源:origin: sebfz1/wicket-jquery-ui
@Override
protected String $() {
StringBuilder statements = new StringBuilder();
statements.append("jQuery('#").append(Slider.this.input.getMarkupId()).append("').on('change', function() { ");
statements.append(" jQuery('#").append(Slider.this.label.getMarkupId()).append("').slider('value', jQuery(this).val()); "); //change the slider value (+slide)
statements.append("});");
return statements.toString();
}
};
代码示例来源:origin: sebfz1/wicket-jquery-ui
@Override
protected String $()
{
StringBuilder statements = new StringBuilder();
statements.append("jQuery('#").append(lower.getMarkupId()).append("').on('change', function() { ");
statements.append(" jQuery('#").append(label.getMarkupId()).append("').slider('values', 0, jQuery(this).val()); "); // change the slider value (+slide)
statements.append("});");
return statements.toString();
}
};
代码示例来源:origin: de.tudarmstadt.ukp.inception.app/inception-html-editor
private void create(AjaxRequestTarget aTarget, String payload)
throws JsonParseException, JsonMappingException, IOException
{
Annotation anno = JSONUtil.getObjectMapper().readValue(payload,
Annotation.class);
if (anno.getRanges().isEmpty()) {
// Spurious creation event that is to be ignored.
return;
}
String json = toJson(anno);
// Since we cannot pass the JSON directly to Brat, we attach it to the HTML
// element into which AnnotatorJS governs. In our modified annotator-full.js, we pick it
// up from there and then pass it on to AnnotatorJS to do the rendering.
aTarget.prependJavaScript("Wicket.$('" + vis.getMarkupId() + "').temp = " + json + ";");
}
代码示例来源:origin: inception-project/inception
private void create(AjaxRequestTarget aTarget, String payload)
throws JsonParseException, JsonMappingException, IOException
{
Annotation anno = JSONUtil.getObjectMapper().readValue(payload,
Annotation.class);
if (anno.getRanges().isEmpty()) {
// Spurious creation event that is to be ignored.
return;
}
String json = toJson(anno);
// Since we cannot pass the JSON directly to Brat, we attach it to the HTML
// element into which AnnotatorJS governs. In our modified annotator-full.js, we pick it
// up from there and then pass it on to AnnotatorJS to do the rendering.
aTarget.prependJavaScript("Wicket.$('" + vis.getMarkupId() + "').temp = " + json + ";");
}
代码示例来源:origin: org.opensingular/form-wicket
@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
try (PackageTextTemplate packageTextTemplate = new PackageTextTemplate(getClass(), "PortletRichTextPanel.js")) {
final Map<String, String> params = new HashMap<>();
params.put("label", (String) label.getDefaultModel().getObject());
params.put("htmlContainer", htmlContent.getMarkupId());
params.put("hiddenInput", hiddenInput.getMarkupId());
params.put("hash", hash);
params.put("html", HTML_NEW_TAB);
packageTextTemplate.interpolate(params);
response.render(JavaScriptHeaderItem.forScript(packageTextTemplate.getString(), hash));
} catch (IOException e) {
getLogger().error(e.getMessage(), e);
}
}
代码示例来源:origin: org.opensingular/singular-form-wicket
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.put("onclick", "window.open('" + getURL() + "', '_blank" + htmlContent.getMarkupId() + "');");
}
代码示例来源:origin: com.googlecode.wicket-jquery-ui/jquery-ui-core
/**
* Constructor
* @param id the markup id
* @param model the {@link IModel}
* @param label {@link Label} on which the current slide value will be displayed
*/
public AbstractSlider(String id, IModel<T> model, Label label)
{
super(id, model);
label.setDefaultModel(model);
label.setOutputMarkupId(true);
this.setLabelId(label.getMarkupId());
}
代码示例来源:origin: sebfz1/wicket-jquery-ui
/**
* Constructor
*
* @param id the markup id
* @param model the {@link IModel}
* @param label {@link Label} on which the current slide value will be displayed
*/
public AbstractSlider(String id, IModel<T> model, Label label)
{
super(id, model);
label.setDefaultModel(model);
label.setOutputMarkupId(true);
this.setLabelId(label.getMarkupId());
}
代码示例来源:origin: org.wicketstuff/push-core
protected void appendHTML(final AjaxRequestTarget target, final Label component,
final String html)
{
if (html == null)
return;
// update the component's model object for the case when the page is refreshed using F5
component.setEscapeModelStrings(false);
final IModel<?> model = component.getDefaultModel();
if (model == null)
component.setDefaultModelObject(html);
else
component.setDefaultModelObject(model.toString() + html);
// escape backslashes for JavaScript
final String escapedHTML = html.replaceAll("\\\\", "\");
target.appendJavascript("" + //
"var target = document.getElementById('" + component.getMarkupId() + "');" + //
"target.innerHTML += '" + escapedHTML + "';" + //
"target.scrollTop = target.scrollHeight" //
);
}
}
代码示例来源:origin: org.wicketstuff/wicketstuff-push-core
protected void appendHTML(final AjaxRequestTarget target, final Label component,
final String html)
{
Args.notNull(target, "target");
Args.notNull(component, "component");
if (html == null)
return;
// update the component's model object for the case when the page is refreshed using F5
component.setEscapeModelStrings(false);
final IModel<?> model = component.getDefaultModel();
component.setDefaultModelObject(model == null || model.getObject() == null ? html
: model.getObject() + html);
// escape backslashes for JavaScript
final String escapedHTML = html.replaceAll("\\\\", "\");
target.appendJavaScript("" + //
"var target = document.getElementById('" + component.getMarkupId() + "');" + //
"target.innerHTML += '" + escapedHTML + "';" + //
"target.scrollTop = target.scrollHeight" //
);
}
}
代码示例来源:origin: com.norconex.commons/norconex-commons-wicket
protected Component createHeaderComponent(String id) {
BootstrapModalDefaultHeader header =
new BootstrapModalDefaultHeader(id, title);
getBorder().add(new AttributeModifier(
"aria-labelledby", header.getTitleLabel().getMarkupId()));
return header;
}
protected abstract Component createBodyComponent(String id);
代码示例来源:origin: org.opensingular/singular-form-wicket
@Override
public void onClick() {
throw new RestartResponseException(new RichTextNewTabPage(label.getDefaultModelObject().toString(),
isReadOnlyMode(),
PortletRichTextPanel.this.ctx.getViewSupplier(SViewByRichTextNewTab.class),
hiddenInput, htmlContent.getMarkupId()));
}
代码示例来源:origin: de.alpharogroup/jaulp.wicket.components
/**
* Instantiates a new {@link LabeledLabelPanel}.
*
* @param id
* the id
* @param model
* the model
* @param labelModel
* the label model
*/
public LabeledLabelPanel(final String id, final IModel<T> model, final IModel<String> labelModel)
{
super(id, model);
setOutputMarkupId(true);
add(viewableLabel = newViewableLabel("viewableLabel", model));
final String markupId = viewableLabel.getMarkupId();
add(label = newLabel("label", markupId, labelModel));
}
代码示例来源:origin: de.alpharogroup/jaulp-wicket-components
/**
* Instantiates a new {@link LabeledLabelPanel}.
*
* @param id
* the id
* @param model
* the model
* @param labelModel
* the label model
*/
public LabeledLabelPanel(final String id, final IModel<T> model,
final IModel<String> labelModel)
{
super(id, model);
setOutputMarkupId(true);
add(viewableLabel = newViewableLabel("viewableLabel", model));
final String markupId = viewableLabel.getMarkupId();
add(label = newLabel("label", markupId, labelModel));
}
代码示例来源:origin: de.tudarmstadt.ukp.inception.app/inception-html-editor
aTarget.prependJavaScript("Wicket.$('" + vis.getMarkupId() + "').temp = " + json + ";");
内容来源于网络,如有侵权,请联系作者删除!