[jboss-user] [JBoss Seam] - Re: Add/Edit Page
mrwhite
do-not-reply at jboss.com
Wed Jul 19 08:15:26 EDT 2006
Lets take the blog example.
I have my BlogService thats hast the following code:
| @RequestParameter("blogEntryId")
| private String blogEntryId;
|
| @In(required=false)
| @Valid
| private BlogEntry newBlogEntry;
|
| @Factory("newBlogEntry")
| public void createBlogEntry()
| {
| if(blogEntryId != null)
| {
| newBlogEntry = get Blog by ID ...
| }
| else newBlogEntry = new BlogEntry();
| }
|
| public String saveEntry()
| {
| em.persist(newBlogEntry);
| return "home";
| }
|
The action is always: action="#{blogService.saveEntry}"
Is that the right way to solve this?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959103#3959103
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959103
More information about the jboss-user
mailing list