-
1. Re: Decorating with a fileUpload tag
utiba_davidr Jun 27, 2007 1:36 AM (in response to davidfed)Hey,
You need to set the "for" parameter to the id of the field that the label is for. In this case it's "upload_#{idx}". You should be able to pass this to the template your decorating via a parameter (see the facelets documentation). I am not entirely sure whether decorate can take parameters, if it cannot - you may be better using a composition / insert combination.
Cheers,
David -
2. Re: Decorating with a fileUpload tag
pmuir Jun 27, 2007 5:35 AM (in response to davidfed)Most id parameters in JSF can't take EL.
-
3. Re: Decorating with a fileUpload tag
davidfed Jun 27, 2007 6:03 PM (in response to davidfed)I should have mentioned that I do not get any complaints from equivalent decorate structures that have inputText and selectOneMenu as the editable value. The "for" attributes are set correctly. And I saw in another topic that this problem is fixed in seam 2.0 as fileUpload has been made an EditableValueHolder and thus the id will be set. So when I'm allowed to move to Seam 2.0 this won't be a problem.
The EL works fine. I'm setting #{idx} with:<ui:param name="idx" value="0"/>
I had to unroll a loop and this simplifies the copy/paste when I adjust something.