-
1. Compatibility with Richfaces
ilya_shaikovsky Mar 3, 2011 2:53 AM (in response to geschtli)If you will look to demos and check the simple component like buttons usage - you will not find any difference in actions usage between 3 and 4 under JSF2. So you should probably try to discover sources of problem more(at least provide more info if want to get any help with your cases). I believe most of the problem for you lying in just configuration area.
P.S. http://community.jboss.org/polls/1053 - looks not bad?
-
2. Re: Compatibility with Richfaces
geschtli Mar 3, 2011 5:32 AM (in response to ilya_shaikovsky)Hi Ilya
I use very simple calls in my application.
A simple bean :
@Named
@SessionScoped
public class LoginBean
{
.........
public String getLogin()
{
// values from DB
if (.....)
return ok;
return not_ok;
}
........
And in my facelets
// address ..... h for html use
// address ..... rich for rich use (from richfaces 4)
// address ..... a4j for ajax use (from richfaces 4)
Example call in my login.xhtml:
<h:outputLabel .............
<h:inputText ...........
<h:commandButton action="#{loginBean.login}" value="Go" />
all runs ok, and i got the correct value from my bean
Now, changing to richfaces 4 with there libraries and if i call then
<a4j:commandButton action="#{loginBean.login}" value="Go" />
i got a MethodNotFoundException.
(My bean and the environment i have not changed).
In my faces-config.xml i have only my navigating rules
My environment is:
sun-jdk (j2ee) 1.6.24 (64 Bit)
JBoss 6 (64 Bit)
Eclipse Helios (64 bit) and Jboss-Tools
Firefox (64 Bit) (Minefield) for testing
JSF 2.0, JPA 2.0 and CDI (Weld 1.1.10)
I thing there must be another calling convention,
to call beans, or there is an error if i take richfaces 4
in the jboss environment??....???
-
3. Re: Compatibility with Richfaces
ilya_shaikovsky Mar 3, 2011 6:00 AM (in response to geschtli)1) which version of RF 4 used? (M?)
2) please show web.xml
-
4. Compatibility with Richfaces
geschtli Mar 3, 2011 7:00 AM (in response to ilya_shaikovsky)Hi Ilya
I use M6
Here is my web.xml :
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>mytest</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<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>*.xhtml</url-pattern>
</servlet-mapping>
<!--
<filter>
<filter-name>MyFacesExtensionsFilter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
<init-param>
<param-name>uploadMaxFileSize</param-name> -->
<!-- Set the size limit for uploaded files
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB -->
<!--
<param-value>20m</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping> -->
<context-param>
<param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
<param-value>true</param-value>
</context-param>
</web-app>
-
5. Re: Compatibility with Richfaces
geschtli Mar 4, 2011 5:11 AM (in response to geschtli)Hi Ilya
Now i have changed my funktion name from login() to getLogin().
Also i have putted in faces-config.xml
following text:
<managed-bean>
<managed-bean-name>loginBean</managed-bean-name>
<managed-bean-class>com.mytest.session.LoginBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>login</property-name>
<value>fail</value>
</managed-property>
</managed-bean>
(With CDI, i use cdi-annotations, so i must normaly not set
managed beans in the faces-config.xml)
But now, my example starts without an exception.
But the button cannot be seen.There is no button.Strange!!!
Does i overseen something??
My Page is :
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">
<h:form>
<h:outputText value="#{msg.name}" />
<h:inputText value="#{loginBean.alias}" required="true" />
<h:outputText value="#{msg.pwd}" />
<h:inputSecret value="#{loginBean.password}" required="true" />
<a4j:commandButton value="GO" action="#{loginBean.login}" />
</h:form>
</ui:composition>
At last, i see this,
.... <a4j:commandButton value="GO" action="loginFail"></a4j:commandButton>...
the original richfaces/ajax-command in the Client-Browser.
It ist not correct interpreted/rendererd on the server.
Perhaps there is a chance, that richfaces code cannot be correct interpreted
with jboss 6 or an 64 Bit environment???