« Previous | Next » 

Revision d0d78704

IDd0d787041669c59609cfcaa46ea067c64b66ed4e
Parent e248e1b3
Child dddf78b7

Added by Bastian Waidelich almost 7 years ago

[BUGFIX] Fix support for "value" argument on the form.upload ViewHelper

When specifying the ``value`` argument on the ``form.upload`` ViewHelper
the generated hidden field was named something like::

object[property][__identity][originallySubmittedResource][__identity]

since the adjustments to the new Resource Management (see
Ic72a4ba780ebdef8b0940f3b9d20fa2c8840f834).

This change fixes the name to exclude the first "__identity". Besides it
fixes the behavior when specifying a "default resource" using the
``value`` argument:

  • If a form is re-displayed due to validation errors, any originally
    transmitted resource will survive the re-submission.
  • Otherwise, if a resource (or its identifier) is specified as "value"
    argument, that resource will be used by default
  • Finally, when in "object accessor mode", the value of the bound
    property will be used as fallback.

Any newly uploaded file will of course overrule the hidden field as
before.

Change-Id: I03812defb9b197cb8b1b953297039a14f281fcfa
Related: FLOW-214
Releases: master, 3.0

  • added
  • modified
  • copied
  • renamed
  • deleted