Visualizzazione dei risultati da 1 a 5 su 5
  1. #1

    [JSF] Problema con tag - Myfaces

    Sono alle prime armi con Myfaces, ho seguito la vostra guida:Primi passi e tutto ok...
    Poi ho provato a fare il Progetto Gestione Esame , ma ho un problema, mi da questo errore
    codice:
    /esame.jsp (line: 56, column: 5) No tag "setPropertyActionListener" defined in tag library imported 
    with prefix "f"
     
    Caused by: org.apache.jasper.JasperException - /esame.jsp (line: 56, column: 
    5) No tag "setPropertyActionListener" defined in tag library imported with prefix "f"
    Non riesco a capire perchè non riconosca solo quel tag. Qualche consiglio?

  2. #2
    Utente di HTML.it
    Registrato dal
    Feb 2007
    Messaggi
    4,157
    l'errore è alquanto parlante: non trova nella libreria che tu hai specificato un simbolo.
    non ho visto l'esempio, ma:

    1. posti l'header di questo file?
    2. quali librerie usi?
    3. environment?
    RTFM Read That F*** Manual!!!

  3. #3
    Uso "Eclipse for Java EE Developer" con tomcat 7.0
    le librerie le puoi vedere qua verso fine pagina.

    Questa è la pagina esame.jsp

    codice:
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
    <%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>  
    <%@ taglib prefix="c"  uri="http://java.sun.com/jstl/core"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Gestione Esame</title>
    </head>
    <body>
    	<f:view>
      
    		<h:form>
    			<h:inputText value="#{studenteBean.nome}" required="true"  />
    
    			<h:inputText value="#{studenteBean.cognome}" required="true"  ></h:inputText>
    
    			<h:inputText value="#{studenteBean.voto}" required="true"  ></h:inputText>
    
    			<h:commandButton action="#{esameController.addStudente}" value="Inserisci"/>
    		</h:form>
    
    		<h:form>
    			PROMOSSI  
    			<h:dataTable value="#{esameController.elencoPromossi.studenti}" var="studente" border="1" >
    				<h:column>
    					<f:facet name="header">
    						<h:column>
    							<h:outputText value="Studenti"></h:outputText>
    						</h:column>
    					</f:facet>
    					<h:outputText value="#{studente.nome} #{studente.cognome}"></h:outputText>
    				</h:column>
    
    				<h:column>
    					
    					<f:facet name="header">
    						<h:column>
    							<h:outputText value="Voto"></h:outputText>
    						</h:column>
    					</f:facet>
    					
    					<h:outputText value="#{studente.voto}"></h:outputText>
    				</h:column>
    
    				<h:column>
    					
    					<f:facet name="header">
    						<h:column>
    							<h:outputText value="Rimuovi"></h:outputText>
    						</h:column>
    					</f:facet>
    					
    					<h:commandButton action="#{esameController.removeStudente}" value="X">
    					<f:setPropertyActionListener target="#{esameController.studente}"
    							value="#{studente}" />
    					</h:commandButton>
    				</h:column>
    			</h:dataTable>
    		</h:form>
    
    		<h:form>
    			BOCCIATI
    			<h:dataTable value="#{esameController.elencoBocciati.studenti}" var="studente" border="1" >
    				<h:column>
    					
    					<f:facet name="header">
    						<h:column>
    							<h:outputText value="Studenti"></h:outputText>
    						</h:column>
    					</f:facet>
    					
    					<h:outputText value="#{studente.nome} #{studente.cognome}"></h:outputText>
    				</h:column>
    
    				<h:column>
    					
    					<f:facet name="header"> 
    						<h:column>
    							<h:outputText value="Voto"></h:outputText>
    						</h:column>
    					</f:facet>
    					
    					<h:outputText value="#{studente.voto}"></h:outputText>
    				</h:column>
    
    				<h:column>
    					
    					<f:facet name="header">
    						<h:column>
    							<h:outputText value="Rimuovi"></h:outputText>
    						</h:column>
    					</f:facet>
    					
    					<h:commandButton action="#{esameController.removeStudente}" value="X">
    					<f:setPropertyActionListener target="#{esameController.studente}"
    							value="#{studente}" />
    					</h:commandButton>
    				</h:column>
    			</h:dataTable>
    		</h:form>
    	</f:view>
    </body>
    </html>

  4. #4
    Utente di HTML.it
    Registrato dal
    Feb 2007
    Messaggi
    4,157
    non voglio il link, mi puoi dire tu la versione delle lib che usi?

    in ogni caso prova a guardare questo supporto qui il principio è generale, secondo me hai versioni sballate o vecchiotte di jsf
    RTFM Read That F*** Manual!!!

  5. #5
    Originariamente inviato da valia
    in ogni caso prova a guardare questo supporto qui il principio è generale, secondo me hai versioni sballate o vecchiotte di jsf
    "hit and sunk" [cit.]

    Grazie mille, risolto.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.