  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | - Update example: how to do ? | - Update example: how to do ? 2007-06-13 - By miloslav.vlach
Back How to create edit action ? I am using the page parameter and call method load (in edit.page.xml file). But when push Update button the viewArtcile doesn't contain all of the loaded attributes. The Account is not set for example....
How to create update action ?
Thanks Mila
| @(protected)("articleEditAction") | public class ArticleEditAction { | | @(protected) | Session ses; | | @(protected) | ViewArticle viewArticle; | | @(protected) | Log log; | | @(protected)(create = true) | Configuration configuration; | | @(protected) | public String save() { | log.info("saving the article: #0", viewArticle); | | // article doesn't contains all attributes loaded in method load() | ses.update(viewArticle); | | | return "success"; | } | | @(protected) | public String load(Long id) { | viewArticle = (ViewArticle) ses.load(ViewArticle.class, id); | log.info("loaded article for edit: #0", viewArticle); | return null; | } | | @(protected) | @(protected) | public void remove() { | log.info("deleting object articleEditAction"); | } |
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic &p=4053846#4053846
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode =reply&p=4053846 __ ____ ____ ____ ____ ____ ____ ____ ____ ____ jboss-user mailing list jboss-user@(protected) https://lists.jboss.org/mailman/listinfo/jboss-user
|
|
 |