There is code....
| @Name("requestAction") | @Stateful | @Restrict("#{identity.loggedIn}") | public class RequestAction implements RequestActionLocal, Serializable { | | .... | | .... | @ValidatedMethod(formName = "editForm", validators = { @CustomValidator(validatorClass = RequestSaveValidator.class, mapping = { "category", "requestType", | "request" }) }) | @End(beforeRedirect = true) | public String update() { | log.info("adding the request #0", request); | em.refresh(category); | em.refresh(requestType); | | if (!requestType.getRequests().contains(request)) { | requestType.getRequests().add(request); | } | request.setCategory(category); | request.setAuthor(loggedUser); | request.setCreated(new Date()); | request.setRequestType(requestType); | | em.persist(request); | em.flush(); | return DefaultActions.EDITED; | } | | @Begin(join = true, flushMode=FlushModeType.MANUAL) | public String loadDetail() { | edit(); | return DefaultActions.LOADED; | } | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4074291#4074291 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4074291 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user