MyEclipse: JSP validation error "cannot be resolved" for var

dwighte - May 03, 2010 - 07:02 PM
Post subject: JSP validation error "cannot be resolved" for var
Using MyEclipse 7.5, but I've had this problem with earlier versions, too. Using any of the icefaces tags that have a "var" attribute, the name supplied is not recognized in the nested statements. Example:
Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<jsp:root version="1.2" xmlns:jsp="http://java.sun.com/JSP/Page"
   xmlns:f="http://java.sun.com/jsf/core"
   xmlns:h="http://java.sun.com/jsf/html"
   xmlns:ice="http://www.icesoft.com/icefaces/component">
   <jsp:directive.page contentType="text/html"/>
   <f:view>
   <ice:outputDeclaration doctypeRoot="html"
      doctypePublic="-//W3C//DTD HTML 4.01 Transitional//EN"
      doctypeSystem="http://www.w3.org/TR/html4/loose.dtd" />
   <html>
     <head></head>
      <body>
      <ice:form id="test">
         <h:dataTable value="#{headerViewBean.mainMenus}" var="item">
            <h:outputText value="#{item.subText}"><!-- no warning -->
            </h:outputText>
         </h:dataTable>
         <ice:dataTable  value="#{headerViewBean.mainMenus}" var="menu">
            <ice:outputText value="#{menu.subText}" ><!-- "menu cannot be resolved" -->
            </ice:outputText>
         </ice:dataTable>
      </ice:form>
     </body>
   </html>
</f:view>
</jsp:root>

In this case, the type returned by getMainMenus() is List<Tab>, but I get the same warning in many other cases with a variety of return types, although it's most commonly a List<sometype>.

I installed icefaces 1.8.2 after the MyEclipse 7.5 update, using a download from icefaces.org, MyEclipse-IDE-v7.5-ICEfaces-v1.8.2.zip.
Any help or suggestions would be appreciated!
All times are GMT - 6 Hours
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits