Example usage for org.apache.wicket.util.string StringValue to

List of usage examples for org.apache.wicket.util.string StringValue to

Introduction

In this page you can find the example usage for org.apache.wicket.util.string StringValue to.

Prototype

@SuppressWarnings({ "unchecked", "rawtypes" })
public final <T> T to(final Class<T> type) throws StringValueConversionException 

Source Link

Document

Converts this StringValue to a given type.

Usage

From source file:org.projectforge.web.wicket.WicketUtils.java

License:Open Source License

public static Object getAsObject(final PageParameters parameters, final String name, final Class<?> type) {
    final StringValue sval = parameters.get(name);
    if (sval == null || sval.isNull() == true) {
        return null;
    } else {/*from ww w .j  a  va  2s.com*/
        return sval.to(type);
    }
}