Hi I'm really new in seam, I'm trying to create a page for display data from an entity like this:
BookEditManager.java
@Name("bookEditManager")
public class BookEditManager {
@In EntityManager entityManager;
@Logger Log log;
private Book book;
private Integer bookId;
@Create
public void initEditManager() {
log.info(this.bookId);
if (this.bookId != null){
this.book = entityManager.find(Book.class, this.bookId);
if (this.book == null){
throw new org.jboss.seam.framework.EntityNotFoundException(this.bookId, Book.class);
}
}else {
this.book = new Book();
}
}
and the page parameter
<param name="bookId" value="#{bookEditManager.bookId}"/>
When I request the url:
http://localhost:8080/libraryProject/book/BookEdit.seam?bookId=2
In the initEditManager the bookId parameter is null, my question is:
When the initEditManager method is called, the bookId property it already has the value taken from the page parameter?.
Which is the order of execution of this ?
1. Constructor.
2. Set page parameter.
3. Call method annotated with @Create.
Is this correct ?