/** * @param markupStream * The markup stream where this exception occurred * @param message * The message */ public MarkupException(final MarkupStream markupStream, final String message) { super(message + "\n" + markupStream.toString()); this.markupStream = markupStream; }
/** * @param markupStream * The markup stream where this exception occurred * @param message * The message */ public MarkupException(final MarkupStream markupStream, final String message) { super(message + "\n" + markupStream.toString()); this.markupStream = markupStream; }
/** * @param markupStream * The markup stream where this exception occurred * @param message * The message * @param cause * The causing exception */ public MarkupException(final MarkupStream markupStream, final String message, final Throwable cause) { super(message + "\n" + markupStream.toString(), cause); this.markupStream = markupStream; }
/** * @param markupStream * The markup stream where this exception occurred * @param message * The message * @param cause * The causing exception */ public MarkupException(final MarkupStream markupStream, final String message, final Throwable cause) { super(message + "\n" + markupStream.toString(), cause); this.markupStream = markupStream; }
@Override public String toString() { return getMessage() + "\n MarkupStream: " + (markupStream == null ? "[unknown]" : markupStream.toString()); } }
@Override public String toString() { return getMessage() + "\n MarkupStream: " + (markupStream == null ? "[unknown]" : markupStream.toString()); } }
if (stream != null) String text = "\n" + stream.toString(); if (msg.endsWith(text))
if (stream != null) String text = "\n" + stream.toString(); if (msg.endsWith(text))
buffer.append(", markup = ").append(new MarkupStream(getMarkup()).toString());
buffer.append(", markup = ").append(new MarkupStream(getMarkup()).toString());
/** * * @see org.apache.wicket.MarkupContainer#onComponentTagBody(org.apache.wicket.markup.MarkupStream, * org.apache.wicket.markup.ComponentTag) */ @Override protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) { // Get the value from the properties file final String key = getDefaultModelObjectAsString(); final String value = getLocalizer().getString(key, getParent(), DEFAULT_VALUE); // if found, than render it after replacing the variables if ((value != null) && !DEFAULT_VALUE.equals(value)) { renderMessage(markupStream, openTag, key, value); } else { // TODO Doesn't localizer already throw an exception?!?! if (isThrowExceptionIfPropertyNotFound() == true) { throw new WicketRuntimeException("Property '" + key + "' not found in property files. Markup: " + markupStream.toString()); } log.warn("No value found for wicket:message tag with key: {}", key); renderComponentTagBody(markupStream, openTag); } }
@Override public void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) { // Get the value from the properties file final String key = getDefaultModelObjectAsString(); final String value = getLocalizer().getString(key, getParent(), DEFAULT_VALUE); // if found, than render it after replacing the variables if ((value != null) && !DEFAULT_VALUE.equals(value)) { renderMessage(markupStream, openTag, key, value); } else { if (isThrowExceptionIfPropertyNotFound() == true) { throw new WicketRuntimeException("Property '" + key + "' not found in property files. Markup: " + markupStream.toString()); } log.warn("No value found for wicket:message tag with key: {}", key); // If open tag was open-close if (markupStream.isCurrentIndexInsideTheStream() == false) { String formatedNotFound = String.format(NOT_FOUND, key); getResponse().write(formatedNotFound); } super.onComponentTagBody(markupStream, openTag); } }
@Override public void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) { // Get the value from the properties file final String key = getDefaultModelObjectAsString(); final String value = getLocalizer().getString(key, getParent(), DEFAULT_VALUE); // if found, than render it after replacing the variables if ((value != null) && !DEFAULT_VALUE.equals(value)) { renderMessage(markupStream, openTag, key, value); } else { if (isThrowExceptionIfPropertyNotFound() == true) { throw new WicketRuntimeException("Property '" + key + "' not found in property files. Markup: " + markupStream.toString()); } log.warn("No value found for wicket:message tag with key: {}", key); // If open tag was open-close if (markupStream.isCurrentIndexInsideTheStream() == false) { String formatedNotFound = String.format(NOT_FOUND, key); getResponse().write(formatedNotFound); } super.onComponentTagBody(markupStream, openTag); } }
markupStream.toString());
markupStream.toString());
markupStream.toString());
markupStream.toString());