argoyle / tapestry-tagselect

Tapestry-tagselect is a select component for Tapestry 5 similar to the version selector in recent JIRA-versions.
Other
12 stars 2 forks source link

labels not being displayed properly #1

Closed ghost closed 13 years ago

ghost commented 13 years ago

When using tagselect with an object without a value encoder, the box appears with the object string rather than the specified label from the selectModelFactory.

selectModelFactory.create(new ArrayList(hashset), "Label");

When using a value encoder, the label appears as the object ID.

Example of my value encoder.

public ValueEncoder<ApplicationUser> getEncoder() {
    return new ValueEncoder<ApplicationUser>() {
        public String toClient(ApplicationUser value) {
            return value.getId().toString();
        }

        public ApplicationUser toValue(String clientValue) {
            return (ApplicationUser) session.get(ApplicationUser.class, clientValue);
        }
    };
}
argoyle commented 13 years ago

I think this is solved by the above commit.