CFEclipse doesn't recognize structName in cfimage tag

171 views Asked by At

This code:

<cfimage action="info" structName="imageInfo" source="#imagePath#">

is giving this error:

The attribute 'structName' is required for the tag. (Found: [source, structname, action])

When I run this code in CFBuilder - everything is OK, but I must use CFEclipse. What should I do (I use CF9)? Thank you for your answers!

2

There are 2 answers

7
Jason Dean On BEST ANSWER

Of course this problem won't prevent you from running your application on ColdFusion. It is just an IDE warning that something is wrong.

You have a few options.

  1. Try using a lowercase N in structName. i.e. structname. ColdFusion is not case-sensitive, but Java is, and CFEclipse is a Java application.

  2. If that does not work, then it probably means that the dictionary file that drives the code assist is not correct. You can go earch forthose XML files and update them to include that attribute.

  3. You can use CFBuilder. I know you said you can't, but I have to question why. You know there is a free version that is just as good as CFEclipse, right?

0
Adam Cameron On

The problem is that there's a casing glitch in that file Peter mentions. There's one reference to "structName" to define the attribute itself, and another "structname" which is in the list defining which attributes are needed for action="info". If you make them both the same, then restart Eclipse, you should be OK (that's I've needed to do to make the error indicator go away).