Typically the outcome of an "Action Method" is definite in either
faces-config.xml or navigation.xml.
What if you want the outcome to be an actually .XHTML URI, instead of a String constant
that refers to an view definite in the configuration file?
For instance (code from Seam tutorial)
| public String register()
(5)
| {
| List existing = em.createQuery(
| "select username from User where username=#{user.username}")
(6)
| .getResultList();
|
| if (existing.size()==0)
| {
| em.persist(user);
| log.info("Registered new user #{user.username}");
(7)
| return "/registered.xhtml";
(8)
| }
| else
| {
| FacesMessages.instance().add("User #{user.username} already
exists"); (9)
| return null;
| }
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4110399#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...