[ http://issues.apache.org/jira/browse/TAPESTRY-883?page=comments#action_12370591 ]
Curtis Paris commented on TAPESTRY-883: --------------------------------------- Possible user error, but, it should be documented somewhere. The cause of the problem is that in my page class, the value was being assigned to a property that was a String. This caused Tapestry to use the value, and not the Object itself. Changing my property to an Object instead allowed the PropertySelection to work. > PropertySelection uses wrong value compared to model for equals() check > ----------------------------------------------------------------------- > > Key: TAPESTRY-883 > URL: http://issues.apache.org/jira/browse/TAPESTRY-883 > Project: Tapestry > Type: Bug > Components: Framework > Versions: 4.0 > Reporter: Curtis Paris > > If your IPropertySelectionModel returns a different Value than Open for a > given index, the PropertySelection does not work. > In PropertySelectionModel::renderFormComponent, we are calling "getValue()" > for the value. This is returning the HTML Form value that is set. It does > NOT return the object that we are comparing to. > > Object value = getValue(); > But, right down below we are calling model.getOption(). This returns the > actual object that is represented by the index. > > Object option = model.getOption(i); > So, now we have a value, and are trying to do an equals(value, option) which > never returns true. > The rewindFormComponent is doing it somewhat right. It is getting the > parameter value, and then doing a "model.translateValue(value)" which returns > the option object. But, there is no simular functionality for when the value > is set clean from the form. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]