You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (Commented) (JIRA)" <ji...@apache.org> on 2012/01/24 14:56:41 UTC

[jira] [Commented] (WICKET-4353) Choice is not rendered as selected on different instances semantically equal

    [ https://issues.apache.org/jira/browse/WICKET-4353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13192159#comment-13192159 ] 

Sven Meier commented on WICKET-4353:
------------------------------------

There are several solutions how to detect the selected choice:
1) use a custom ChoiceRenderer (no longer available with 1.5.4)
2) override AbstractSingleSelectChoice#getModelValue()
3) make sure the selected choice is the identical object contained in the choices list (e.g. via OpenSessionInView)

I think 1) was a nice and easy solution so far.

@Igor:
You've implemented a different solution in 92dec6995318444eb831c49b350a6b03b89e0962, utiliizing the choiceRenderer and #isSelected(). Why did you revert this change?

                
> Choice is not rendered as selected on different instances semantically equal
> ----------------------------------------------------------------------------
>
>                 Key: WICKET-4353
>                 URL: https://issues.apache.org/jira/browse/WICKET-4353
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.4
>         Environment: windows, jdk1.6
>            Reporter: Per Newgro
>              Labels: DropDownChoice
>         Attachments: ddcbug.zip
>
>
> With 1.5.4 there was a change in org.apache.wicket.markup.html.form.AbstractSingleSelectChoice.java
> Sven stated in list that: "Igor's commit statements says "improved inconsistency handling in choice components".
> This change prevents IChoiceRenderer#getIdValue() being called with -1 as the index argument. ".
> It is defenitly a comprehensible change. But the effect is (for me) quite heavy.
> If you don't overwrite equals in selectable objects then two semantically equal instances will not be rendered as 
> selected because of the different physical instances. But it worked in 1.5.3.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira