-
1. Re: Richfaces 4 datatable in not rendering
liuliu Feb 24, 2014 3:08 AM (in response to kishi_kiran)hi,
I think you should start with some RF example project and check the defference, the jboss tool can generate one for you. I guess your probleme is in your web.xml.
-
2. Re: Richfaces 4 datatable in not rendering
kishi_kiran Feb 24, 2014 6:08 AM (in response to liuliu)Yes You are Right ,
I have removed this bit of configuration in WEB-INF as well as faces-config.xml file then i can able to see the datatable.
<context-param>
<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
</context-param>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
is it the correct on what I did?
Thank you .
-
3. Re: Richfaces 4 datatable in not rendering
ppitonak Feb 24, 2014 7:37 AM (in response to kishi_kiran)Hi,
yes, it's correct...these settings are not necessary anymore because facelets are default in JSF 2.
Pavol
-
4. Re: Richfaces 4 datatable in not rendering
kishi_kiran Feb 25, 2014 2:17 AM (in response to ppitonak)Thank You for your help,
Here after removing the 'FaceletViewHandler' in faces-config file I have got another errors like,
1. ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/logit4see].[Faces Servlet]] (http--127.0.0.1-8080-4) Servlet.service() for servlet Faces Servlet threw exception: java.lang.LinkageError: loader constraint violation: when resolving method "javax.faces.application.Application.createBehavior(Ljava/lang/String;)Ljavax/faces/component/behavior/Behavior;" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, org/richfaces/view/facelets/html/AjaxHandler, and the class loader (instance of org/jboss/modules/ModuleClassLoader) for resolved class, javax/faces/application/Application, have different Class objects for the type javax/faces/component/behavior/Behavior used in the signature.
2.One or more resources have the target of 'head', but no 'head' component has been defined within the view.
3. I have used c:if component in one of the page, its is also not working as expected.
what could be the problem here?
can some body help me on this.
-
5. Re: Richfaces 4 datatable in not rendering
liuliu Feb 25, 2014 3:09 AM (in response to kishi_kiran)hi,
1. You really need start with a clean RF4 project to check the configuration. probablely you have a jar conflit.
2. you should always have a head in the final JSF page.
3. c:if is still available. but it depends what you want, rendered is prefered.
-
6. Re: Richfaces 4 datatable in not rendering
ppitonak Feb 25, 2014 5:10 AM (in response to kishi_kiran)1. As liuliu wrote, check that you don't include mojarra/myfaces jar in your war.
2. You need to have h:head tag on your page or in your template.
-
7. Re: Richfaces 4 datatable in not rendering
kishi_kiran Feb 25, 2014 8:36 AM (in response to ppitonak)Thank you all,
yes Pavol,
2.after adding the h:head insetead of head in template.xhtml page all the styles are getting applied.
1.and i have have checked in libraries for majarra, i have already removed majarra_ext.tld from WEB-INF. still i am getting the linkage error,
one more thing i have html_basic.tld file in WEB-INF which is of version JSP1.2. is it causes any problem to that ? this one also i have removed still same linkage error.
and i am in the middle of migration so i cannot do it from scratch thats the problem i am facing.
-
8. Re: Richfaces 4 datatable in not rendering
ppitonak Feb 25, 2014 9:04 AM (in response to kishi_kiran)How do you manage your dependencies? Do you use Maven? There is no reason to have tld files in WEB-INF directly inside your war.
-
9. Re: Richfaces 4 datatable in not rendering
kishi_kiran Feb 25, 2014 12:15 PM (in response to ppitonak)Yes Pavol,
I am using Maven.
-
10. Re: Re: Richfaces 4 datatable in not rendering
ppitonak Feb 26, 2014 5:02 AM (in response to kishi_kiran)The best way for inluding RichFaces 4 to your Maven project is using BOM like this:
<project ...> ... <properties> <version.richfaces>4.3.5.Final</version.richfaces> </properties> <dependencyManagement> <dependencies> <dependency> <groupId>org.richfaces</groupId> <artifactId>richfaces-bom</artifactId> <version>${version.richfaces}</version> <scope>import</scope> <type>pom</type> </dependency> </dependencies> </dependecyManagement> <dependencies> <!-- Dependencies for RichFaces --> <dependency> <groupId>org.richfaces.ui</groupId> <artifactId>richfaces-components-ui</artifactId> </dependency> <dependency> <groupId>org.richfaces.core</groupId> <artifactId>richfaces-core-impl</artifactId> </dependency> </dependency> ... </dependencies> ... </project>
You can also check on of our examples richrates/pom.xml at 4.3.2.Final · ppitonak/richrates · GitHub
-
11. Re: Re: Richfaces 4 datatable in not rendering
kishi_kiran Feb 26, 2014 8:12 AM (in response to ppitonak)Yes I too have the same configuration in my main pom
<properties>
<richfaces.version>4.2.1.Final</richfaces.version>
</properties>
<dependencies>
<dependency>
<groupId>org.richfaces</groupId>
<artifactId>richfaces-bom</artifactId>
<version>${richfaces.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-components-api</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-components-ui</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-impl</artifactId>
<version>4.2.1.Final</version>
<scope>runtime</scope>
</dependency>
<dependencies>
I think it does not make any difference, is it any wrong here in my configuration ?
-
12. Re: Re: Richfaces 4 datatable in not rendering
ppitonak Feb 26, 2014 9:59 AM (in response to kishi_kiran)1. Which container do you deploy to?
2. What is in WEB-INF/lib inside your war?
-
13. Re: Re: Richfaces 4 datatable in not rendering
kishi_kiran Mar 17, 2014 7:49 AM (in response to ppitonak)Hi poval sorry for delayed reply,
I am using JBoss 7.1.1 Final.
here now the dataTable is working, like i have removed the all tlds from WEB-INF, removed view-handler in faces-config and maintain the h:head and h:body in template.xhtml page.
but when i am using a4:ajax (RF4.x) instead of a4j:support (RF3.x) again the same linkage error.
java.lang.LinkageError: loader constraint violation: when resolving method "javax.faces.application.Application.createBehavior(Ljava/lang/String;)Ljavax/faces/component/behavior/Behavior;" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, org/richfaces/view/facelets/html/AjaxHandler, and the class loader (instance of org/jboss/modules/ModuleClassLoader) for resolved class, javax/faces/application/Application, have different Class objects for the type javax/faces/component/behavior/Behavior used in the signature.
these are all the jar files which i have used in my ear/lib.
but inside UI war/WEB-INF i do not have any lib folder.
can you help me on this what could be the problem?
Thanks in Advance!
Kishi kiran.
-
14. Re: Re: Richfaces 4 datatable in not rendering
ppitonak Mar 18, 2014 9:41 AM (in response to kishi_kiran)Hi,
I think that it might be caused by jsf-api or jsf-impl in your ear/lib. First, try to remove these two jars. You also don't need jsf-facelets jar because Faceletes are default view declaration language in JSF 2.
I have few other suggestions for you:
- Upgrade you application to RichFaces 4.3.5.Final which contains several important bug fixes.
- Consider migrating from JBoss AS 7.1.1 to WildFly 8.0.0. JBoss AS is no longer developed and it was renamed to WildFly.
- There are many JEE jars which are provided to your application by application server, such as weld, jaxb, javax.inject, hibernate-entitymanager. You should depend on what applcation server provides you unless you have some special requirements.
- If you need EAR packaging of your application, have a look on one of WildFly's quickstarts quickstart/kitchensink-ear at master · wildfly/quickstart · GitHub
Pavol