[ https://issues.apache.org/jira/browse/TAP5-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15158881#comment-15158881 ]
Barry Books commented on TAP5-2099: ----------------------------------- There are multiple things at play here. Here is how I think things work. It's true the components are singletons but the fields are not really fields otherwise two concurrent pages would share the same data. The fields are really conduits and in this case the conduit points to a literal binding by default. If code tries to set that field the conduit will point to the new object and the bindings set method will be called to inform the literal binding the field value has changed. This is how two way binding is implemented. Currently for a literal that throws an exception. My thought is the owner of the literal does not want it's value changed and does not care if the field is changed so the set method does nothing but the field is still changed to the new value. If you run the project on Github you will see that the field value is changed by the mixin. > Update parameters bound to literal: or symbol: from a mixin > ----------------------------------------------------------- > > Key: TAP5-2099 > URL: https://issues.apache.org/jira/browse/TAP5-2099 > Project: Tapestry 5 > Issue Type: Improvement > Affects Versions: 5.3.6, 5.4 > Reporter: Lance > Labels: patch > Attachments: TAP52099-1.patch > > > Currently, I cannot update a component component parameter that is > initialized with a literal: or symbol: binding from a mixin. If I try to > @BindParameter the param and change it's value, I get a "Binding %s is > read-only" exception (originating from AbstractBinding). > I propose that literal and symbol bindings are sourced from a PerThreadValue > that can be updated by a mixin. > My original need for this was to create a "SinglePage" mixin for the Grid > component which would set the rowsPerPage parameter to Integer.MAX_VALUE. I > can't currently do this because by default, the parameter is a symbol: > binding. -- This message was sent by Atlassian JIRA (v6.3.4#6332)