Kamil created WICKET-6468:
-----------------------------

             Summary: Caption Label should be hidden in MultiFileUploadField 
when model is empty
                 Key: WICKET-6468
                 URL: https://issues.apache.org/jira/browse/WICKET-6468
             Project: Wicket
          Issue Type: Improvement
            Reporter: Kamil
         Attachments: showcase-fileUpload.zip

When you run the wicket-quickstart app, you'll see a page with 
MultiFileUploadField.
Although no files are selected, "Files:" caption is being visible.
I think that if "IModel<? extends Collection<FileUpload>> model" is empty, then 
"caption" label (Line 193) should not be visible.
I'd add something like:
{code}
Label caption = new Label("caption", new CaptionModel()) {
        @Override
        protected void onConfigure() {
                super.onConfigure();
                setVisible(model.map(Collection::isEmpty).getObject());
        }
};
{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to