I answered my own question! I'm a dork. But, for others that might have this
same problem:

Because the object in the SearchCriteria bean that you are selecting
(selectedPeriod) is now a different type of Object than a String, if you
recreate your list of objects to feed to the DropDownChoice (as I do at
various parts of the code), you will need to implement a proper EQUALS
method in your Object (PeriodBean). Otherwise, your selection connected to
the model (selectedPeriod) is not equal to the object sitting in the list of
options (because you recreated the list). That means your choice is not
shown in the DropDownChoice anymore (it says to "Select an Option" instead).

So, PeriodBean needed this:

    @Override
    public boolean equals(final Object obj) {
        if (obj == this) {
            return true;
        } else if (obj == null) {
            return false;
        } else if (obj instanceof PeriodBean) {
            PeriodBean other = (PeriodBean) obj;
            return other.getPeriodIndex().equals(getPeriodIndex());
        }
        return false;
    }

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Choice-Renderers-Display-Issue-After-Submit-tp4664225p4664237.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to