Bibliotecas a4j e richfaces

6 respostas
E

ola gostaria de saber se alguem pode me ajuda estou com probelmas co a biblioteca richfaces e a a4j

nao estou conseguindo usa-las
alguem sabe onde posso baixa-las

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1[url]-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:a4j="http://richfaces.org/a4j" 
                xmlns:rich="http://richfaces.org/rich">  
    <h:outputStylesheet name="color">     
        .red {         color: red;         } 
        .green {         color: green;         } 
    </h:outputStylesheet> 
    <h:form>    
        <rich:graphValidator value="#{passwordValidationBean}" id="gv"> 
            <rich:panel header="Change password" style="width:500px"> 
                <rich:messages for="gv" />     
                <rich:messages globalOnly="true" />  
                <h:panelGrid columns="3">       
                    <h:outputText value="Enter new password:" /> 
                    <h:inputSecret value="#{passwordValidationBean.password}" id="pass" />
                    <rich:message for="pass" />         
                    <h:outputText value="Confirm the new password:" />   
                    <h:inputSecret value="#{passwordValidationBean.confirm}" id="conf" />  
                    <rich:message for="conf" />     
                </h:panelGrid>           
                <a4j:commandButton value="Store changes" action="#{passwordValidationBean.storeNewPassword}" /> 
            </rich:panel>   
        </rich:graphValidator> 
    </h:form>
</ui:composition>
    </h:body>
</html>

6 Respostas

R

Se o problema é só baixar pode ir direto no site deles:

http://www.jboss.org/richfaces/download

O que você quer provavelmente está no link Stable Builds

E

ja baixei e instalei as bibliotecas mesmo assim na estou conseguindo usar o a4j e o richfaces

R

O que você quer dizer quando diz que não consegue usar?

O componente não é renderizado? algum comportamento “estranho”? Alguma exceção lançada?

E

o programa nao reconhe

nao pede a importaçao de outra biblioteca mas tambem nao me deixa usar esse comandos
só esta me permitindo usar desta forma

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html">
    
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
       <ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">
      
                   
       
            
           <h:panelGrid columns="2">
            <f:facet name="header">
                <h:outputText value="cadastrar funcionario"/>
            </f:facet>
            
            <h:form>
                <h:panelGrid columns="3">
                    <h:outputText value="Nome:" />
                    <h:inputText label="Nome" id="name" required="true" value="#{userBean.name}">
                        <f:validateLength minimum="3"  />
                    </h:inputText>
                    <h:message for="name">
                        <f:facet name="errorMarker">
                            <h:graphicImage value="/images/ajax/error.gif" />   
                        </f:facet>
                    </h:message>
                    
                    <h:outputText value="cargo:" />
                    <h:inputText label="cargo" id="job" required="true" value="#{userBean.job}">
                        <f:validateLength minimum="3" maximum="50"  />
                    </h:inputText>
                    <h:message for="job">
                        <f:facet name="errorMarker">
                            <h:graphicImage  value="/images/ajax/error.gif" />  
                        </f:facet>
                    </h:message>
                   
                    <f:facet name="footer">
                        <h:commandButton value="cadastrar" />
                    </f:facet>
                </h:panelGrid>
            </h:form>
           </h:panelGrid>
    
    
</ui:composition> 
    </h:body>
</html>
R

Você quer dizer que ele não funciona? Ou que a IDE não autocompleta as tags pra você?

Se for o primeiro, poste seu web.xml, e veja se todos os jars necessários realmente estão la.

Se for o segundo, você pode baixar o JBossTools.

E
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
    </context-param>
    <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>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>faces/index.xhtml</welcome-file>
    </welcome-file-list>
</web-app>
Criado 19 de junho de 2012
Ultima resposta 19 de jun. de 2012
Respostas 6
Participantes 2