当前位置: 首页>>代码示例>>Java>>正文


Java Response.write方法代码示例

本文整理汇总了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>");
    }
}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:23,代码来源:FieldFeedbackDecorator.java

示例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>");
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:22,代码来源:AjaxIndicatorAppender.java

示例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\">");
    }
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:11,代码来源:Form.java

示例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);
	
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:8,代码来源:AutoCompleteItemDefinitionRenderer.java

示例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()
		);
	}
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:11,代码来源:CommentOutModifier.java

示例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("-->");
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:9,代码来源:CommentOutModifier.java

示例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);
}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:41,代码来源:FieldFeedbackDecorator.java

示例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 + "\"/>");
}
 
开发者ID:Evolveum,项目名称:midpoint,代码行数:12,代码来源:SecurityUtils.java

示例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\">");
    }
}
 
开发者ID:Evolveum,项目名称:midpoint,代码行数:14,代码来源:Form.java

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

}
 
开发者ID:Evolveum,项目名称:midpoint,代码行数:8,代码来源:AutoCompleteItemDefinitionRenderer.java

示例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("&nbsp;");
        r.write(busyIndicatorText);
        r.write("</span></td></tr></table></span>");
    }
 
开发者ID:nextreports,项目名称:nextreports-server,代码行数:31,代码来源:AjaxBusyIndicator.java

示例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");
        }
    }
 
开发者ID:alancnet,项目名称:artifactory,代码行数:45,代码来源:ArtifactListPage.java

示例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");
}
 
开发者ID:apache,项目名称:syncope,代码行数:6,代码来源:MetaHeaderItem.java

示例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);
}
 
开发者ID:micromata,项目名称:projectforge-webapp,代码行数:6,代码来源:PFAutoCompleteRenderer.java


注:本文中的org.apache.wicket.request.Response.write方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。