Not really, I believe it's in the JSF specification that the ID is not
allowed to be dynamic. I actually wrote about this on my blog (which is
not very popular since I don't really promote it much), but you can
check it out http://rossner.wordpress.com , I think it's actually the
most recent one (which is quite old), it's blocked from my office so I
can't even check it (damn websense), but I do have a "sort of"
workaround for this, it won't work in all cases but maybe it will help
you.

-----Original Message-----
From: Roeder, Andreas [mailto:[email protected]] 
Sent: mercredi 2 septembre 2009 12:04
To: [email protected]
Subject: Component id doesn't support EL?

Hello,

I tried to use the EL to set an id on a <tr:selectOneChoice> component: 

<tr:selectOneChoice
        id="#{field.id}" 
        required="#{field.required}" 
        value="#{genericFormBean.formDesc.modelMap[field.id]}" 
        <f:selectItems
                value="#{genericFormBean.selectItemMap[field.itemList]}"
/>
</tr:selectOneChoice>

But I keep getting an IllegalArgumentException. So it seems like EL is
not supported for an ID, event the documentation says so.

Is there a workaround for that?


Reply via email to