Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-649

Forms containing loop components which contain no form elements still encode into t:formdata hidden field



    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    •,,,, 5.0.18
    • tapestry-core
    • None


      Updating our app to 5.1 has caused us an issue with using loop components nested inside form components, we now need to provide a ValueEncoder whereas we didn't in 5.0.18 which just serialised the loop values into t:formdata. In many cases we have loops that don't have any input or form elements inside them, but that still need to be contained by the form tag in the HTML. The issue is that the loop component has a 'volatile' parameter to switch off the state saving, but this expects the iterator to still be available when the form is submitted, which it isn't and doesn't need to be.

      I think that the loop component needs the facility to be form agnostic, so that FormSupport (from the environment) is ignored / not set. My suggestion is that the volatile parameter is deprecated (can't remove for backwards compatability) and a new parameter 'formHandling' or 'formSupport' is added to the loop component which accepts three values: none, statesave, volatile. I think that this would be much clearer and concise than the current volatile boolean, which confuses everyone in my experience, but alternatively a new boolean for switching off form support would suffice.




            hlship Howard Lewis Ship
            andyb Andy Blower
            1 Vote for this issue
            0 Start watching this issue