本文整理汇总了Java中org.apache.wicket.request.Response.write方法的典型用法代码示例。如果您正苦于以下问题:Java Response.write方法的具体用法?Java Response.write怎么用?Java Response.write使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.wicket.request.Response
的用法示例。
在下文中一共展示了Response.write方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: afterRender
import org.apache.wicket.request.Response; //导入方法依赖的package包/类
@Override
public void afterRender(Component component) {
FormComponent<?> fc = (FormComponent<?>) component;
Response r = component.getResponse();
r.write("</span>");
if (fc.hasFeedbackMessage()) {
r.write("<span class=\"feedbackPanelTextField\">");
IFeedbackMessageFilter filter = new ComponentFeedbackMessageFilter(component);
for (FeedbackMessage message : fc.getFeedbackMessages().messages(filter)) {
r.write("<span class=\"feedbackPanel");
r.write(message.getLevelAsString().toUpperCase());
r.write("\">");
r.write(Strings.escapeMarkup(message.getMessage().toString()));
}
r.write("</span>");
}
}
示例2: afterRender
import org.apache.wicket.request.Response; //导入方法依赖的package包/类
@Override
public void afterRender(final Component component) {
super.afterRender(component);
final Response r = component.getResponse();
final String text = ResourceBundleLocator.getLabelModel(this.getClass(), "ajax.loading.text").getObject();
r.write("<span style=\"display:none;\" class=\"");
r.write(getSpanClass());
r.write("\" ");
r.write("id=\"");
r.write(getMarkupId());
r.write("\">");
r.write("<img src=\"");
r.write(getIndicatorUrl());
r.write("\" alt=\"\" class=\"spinner\"/>");
r.write("<span class=\"loading blink\">");
r.write(text);
r.write("</span>");
r.write("</span>");
}
示例3: onComponentTagBody
import org.apache.wicket.request.Response; //导入方法依赖的package包/类
@Override
public void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) {
super.onComponentTagBody(markupStream, openTag);
if (addFakeInputFields) {
final Response response = getResponse();
response.write("<input style=\"display:none\">\n" +
"<input type=\"password\" style=\"display:none\">");
}
}
示例4: renderChoice
import org.apache.wicket.request.Response; //导入方法依赖的package包/类
@Override
protected void renderChoice(ItemDefinition<?> object, Response response, String criteria) {
String textValue = getTextValue(object);
textValue = Strings.escapeMarkup(textValue).toString();
response.write(textValue);
}
示例5: beforeRender
import org.apache.wicket.request.Response; //导入方法依赖的package包/类
@Override
public void beforeRender(Component component) {
Response response = component.getResponse();
response.write("<!--");
if (StringUtils.hasText(condition)) {
response.write(
new StringBuilder("[if ").append(condition).append("]>").toString()
);
}
}
示例6: afterRender
import org.apache.wicket.request.Response; //导入方法依赖的package包/类
@Override
public void afterRender(Component component) {
Response response = component.getResponse();
if (StringUtils.hasText(condition)) {
response.write("<![endif]");
}
response.write("-->");
}
示例7: beforeRender
import org.apache.wicket.request.Response; //导入方法依赖的package包/类
public void beforeRender(Component component) {
FormComponent<?> fc = (FormComponent<?>) component;
Response r = component.getResponse();
String label = (fc.getLabel() != null) ? fc.getLabel().getObject(): null;
if (label != null) {
r.write("<span class=\"param\">");
r.write("<label for=\"");
r.write(fc.getMarkupId());
r.write("\"");
if (!fc.isValid()) {
r.write(" class=\"error\"");
}
r.write(" />");
r.write(Strings.escapeMarkup(label));
r.write("</label>");
r.write("</span>");
NotNull clazz;
try {
Field field = fc.getForm().getModelObject().getClass().getDeclaredField(fc.getInputName());
clazz = field.getAnnotation(NotNull.class);
} catch (NoSuchFieldException e) {
clazz = null;
}
if (clazz != null || fc.isRequired()) {
r.write("<span class=\"required\" title=\"");
r.write(fc.getString("portal.error.required.field.title"));
r.write("\">");
r.write(fc.getString("portal.required.field")+"</span>");
} else {
r.write("<span class=\"notrequired\"></span>");
}
r.write("<span class=\"value\">");
}
super.beforeRender(component);
}
示例8: appendHiddenInputForCsrf
import org.apache.wicket.request.Response; //导入方法依赖的package包/类
public static void appendHiddenInputForCsrf(Response resp) {
CsrfToken csrfToken = getCsrfToken();
if (csrfToken == null) {
return;
}
String parameterName = csrfToken.getParameterName();
String value = csrfToken.getToken();
resp.write("<input type=\"hidden\" name=\"" + parameterName + "\" value=\"" + value + "\"/>");
}
示例9: onComponentTagBody
import org.apache.wicket.request.Response; //导入方法依赖的package包/类
@Override
public void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) {
super.onComponentTagBody(markupStream, openTag);
Response resp = getResponse();
// add hidden input for CSRF
SecurityUtils.appendHiddenInputForCsrf(resp);
if (addFakeInputFields) {
resp.write("<input style=\"display:none\">\n<input type=\"password\" style=\"display:none\">");
}
}
示例10: renderChoice
import org.apache.wicket.request.Response; //导入方法依赖的package包/类
@Override
protected void renderChoice(ItemDefinition<?> object, Response response, String criteria) {
String textValue = getTextValue(object);
textValue = Strings.escapeMarkup(textValue).toString();
response.write(textValue);
}
示例11: afterRender
import org.apache.wicket.request.Response; //导入方法依赖的package包/类
@Override
public void afterRender(Component component) {
Response r = component.getResponse();
// Very important :
// z-index value must be higher than any other component to block the screen
// take care also of modal windows!
// a modal window has z-index=20001
// we use here a 99999 z-index
r.write("<span style=\"display:none;");
// r.write("position:absolute; left:1px; top:1px; margin:0px 0px 0px 0px; z-index:99999; width:100%; clear:none; height:100%; opacity:0.7; filter:alpha(opacity=50); ");
r.write("position:absolute; left:0px; top:0px; margin:0px 0px 0px 0px; z-index:99999; width:100%; clear:none; height:100%; ");
r.write("height:expression(document.body.scrollHeight>document.body.offsetHeight ? document.body.scrollHeight: document.body.offsetHeight + 'px'); \" class=\"");
r.write(getSpanClass());
r.write("\" ");
r.write("id=\"");
r.write(getMarkupId());
r.write("\"><table><tr><td align=\"center\">");
r.write("<span><img src=\"");
if (busyIndicatorUrl == null) {
r.write(getIndicatorUrl());
} else {
r.write(busyIndicatorUrl);
}
r.write("\" alt=\"\"/>");
r.write(" ");
r.write(busyIndicatorText);
r.write("</span></td></tr></table></span>");
}
示例12: onComponentTagBody
import org.apache.wicket.request.Response; //导入方法依赖的package包/类
@Override
public void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) {
final Response response = getResponse();
if (printParent) {
response.write("<a href=\"../\">../</a>\n");
} else if (items.isEmpty()) {
response.write("No items found.\n");
return;
}
for (BaseBrowsableItem item : items) {
String name = item.getName();
response.write("<a href=\"");
response.write(name);
if (item.isFolder()) {
response.write("/");
}
response.write("\">");
response.write(StringEscapeUtils.escapeXml(name));
if (item.isFolder()) {
response.write("/");
}
response.write("</a>");
if (item.isRemote()) {
response.write("->");
}
response.write(StringUtils.repeat(" ", columnSize - name.length()));
if (item.getLastModified() > 0) {
response.write(DATE_FORMAT.print(item.getLastModified()));
} else {
response.write(" -");
}
response.write(" ");
long size = item.getSize();
if (item.isFolder() || size <= 0) {
response.write(" -");
} else {
response.write(StorageUnit.toReadableString(size));
}
response.write("\n");
}
}
示例13: render
import org.apache.wicket.request.Response; //导入方法依赖的package包/类
@Override
public void render(final Response response) {
response.write("<meta http-equiv=\"" + key + "\" content=\"" + value + "\"/>");
response.write("\n");
}
示例14: render
import org.apache.wicket.request.Response; //导入方法依赖的package包/类
@Override
public void render(final String value, final Response response, final String criteria)
{
response.write(value);
}