當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。