|
|
|
I am seeing the "Invalid id reference" in plain html snippet:
................ <tr> <td width="10"/> <td colspan="2"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td><label for="someId" class="mainBody">Pre-determined language: </label></td> <td align="left"> <select name="someId"> <option value="0">(choose one)</option> ................ Is there a way to filter out this error? It shows up as an error on all my GSP pages and also when I do a code analysis.
I notice that if I add a matching id= attribute to the <g:select> tag it does propagate to the generated HTML, so IDEA should recognize g:select as a legitimate form tag and match the label for= properly.
I am going to log a bug to Grails that the scaffolding should add id= to the g:select tags. Please investigate it further. IDEA HTML has a knowledge of dynamic tags.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
In your example example labels "name" & "email" are binded to respective input elements in containing form. But element for label "event" is combo-box, generated by <g:select> Grails tag. If you look at it's body in FormTagLib class, you'll see that "id" attribute for this combo-box is name of your domain class "Event". But obviously in current implementation IDEA HTML annotator cannot check it by Groovy file.
May be one day we'll change model to implement this analysis.