[Tip] MyFaces Extensions support working

Home Forums MyEclipse IDE Java EE Development (EJB, JSP, Struts, XDoclet, etc.) [Tip] MyFaces Extensions support working

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Randy Randy 9 years, 11 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #238686
    Profile photo of Randy
    Randy
    Member

    Hi,
    Tx to Eugene, I’m got Myfaces 1.1.0 working fine. I found my original problem that made do the upgrade. The problem exist with the tree2 (and others apparently) component. It requires an addition to the web.xml file to be added for the clientside javascript to work. Here is the snippet:

    <filter>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
        <init-param>
            <param-name>maxFileSize</param-name>
            <param-value>20m</param-value>
            <description>Set the size limit for uploaded files.
                Format: 10 - 10 bytes
                        10k - 10 KB
                        10m - 10 MB
                        1g - 1 GB
            </description>
        </init-param>
    </filter>
    
    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <url-pattern>/faces/*</url-pattern>
    </filter-mapping>

    The help page is here http://myfaces.apache.org/tomahawk/extensionsFilter.html

    Would it be possible to have an option to have this added to the web.xml automagically, maybe as a myfaces config option? Since I’m learning myfaces, I wasted an insane amount of time trying to figure out why my tree2 menu was not expandble. adding the snippet above (with a url-pattern of *.faces) fixed it.

    Want to say thanx again for such awesome support.

    Randy

    #238689
    Profile photo of Riyad Kalla
    Riyad Kalla
    Member

    Randy,
    First let me thank you for posting this, I am going to make it sticky for others, also this request is already in our pipeline, another user a few months ago had the exact same problem and requested the same thing, sorry for the delay.

    #238695
    Profile photo of Randy
    Randy
    Member

    De nada. Hope it helps others.

    L8R!
    Randy

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.