Hi, All!

I'm working in a small web application in which I need upload a set of
files and choose one from a select component.

My encoder code is:
..

    private List<UploadedFile> uploadedFiles;
...
public ValueEncoder<UploadedFile> getFilesEncoder() {

        return new ValueEncoder<UploadedFile>() {

public String toClient(UploadedFile value) {
                return value.getFileName();
            }

            public UploadedFile toValue(String id) {
            for (UploadedFile file : uploadedFiles) {
            if (file.getFileName().equals(id))
            return file;
}
                return null;
            }
        };
    }

My select code is:

<select t:type="select" t:id="targetInterfaceFile" t:value="filename"
t:model="uploadedFiles"  t:encoder="getFilesEncoder()"
                    t:blankOption="ALWAYS" t:blankLabel="Choose..."
t:validate="required"/

The problem is that when I upload a set of files, In the select I can't see
files names but I see names like "org.tapestry...@ef1aeqa" for each file

Best regards,

*Marcos Héctor Trotti*

Reply via email to