[JBoss Seam] - Action method + outcome
by kabal
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#4110399
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4110399
18 years, 4 months
[JBoss Seam] - Re: Remoting periodic exception.
by shane.bryzak@jboss.com
The request packet looks well-formed and complete, it's not clear why the exception is being thrown. Just to try something different, I've wrapped the request's InputStream in an InputStreamReader for the parsing of the xml. You can try this in the latest CVS version.
"samdoyle" wrote :
| Some questions though.
|
| 1.) Why are each of the response packets incrementing in conversation id?
| 2.) Why do sometimes when I make a request it appears I get pack an empty response followed by a valid response?
|
1. Unless you explicitly set the conversation ID yourself (see the remoting docs) then whatever conversation ID is current at the end of the request will be sent back in the remoting response.
2. I've never seen anything like this, could you give me an example?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4110392#4110392
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4110392
18 years, 4 months