Pas d'appel à l'action method
Bon, je suis un peu énervé, donc je vais faire court :
qui pourrait me dire pourquoi, tout marche bien dans cette page SAUF le dernier "commandLink" :
Code:
<h:commandLink value="Enregistrer" action="#{typeInstallBean.saveRootTypInst}"/>
Franchement, je suis en passe d'aller voir ailleurs que JSF parce que ce problème (récurent), généralement dû à une broutille n'est jamais remonté où que ce soit par JSF, le validator dit non et puis c'est tout, il reload la page sans plus...
voici ma page :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
| <%@ taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
<html>
<head>
<title>Détail énergie</title>
</head>
<body>
<f:view>
<h:form>
<h:commandLink value="nouveau" actionListener="#{typeInstallBean.addTypeInst}" action="energieDetail"/>
<h:outputText value="#{sessDataBean.typeEnergie.nom}" style="font-size:14px;font-weight:bold;"/>
<rich:panel id="childrenListPanel">
<f:facet name="header"><h:outputText value="qjgdsfkjsqhdf" /> </f:facet>
<h:dataTable value="#{sessDataBean.typeInstList}" var="ti">
<h:column>
<h:commandLink value="#{ti.nom}" action="detailInst" actionListener="#{typeInstallBean.initTypeInst}" style="font-size:12px;">
<t:updateActionListener property="#{typeInstallBean.typInstId}" value="#{ti.id}"/>
</h:commandLink>
</h:column>
<h:column>
<h:outputText value="#{ti.label}" style="font-size:12px;"/>
</h:column>
</h:dataTable>
</rich:panel>
</h:form>
<h:form>
<h:panelGroup id="newTypeInstallPanel">
<h:panelGroup rendered="#{sessDataBean.renderNewTypInstPanel}">
<h:panelGrid columns="2">
<h:outputText value="Nom" style="font-size:12px;"/>
<h:inputText value="#{sessDataBean.newTypeInstall.nom}" style="font-size:12px;"/>
<h:outputText value="Label" style="font-size:12px;"/>
<h:inputText value="#{sessDataBean.newTypeInstall.label}" style="font-size:12px;"/>
</h:panelGrid>
<h:commandLink value="Enregistrer" action="#{typeInstallBean.saveRootTypInst}"/>
</h:panelGroup>
</h:panelGroup>
</h:form>
</f:view>
</body>
</html> |
voilà mon faces-config :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
| <?xml version="1.0"?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
"http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
<faces-config>
<managed-bean>
<managed-bean-name>sessionFactoryManager</managed-bean-name>
<managed-bean-class>com.ei.managers.SessionFactoryManager</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>userManager</managed-bean-name>
<managed-bean-class>com.ei.managers.UserManager</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
<managed-property>
<property-name>sessionFactoryManager</property-name>
<property-class>com.ei.managers.SessionFactoryManager</property-class>
<value>#{sessionFactoryManager}</value>
</managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>typeInstallManager</managed-bean-name>
<managed-bean-class>com.ei.managers.TypeInstallManager</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
<managed-property>
<property-name>sessionFactoryManager</property-name>
<property-class>com.ei.managers.SessionFactoryManager</property-class>
<value>#{sessionFactoryManager}</value>
</managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>authBean</managed-bean-name>
<managed-bean-class>com.ei.beans.AuthBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>userManager</property-name>
<property-class>com.ei.managers.UserManager</property-class>
<value>#{userManager}</value>
</managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>sessDataBean</managed-bean-name>
<managed-bean-class>com.ei.beans.SessDataBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>authBean</property-name>
<property-class>com.ei.beans.AuthBean</property-class>
<value>#{authbean}</value>
</managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>typeInstallBean</managed-bean-name>
<managed-bean-class>com.ei.beans.TypeInstallBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>typeInstallManager</property-name>
<property-class>com.ei.managers.TypeInstallManager</property-class>
<value>#{typeInstallManager}</value>
</managed-property>
<managed-property>
<property-name>sessDataBean</property-name>
<property-class>com.ei.beans.SessDataBean</property-class>
<value>#{sessDataBean}</value>
</managed-property>
</managed-bean>
<navigation-rule>
<from-view-id>/*</from-view-id>
<navigation-case>
<from-outcome>login</from-outcome>
<to-view-id>/pages/login.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>accueil</from-outcome>
<to-view-id>/pages/accueil.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>energieDetail</from-outcome>
<to-view-id>/pages/typInstall/energieDetail.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>typInstAcc</from-outcome>
<to-view-id>/pages/typInstall/typInstAcc.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/pages/typInstall/energieDetail.jsp</from-view-id>
<navigation-case>
<from-outcome>detailInst</from-outcome>
<to-view-id>/pages/typInstall/detailInst.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config> |
et pour terminer en beauté, le web.xml :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
| <?xml version="1.0"?>
<!--
* Copyright 2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>ecoinstadmin</display-name>
<context-param>
<description>State saving method: "client" or "server" (= default)
See JSF Specification 2.5.2</description>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<description>This parameter tells MyFaces if javascript code should be allowed in the
rendered HTML output.
If javascript is allowed, command_link anchors will have javascript code
that submits the corresponding form.
If javascript is not allowed, the state saving info and nested parameters
will be added as url parameters.
Default: "true"</description>
<param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<description>This parameter tells MyFaces if javascript code should be allowed in the
rendered HTML output.
If javascript is allowed, command_link anchors will have javascript code
that submits the corresponding form.
If javascript is not allowed, the state saving info and nested parameters
will be added as url parameters.
Default: "false"
Setting this param to true should be combined with STATE_SAVING_METHOD "server" for
best results.
This is an EXPERIMENTAL feature. You also have to enable the detector filter/filter mapping below to get
JavaScript detection working.</description>
<param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<description>If true, rendered HTML code will be formatted, so that it is "human readable".
i.e. additional line separators and whitespace will be written, that do not
influence the HTML code.
Default: "true"</description>
<param-name>org.apache.myfaces.PRETTY_HTML</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<description>If true, a javascript function will be rendered that is able to restore the
former vertical scroll on every request. Convenient feature if you have pages
with long lists and you do not want the browser page to always jump to the top
if you trigger a link or button action that stays on the same page.
Default: "false"</description>
<param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>ajax4jsf</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<!-- Extensions Filter -->
<filter>
<filter-name>MyFacesExtensionsFilter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
<init-param>
<description>Set the size limit for uploaded files.
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB</description>
<param-name>maxFileSize</param-name>
<param-value>20m</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.) -->
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<!-- Listener, that does all the startup work (configuration, init). -->
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
</web-app> |
Sérieusement, si quelqun a déjà eu le problème et qu'il a trouvé LA solution, je suis preneur!!
merci de votre aide ! ;)