Bonjour,

je suis en train de faire un tuto sur JSF :
http://schmitt.developpez.com/tutori.../introduction/

et au chapitre 8.2 Exemple d'utilisation du binding j'ai cette erreur :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
 
java.lang.NullPointerException
        at javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:325)
        at javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:337)
        at javax.faces.component.UIData.setRowIndex(UIData.java:276)
        at org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase.encodeInnerHtml(HtmlTableRendererBase.java:293
)
        at org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase.encodeChildren(HtmlTableRendererBase.java:137)
 
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:543)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:239)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:246)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:246)
        at org.apache.myfaces.application.jsp.JspViewHandlerImpl.actuallyRenderView(JspViewHandlerImpl.java:423)
        at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:380)
        at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
        at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:364)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:219)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:786)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:431)
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:113)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:325)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:533)
        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:870)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:657)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:391)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:421)
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:497)
en cliquant sur :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 
<html:commandButton value="Supprimer les clients" action="#{bank.removeSelectedCustomers}" />
Voici le code de la methode :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
public void removeSelectedCustomers() {
		System.out.println("Customers 1 : "  + this.customers.size());
		int size = this.dataTable.getRowCount();
		List selectedCustomers = new ArrayList();
		for (int i = 0; i < size; i++) {
			this.dataTable.setRowIndex(i);
			if (this.checkbox.isSelected()) {
				selectedCustomers.add(this.customers.get(i));
			}
		}
		this.customers.removeAll(selectedCustomers);
		System.out.println("Customers 2 : "  + this.customers.size());
	}
Du coup ayant suivi le tuto a la lettre enfin j'espère je vais revérifier, je pige pas trop ce qui m'arrive ...

merci d'avance