tags:

views:

36

answers:

2

Hi,

I have a component inside a form:

<a:form id="myform">
   <a:somecomponent id="comp">
</a:form>

and a huge css file, which attaches some style to the component with id "comp".

However, this does not work, as in the rendered html page, the components name becomes "myform:comp".

How can I prevent this? Using myform:comp in css does not seem to work :-(

A: 

The best solution I found up till now is not to use the id, but the style class, and replace all of the occurences of #comp in the css file with .comp:

<a:form id="myform">
   <a:somecomponent styleClass="comp">
</a:form>

However, I don't consider this as a 'clean' solution...

Fortega
+2  A: 

You have to add prependId="false" to form tag.

<a:form id="myform" prependId="false">
   <a:somecomponent id="comp">
</a:form>
Odelya