/** * Convert this text to a boolean. * * @return This string value as a boolean * @throws StringValueConversionException */ public final boolean toBoolean() throws StringValueConversionException { return Strings.isTrue(text); }
/** * Convert this text to a boolean. * * @return This string value as a boolean * @throws StringValueConversionException */ public final boolean toBoolean() throws StringValueConversionException { return Strings.isTrue(text); }
/** * Convert this text to a boolean. * * @return This string value as a boolean * @throws StringValueConversionException */ public final boolean toBoolean() throws StringValueConversionException { return Strings.isTrue(text); }
/** * Converts the string s to a Boolean. See <code>isTrue</code> for valid values of s. * * @param s * The string to convert. * @return Boolean <code>TRUE</code> when <code>isTrue(s)</code>. * @throws StringValueConversionException * when s is not a valid value * @see #isTrue(String) */ public static Boolean toBoolean(final String s) throws StringValueConversionException { return isTrue(s); }
/** * Converts the string s to a Boolean. See <code>isTrue</code> for valid values of s. * * @param s * The string to convert. * @return Boolean <code>TRUE</code> when <code>isTrue(s)</code>. * @throws StringValueConversionException * when s is not a valid value * @see #isTrue(String) */ public static Boolean toBoolean(final String s) throws StringValueConversionException { return isTrue(s); }
/** * Converts the string s to a Boolean. See <code>isTrue</code> for valid values of s. * * @param s * The string to convert. * @return Boolean <code>TRUE</code> when <code>isTrue(s)</code>. * @throws StringValueConversionException * when s is not a valid value * @see #isTrue(String) */ public static Boolean toBoolean(final String s) throws StringValueConversionException { return Boolean.valueOf(isTrue(s)); }
/** * Converts the string s to a Boolean. See <code>isTrue</code> for valid values of s. * * @param s * The string to convert. * @return Boolean <code>TRUE</code> when <code>isTrue(s)</code>. * @throws StringValueConversionException * when s is not a valid value * @see #isTrue(String) */ public static Boolean toBoolean(final String s) throws StringValueConversionException { return Boolean.valueOf(isTrue(s)); }
/** * This will return true if the header "Wicket-Ajax" is set. * * @see org.apache.wicket.protocol.http.WebRequest#isAjax() */ // TODO matej? should we have a simple way of supporting other ajax things? // or should they just set that same header?? public boolean isAjax() { boolean ajax = false; String ajaxHeader = httpServletRequest.getHeader("Wicket-Ajax"); if (Strings.isEmpty(ajaxHeader) == false) { try { ajax = Strings.isTrue(ajaxHeader); } catch (StringValueConversionException e) { // We are not interested in this exception but we log it anyway log.debug("Couldn't convert the Wicket-Ajax header: " + ajaxHeader); } } return ajax; }
/** * Returns whether this request is an Ajax request. This implementation checks for values of * {@value #PARAM_AJAX} url parameter or the {@value #HEADER_AJAX} header. Subclasses can use * other approaches. * * @return <code>true</code> if this request is an ajax request, <code>false</code> otherwise. */ public boolean isAjax() { try { return Strings.isTrue(getHeader(HEADER_AJAX)) || Strings.isTrue(getQueryParameters().getParameterValue(PARAM_AJAX).toString()); } catch (StringValueConversionException invalidValue) { return false; } }
/** * Returns whether this request is an Ajax request. This implementation checks for values of * {@value #PARAM_AJAX} url parameter or the {@value #HEADER_AJAX} header. Subclasses can use * other approaches. * * @return <code>true</code> if this request is an ajax request, <code>false</code> otherwise. */ public boolean isAjax() { try { return Strings.isTrue(getHeader(HEADER_AJAX)) || Strings.isTrue(getQueryParameters().getParameterValue(PARAM_AJAX).toString()); } catch (StringValueConversionException invalidValue) { return false; } }
ajax = Strings.isTrue(ajaxHeader);
@Override public void respond(IRequestCycle requestCycle) { boolean save = (this.save != null) ? this.save : Strings.isTrue(RequestCycle.get().getRequest().getRequestParameters() .getParameterValue(SAVE_PARAMETER).toString());
@Override protected void onGlobalSettings() { super.onGlobalSettings(); getApplicationSettings().setUploadProgressUpdatesEnabled(true); // deactivate ajax debug mode // getDebugSettings().setAjaxDebugModeEnabled(false); configureBootstrap(); // configureResourceBundles(); optimizeForWebPerformance(); new AnnotatedMountScanner().scanPackage(getPackageToScan()).mount(this); if (Strings.isTrue(getProperties().getProperty("cdn.useCdn"))) { final String cdn = getProperties().getProperty("cdn.baseUrl"); StaticResourceRewriteMapper.withBaseUrl(cdn).install(this); } final IPackageResourceGuard packageResourceGuard = getResourceSettings() .getPackageResourceGuard(); if (packageResourceGuard instanceof SecurePackageResourceGuard) { final SecurePackageResourceGuard securePackageResourceGuard = (SecurePackageResourceGuard)packageResourceGuard; securePackageResourceGuard.addPattern("+*.woff2"); } }
try autolinking = Strings.isEmpty(autolink) || Strings.isTrue(autolink);
try autolinking = Strings.isEmpty(autolink) || Strings.isTrue(autolink);
if (Strings.isTrue(value))
try autolinking = Strings.isEmpty(autolink) || Strings.isTrue(autolink);
try autolinking = Strings.isEmpty(autolink) || Strings.isTrue(autolink);