Author: nbelaevski
Date: 2010-06-11 09:47:47 -0400 (Fri, 11 Jun 2010)
New Revision: 17611
Modified:
root/archetypes/richfaces-archetype-simpleapp/trunk/src/main/resources/archetype-resources/src/main/java/RichBean.java
root/archetypes/richfaces-archetype-simpleapp/trunk/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
Log:
Archetype updated due to the problem covered by
https://jira.jboss.org/browse/RF-8763:
bean annotations converted into faces-config.xml declaration
Modified:
root/archetypes/richfaces-archetype-simpleapp/trunk/src/main/resources/archetype-resources/src/main/java/RichBean.java
===================================================================
---
root/archetypes/richfaces-archetype-simpleapp/trunk/src/main/resources/archetype-resources/src/main/java/RichBean.java 2010-06-11
13:30:52 UTC (rev 17610)
+++
root/archetypes/richfaces-archetype-simpleapp/trunk/src/main/resources/archetype-resources/src/main/java/RichBean.java 2010-06-11
13:47:47 UTC (rev 17611)
@@ -5,28 +5,21 @@
import java.io.Serializable;
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-@ManagedBean
-@ViewScoped
public class RichBean implements Serializable {
private static final long serialVersionUID = -2403138958014741653L;
private Logger logger;
private String name;
- @PostConstruct
- public void initialize() {
+ public RichBean() {
logger = LoggerFactory.getLogger(RichBean.class);
logger.info("post construct: initialize");
name = "John";
}
-
+
public String getName() {
return name;
}
Modified:
root/archetypes/richfaces-archetype-simpleapp/trunk/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
root/archetypes/richfaces-archetype-simpleapp/trunk/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml 2010-06-11
13:30:52 UTC (rev 17610)
+++
root/archetypes/richfaces-archetype-simpleapp/trunk/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml 2010-06-11
13:47:47 UTC (rev 17611)
@@ -2,4 +2,14 @@
<faces-config version="2.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xi="http://www.w3.org/2001/XInclude"
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-facesconfig_2_0.xsd">
+ <!--
+ This is a workaround for JBoss AS 6 currently not processing JSF annotations.
+ TODO: review and revert back to annotations.
+ -->
+ <managed-bean>
+ <managed-bean-name>richBean</managed-bean-name>
+ <managed-bean-class>${package}.RichBean</managed-bean-class>
+ <managed-bean-scope>view</managed-bean-scope>
+ </managed-bean>
+
</faces-config>