1. Tapestry
  2. TAPESTRY-1682

Parameters with defined with a default-value counted as "invariant"


    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.2
    • Fix Version/s: 4.1.3
    • Component/s: tapestry-core
    • Labels:


      Even though I found this problem with Dialog component it seems to affect any similar component parameter, that is an optional component parameters with a constant default value, take as an example Dialog:

      <parameter name="hidden" default-value="true" />

      Unless the optional parameter is configured with a ognl method binding the parameter itself is somehow regarded as "Invariant" by ExpressionBinding class that will throw a ReadOnlyBindingException when trying to use a setter on it. In particular, for Dialog component this mean to fail everytime the component is show()/hide() as setHidden has to be called to set the actual status for the component.

      There seems to be some kind of confusion between the component parameter method and the binding method/default value here when creating the binding. In my opinion a "default-value" should be just a default value if the parameter is configured/initialized but this shouldn't prevent to use setters and getters on the parameter after the component is created. And this is the same thing that thought the creator of Dialog component I think

      The way to repeat this is very simple: just use the Dialog component anywhere without using the hidden parameter and using hide() or show() at some time.


        Martino Piccinato created issue -
        Jesse Kuhnert made changes -
        Field Original Value New Value
        Fix Version/s 4.1.3 [ 12312516 ]
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Mark Thomas made changes -
        Workflow jira [ 12409598 ] Default workflow, editable Closed status [ 12567030 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12567030 ] jira [ 12589957 ]


          • Assignee:
            Martino Piccinato
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: