JSF Apache MyFaces 2.0无法正常工作

时间:2016-08-14 16:21:34

标签: java primefaces myfaces

我使用Spring 4.0.3和JSF Apache MyFaces 2.0创建了一个项目。 我在尝试添加新员工时发现问题,the Add button无法运行,除非点击2次而不是一次简单点击。

Add icon

上的

list page



<p:commandLink action="add?faces-redirect=true">
    <h:graphicImage value="/resources/pictures/add.ico"/>
</p:commandLink>
&#13;
&#13;
&#13;

点击Add icon上的list page点击(2次点击)后,我会重定向到add page以及控制台上显示的内容。

&#13;
&#13;
18:59:55,575 INFO  [org.primefaces.webapp.PostConstructApplicationEventListener] (MSC service thread 1-1) Running on PrimeFaces 5.0
18:59:55,618 INFO  [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-1) No context init parameter 'org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON' found, using default value false
18:59:55,618 INFO  [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-1) No context init parameter 'org.apache.myfaces.RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS' found, using default value false
18:59:55,618 INFO  [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-1) No context init parameter 'org.apache.myfaces.SAVE_FORM_SUBMIT_LINK_IE' found, using default value false
18:59:55,618 INFO  [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-1) No context init parameter 'org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS' found, using default value true
18:59:55,618 INFO  [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-1) No context init parameter 'org.apache.myfaces.RENDER_VIEWSTATE_ID' found, using default value true
18:59:55,618 INFO  [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-1) No context init parameter 'org.apache.myfaces.STRICT_XHTML_LINKS' found, using default value true
18:59:55,618 INFO  [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-1) No context init parameter 'org.apache.myfaces.RENDER_FORM_SUBMIT_SCRIPT_INLINE' found, using default value false
18:59:55,618 INFO  [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-1) No context init parameter 'org.apache.myfaces.CONFIG_REFRESH_PERIOD' found, using default value 2
18:59:55,618 INFO  [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-1) No context init parameter 'org.apache.myfaces.VIEWSTATE_JAVASCRIPT' found, using default value false
18:59:55,618 INFO  [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-1) No context init parameter 'org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS' found, using default value auto
18:59:55,618 INFO  [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-1) No context init parameter 'org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE' found, using default value false
18:59:55,634 INFO  [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-1) No context init parameter 'org.apache.myfaces.VALIDATE_XML' found, using default value false
18:59:55,634 INFO  [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-1) No context init parameter 'org.apache.myfaces.WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG' found, using default value true
18:59:55,634 INFO  [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-1) Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now.
18:59:55,634 SEVERE [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-1) Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.
18:59:55,650 INFO  [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-1) Reading standard config META-INF/standard-faces-config.xml
18:59:56,375 INFO  [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-1) Reading config : vfs:/D:/jboss-as-7.1.1.Final/standalone/deployments/JPAHibernateSpring.war/WEB-INF/lib/primefaces-5.0.jar/META-INF/faces-config.xml
18:59:56,390 INFO  [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-1) Reading config /WEB-INF/faces-config.xml
18:59:56,390 INFO  [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-1) MyFaces-package : myfaces-api not found.
18:59:56,390 INFO  [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-1) MyFaces-package : myfaces-impl not found.
18:59:56,390 INFO  [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-1) MyFaces-package : tomahawk not found.
18:59:56,406 INFO  [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-1) MyFaces-package : tomahawk12 not found.
18:59:56,406 INFO  [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-1) MyFaces-package : tomahawk-sandbox not found.
18:59:56,406 INFO  [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-1) MyFaces-package : tomahawk-sandbox12 not found.
18:59:56,406 INFO  [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-1) MyFaces-package : tomahawk-sandbox15 not found.
18:59:56,406 INFO  [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-1) MyFaces-package : myfaces-orchestra-core not found.
18:59:56,406 INFO  [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-1) MyFaces-package : myfaces-orchestra-core12 not found.
18:59:56,406 INFO  [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-1) MyFaces-package : trinidad-api not found.
18:59:56,406 INFO  [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-1) MyFaces-package : trinidad-impl not found.
18:59:56,406 INFO  [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-1) MyFaces-package : tobago not found.
18:59:56,406 INFO  [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-1) MyFaces-package : commons-el not found.
18:59:56,406 INFO  [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-1) MyFaces-package : jsp-api not found.
18:59:56,406 INFO  [org.apache.myfaces.util.ExternalSpecifications] (MSC service thread 1-1) MyFaces Bean Validation support enabled
18:59:57,003 INFO  [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-1) Serialization provider : class org.apache.myfaces.shared_impl.util.serial.DefaultSerialFactory
18:59:57,014 INFO  [org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory] (MSC service thread 1-1) Using LifecycleProvider java.lang.String
18:59:57,014 INFO  [org.apache.myfaces.webapp.AbstractFacesInitializer] (MSC service thread 1-1) ServletContext 'D:\jboss-as-7.1.1.Final\standalone\deployments\JPAHibernateSpring.war\' initialized.
18:59:57,014 INFO  [org.primefaces.webapp.PostConstructApplicationEventListener] (MSC service thread 1-1) Running on PrimeFaces 5.0
&#13;
&#13;
&#13;

请您对此问题有所了解:我为什么要在Add icon点击2次,从list page重定向到add page。提前致谢。

0 个答案:

没有答案