facebook

faces-config editor JSF view handler validation

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #231801 Reply

    fpecher
    Member

    Problem:

    when I use the class org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl
    as view handler (web.xml faces-config.application.view-handler),
    the xml editor marks the class name as an error, telling me
    that this class is no subtype of javax.faces.event.ActionListener.
    The error will also be marked when I use a name different from
    faces-config.xml.

    However, when I deploy the project ignoring this message, the
    web application works fine, just as I would expect it to work without
    the error. Also, the error does not appear in the eclipse “Problems”
    view.

    OS: WinXP, latest patches
    Eclipse version: 3.0.2
    Was Eclipse freshly installed for MyEclipse? Yes
    Are any other external plugins installed? No
    What MyEclipse version are you using? 20050617-4.0-Milestone-2
    What JDK version are you using to run Eclipse? 1.5.0_03-b7
    What JDK version are you using to launch your application server? 1.5.0_03-b7
    What application server are you using? Tomcat 5
    Are there any exceptions in the Eclipse log file? No

    What steps did you take that resulted in the issue?

    I created a web project (j2ee 1.4, no jstl libs). I added JSF capabilities
    using MyFaces. I followed the instructions from the myfaces homepage
    on how to use JSF/MyFaces and tiles together. This includes adding
    the struts library and the tiles tld to the project, as well as replacing
    the standard view handler with the class mentioned above.

    #231836 Reply

    Riyad Kalla
    Member

    We will look into this, thank you.

    #232307 Reply

    Steve Thome
    Member

    I get the same error. Also, I get the same when using the Spring variable resolver (org.springframework.web.jsf.DelegatingVariableResolver). MyEclipse 4.0B2, Eclipse 3.1 Final, Jdk1.5

    #232460 Reply

    I confirm the problem with the wrong interface required – it will be fixed.
    This problem is reported in the problems view on my setup. Please, check the configuration of the problems view (i.e. if the JSF are not filtered out, if the problems of the specific project are reported, etc). Please, tell if the problem persists.

    #232464 Reply

    fpecher
    Member

    Alright, the JSFs were filtered out in my setup, my fault.
    Now, the error is shown in my problems view, as expected, so
    there seems to be no problem with the problems view 😉

    #232465 Reply

    Thank you for validating the issues. On my setup the JSF problems are enabled by default so it looks like they are disabled for the workspaces that were created before the ME4 was installed…

    #232572 Reply

    fpecher
    Member

    … the error still persists, though.

    #232580 Reply

    The issue is fixed and will be available in the M3 build.

    #247804 Reply

    Stephan Anft
    Member

    Hi everyone,

    currently, I am evaluating MyEclipseIDE in version 4.1.1. During testing, I get an error message that seems to be related to the bug described in this post.

    Problem:
    In my test application, I use JSF together with the Spring framework. Therefor, I configured the DelegatingVariableResolver in the faces-config.xml. Doing so MyEclipseIDE reports a problem with the message “org.springframework.web.jsf.DelegatingVariableResolver is not a subtype of javax.faces.el.VariableResolver”. Well, it definitely is a subclass so the problem marked is not a problem.

    OS: WinXP
    Eclipse: 3.1.2
    Was Eclipse freshly installed for MyEclipse? Yes
    Are any other external plugins installed? Subclipse
    What MyEclipse version are you using? 4.1.1
    What JDK version are you using to run Eclipse? 1.4.2_05
    What JDK version are you using to launch your application server? 1.4.2_05
    What application server are you using? Tomcat 5
    Are there any exceptions in the Eclipse log file? No

    What steps did you take that resulted in the issue?

    I created an enterprise application, a web and a Java project. JSF capabilities were added to the web project, Spring and Hibernate capabilities were added to the Java project. The web project is configured to be dependent on the Java project, and classes from the Java project are visible to the web project. In the faces-config.xml file, I added an element for <application> and a nested <variable-resolver> element that points to the class “org.springframework.web.jsf.DelegatingVariableResolver”. When saving the file, the line with the class name is marked with a problem marker and the error message mentioned above appears in the problems view.

    Regards,
    Stephan

    #247809 Reply

    Riyad Kalla
    Member

    Stephan,
    Did you be sure to export the Spring libraries from the Java project to the Web Project? It’s possible the editor just isn’t seeing the class and cannot resolve it.

    #247822 Reply

    Stephan Anft
    Member

    As far as I have checked it the classes are exported and available in the web project. In addition, the auto-completion in the faces-config.xml editor offers the DelegationVariableResolver in the code assist, too. I wonder if the editor would list the class if it is not in the build path?!

    #247823 Reply

    Riyad Kalla
    Member

    If you copy the Spring libraries into the Web project’s /lib folder, does the validation error message go away? (Be sure to rebuild your project) also try and do a MyEclipse > Remove all Validation Markers and rebuild to make sure it’s not just a stale error marker.

    #247828 Reply

    Stephan Anft
    Member

    I just tried the things you mentioned but no success. After calling “Remove all validation markers” the problem message went away. Also, running a revalidation using the popup menu did not bring the message back. But after editing the faces-config.xml and saving the file the message reappears in the problems view. I also copied the Spring libraries to the lib directory in the web project, but that didn’t do the trick either. In fact, I had a build path problem before, and the error message did clearly indicate that the class files are missing. In this case however the hierarchy of the class is blamed (wrong subtype).

    Any other ideas?

    Thanks,
    Stephan

    #247829 Reply

    Riyad Kalla
    Member

    Can you paste the small snippet of your faces-config file, or a smaller complete faces-config file for us to test directly over here.

    #247830 Reply

    Stephan Anft
    Member

    Below you’ll find the complete faces-config.xml file:

    
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    
    <faces-config >
        <application>
            <variable-resolver>
                org.springframework.web.jsf.DelegatingVariableResolver
            </variable-resolver>
        </application>
        
        <managed-bean>
            <managed-bean-name>UserBean</managed-bean-name>
            <managed-bean-class>com.lhsystems.prototype.jsf.bean.UserBean</managed-bean-class>
            <managed-bean-scope>session</managed-bean-scope>
            <managed-property>
                <property-name>userName</property-name>
                <property-class>java.lang.String</property-class>
                <value></value>
            </managed-property>
            <managed-property>
                <property-name>password</property-name>
                <property-class>java.lang.String</property-class>
                <value></value>
            </managed-property>
        </managed-bean>
        <navigation-rule>
            <from-view-id>/userLogin.jsp</from-view-id>
            <navigation-case>
                <from-outcome>success</from-outcome>
                <to-view-id>/userLoginSuccess.jsp</to-view-id>
            </navigation-case>
            <navigation-case>
                <from-outcome>failure</from-outcome>
                <to-view-id>/userLogin.jsp</to-view-id>
            </navigation-case>
        </navigation-rule>
    </faces-config>
    

    The bean and the navigation rule element is from the MyEclipse Getting Started guide, the application element at the top is the one that is producing the validation error.

Viewing 15 posts - 1 through 15 (of 18 total)
Reply To: faces-config editor JSF view handler validation

You must be logged in to post in the forum log in