-
1. Re: problems with commandButton, commandLink don't work
nimzo May 30, 2011 10:06 AM (in response to nimzo)My configuration is: Richfaces 4.0, JSF 2.0 , it is necessary configure web.xml or faces-config.xml to work with ajax4jsf? I think that it is not necessary.
-
2. Re: problems with commandButton, commandLink don't work
snaker May 30, 2011 11:08 AM (in response to nimzo)can you put your code???
-
3. Re: problems with commandButton, commandLink don't work
nimzo May 30, 2011 11:20 AM (in response to snaker)Yes, my friend. This is the simple code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
h:outputStylesheet
>
.outhello {
font-weight: bold;
}
</
h:outputStylesheet
>
<
h:form
>
<
h:panelGrid
columns
=
"3"
>
<
h:outputText
value
=
"Name:"
/>
<
h:inputText
value
=
"#{userBean.name}"
/>
<
a4j:commandLink
value
=
"Say Hello"
render
=
"out"
execute
=
"@form"
/>
</
h:panelGrid
>
</
h:form
>
<
br
/>
<
a4j:outputPanel
id
=
"out"
>
<
h:outputText
value
=
"Hello #{userBean.name} !"
styleClass
=
"outhello"
/>
</
a4j:outputPanel
>
</
ui:composition
>
It is from the page: http://richfaces-showcase.appspot.com/richfaces/component-sample.jsf?demo=commandLink&skin=blueSky
I'll be grateful if you can help me.Thank you. -
4. Re: problems with commandButton, commandLink don't work
snaker May 30, 2011 11:33 AM (in response to nimzo)i have tested your code an works fine, so, the problem is not the link.
it seems some configuration with web.xml or the server glassfish i dont know
search in goole with this "http status 404 the requested resource is not available", maybe you see something
-
5. Re: problems with commandButton, commandLink don't work
nbelaevski May 30, 2011 1:07 PM (in response to nimzo)Hi David,
Does h:commandLink work in your case?
-
6. Re: problems with commandButton, commandLink don't work
snaker May 30, 2011 1:11 PM (in response to nbelaevski)yes, your code works fine in my form
-
7. Re: problems with commandButton, commandLink don't work
snaker May 30, 2011 1:13 PM (in response to snaker)sorry i think the message was for me
-
8. Re: problems with commandButton, commandLink don't work
nimzo May 31, 2011 7:49 AM (in response to snaker)yes, h:commandLink works ok. The problem is because I have MVC with Spring. JSF works ok, but when I use Richfaces 4, JSF 2.0 with Spring MVC don't work. I think the problem can be the web.xml. This is my xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.5" 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_2_5.xsd">
<display-name>JavaServerFaces</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:META-INF/spring_security/applicationContext-security.xml
</param-value>
</context-param>
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>SIPEC.root</param-value>
</context-param>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:log4j.properties</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
</context-param>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.skin</param-name>
<param-value>deepMarine</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.enableControlSkinning</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<filter>
<filter-name>encoding-filter</filter-name>
<filter-class>
org.springframework.web.filter.CharacterEncodingFilter
</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter>
<filter-name>springSecurityFilterCert</filter-name>
<filter-class>es.mde.sipec.security.filter.X509SecurityFilter</filter-class>
</filter>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>encoding-filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>springSecurityFilterCert</filter-name>
<url-pattern>/inicio.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>*.htm</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/j_spring_security_check</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/j_spring_security_logout</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<listener>
<listener-class>
org.springframework.web.context.request.RequestContextListener
</listener-class>
</listener>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class>
</listener>
<servlet>
<servlet-name>SIPECGestionMVC</servlet-name>
<servlet-class>es.mde.sipec.gestion.dispatcher.DispatcherSipec</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:META-INF/spring_mvc/SIPECGestionMVC-servlet.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>es.mde.sipec.gestion.dispatcher.DispatcherSipec</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:META-INF/spring_mvc/SIPECGestionJSF-servlet.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>Faces Servlet2</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>SIPECGestionMVC</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SIPECGestionMVC</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<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>
<servlet-mapping>
<servlet-name>Faces Servlet2
</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.pp</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>loginForm.jsp</welcome-file>
</welcome-file-list>
</web-app>Can you see something in this ?
Thank you!
-
9. Re: problems with commandButton, commandLink don't work
ilya_shaikovsky Jun 13, 2011 10:23 AM (in response to nimzo)at first while using RF 4.0 - you should not define any filters in web.xml