/** * Gets the concrete value only if the submission was a success. * If the form is invalid because of validation errors or you try to access a file field this method will return null. * If you want to retrieve the value even when the form is invalid use {@link #value(String)} instead. * If you want to retrieve a file field use {@link #file(String)} instead. * * @param key the string key. * @return the value, or null if there is no match. */ public String get(String key) { try { return (String)get().getData().get(asNormalKey(key)); } catch(Exception e) { return null; } }
/** * Gets the concrete value only if the submission was a success. * If the form is invalid because of validation errors or you try to access a non-file field this method will return null. * If you want to retrieve the value even when the form is invalid use {@link #value(String)} instead. * If you want to retrieve a non-file field use {@link #get(String)} instead. * * @param key the string key. * @return the value, or null if there is no match. */ public <A> Http.MultipartFormData.FilePart<A> file(String key) { try { return (Http.MultipartFormData.FilePart<A>)get().getData().get(asNormalKey(key)); } catch(Exception e) { return null; } }
/** * Gets the concrete value only if the submission was a success. * If the form is invalid because of validation errors or you try to access a file field this method will return null. * If you want to retrieve the value even when the form is invalid use {@link #value(String)} instead. * If you want to retrieve a file field use {@link #file(String)} instead. * * @param key the string key. * @return the value, or null if there is no match. */ public String get(String key) { try { return (String)get().getData().get(asNormalKey(key)); } catch(Exception e) { return null; } }
/** * Gets the concrete value only if the submission was a success. * If the form is invalid because of validation errors or you try to access a non-file field this method will return null. * If you want to retrieve the value even when the form is invalid use {@link #value(String)} instead. * If you want to retrieve a non-file field use {@link #get(String)} instead. * * @param key the string key. * @return the value, or null if there is no match. */ public <A> Http.MultipartFormData.FilePart<A> file(String key) { try { return (Http.MultipartFormData.FilePart<A>)get().getData().get(asNormalKey(key)); } catch(Exception e) { return null; } }
/** * Gets the concrete value only if the submission was a success. * If the form is invalid because of validation errors or you try to access a file field this method will return null. * If you want to retrieve the value even when the form is invalid use {@link #value(String)} instead. * If you want to retrieve a file field use {@link #file(String)} instead. * * @param key the string key. * @return the value, or null if there is no match. */ public String get(String key) { try { return (String)get().getData().get(asNormalKey(key)); } catch(Exception e) { return null; } }
/** * Gets the concrete value only if the submission was a success. * If the form is invalid because of validation errors or you try to access a non-file field this method will return null. * If you want to retrieve the value even when the form is invalid use {@link #value(String)} instead. * If you want to retrieve a non-file field use {@link #get(String)} instead. * * @param key the string key. * @return the value, or null if there is no match. */ public <A> Http.MultipartFormData.FilePart<A> file(String key) { try { return (Http.MultipartFormData.FilePart<A>)get().getData().get(asNormalKey(key)); } catch(Exception e) { return null; } }
/** * Fille with existing data. */ public DynamicForm fill(Map value) { Form<Dynamic> form = super.fill(new Dynamic(value)); return new DynamicForm(form.data(), form.errors(), form.value()); }
/** * Fills the form with existing data. * @param value the map of values to fill in the form. * @return the modified form. */ public DynamicForm fill(Map<String, Object> value) { Form<Dynamic> form = super.fill(new Dynamic(value)); return new DynamicForm(form.rawData(), form.files(), form.errors(), form.value(), messagesApi, formatters, validatorFactory, config, lang().orElse(null)); }
/** * Fills the form with existing data. * @param value the map of values to fill in the form. * @return the modified form. */ public DynamicForm fill(Map<String, Object> value) { Form<Dynamic> form = super.fill(new Dynamic(value)); return new DynamicForm(form.rawData(), form.files(), form.errors(), form.value(), messagesApi, formatters, validatorFactory, config, lang().orElse(null)); }
/** * Gets the concrete value * @param key the string key. * @return the value */ public Optional<Object> value(String key) { return super.value().map(v -> v.getData().get(asNormalKey(key))); }
/** * Fills the form with existing data. * @param value the map of values to fill in the form. * @return the modified form. */ public DynamicForm fill(Map<String, Object> value) { Form<Dynamic> form = super.fill(new Dynamic(value)); return new DynamicForm(form.rawData(), form.files(), form.errors(), form.value(), messagesApi, formatters, validatorFactory, config, lang().orElse(null)); }
/** * Gets the concrete value * @param key the string key. * @return the value */ public Optional<Object> value(String key) { return super.value().map(v -> v.getData().get(asNormalKey(key))); }
/** * Gets the concrete value if the submission was a success. */ public String get(String key) { try { return (String)get().getData().get(asNormalKey(key)); } catch(Exception e) { return null; } }
/** * Fille with existing data. */ public DynamicForm fill(Map value) { Form<Dynamic> form = super.fill(new Dynamic(value)); return new DynamicForm(form.data(), form.errors(), form.value()); }
/** * Gets the concrete value if the submission was a success. */ public String get(String key) { try { return (String)get().getData().get(asNormalKey(key)); } catch(Exception e) { return null; } }
/** * Gets the concrete value * @param key the string key. * @return the value */ public Optional<Object> value(String key) { return super.value().map(v -> v.getData().get(asNormalKey(key))); }