[jboss-user] [JBoss Seam] - Re: JSF/Seam Binding and Nested Classes
You are ABSOLUTELY RIGHT. I am never creating daughter, I have just a reference. My code should be: | @Entity | @Name("mother") | public class Mother { | |private Daughter daughter = new Daughter(); | |... setters and getters | } | When poor old Seam tried to set the values for daugher it found no target object. Thank you very very much. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121541#4121541 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121541 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: JSF/Seam Binding and Nested Classes
In the first code snippet please ignore the annotation @Stateful. It is just a typo (it s not in my code). My code is just: | @Entity | @Name("mother") | public class Mother { | |private Daughter daughter; | |... setters and getters | } | I found a workaround defining Daughter as a Seam component: | @Name("daughter") | public class Daughter { | | private String someprop; | | ... setters and getters | | } | and then using it as a separate component and asociating it with mother in Java: I mean instad of using: | | I use: | | and then in the action bean: | | @Stateful | public class ActionBean { | | |@In |private Mother mother; | |@In |private Daughter daughter; | |public void persistMother () { | | mother.setDaughter(daughter); | | em.persist (daughter); | |} | | | } | It is not elegant but at least it works. Nevertheless I would like to know if there is any bug in the Expression Language interpreter or if I am doing something wrong. Accortding to JSF specification the first sintax I mention should work. any comments? Thanks in advnace. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121528#4121528 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121528 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: JSF/Seam Binding and Nested Classes
Could you find the answer? I am stuck with the same problem. Just in case the problem is not clear: | @Stateful | @Entity | @Name("mother") | public class Mother { | |private Daughter daughter; | |... setters and getters | } | | and the nested class is: | public class Daughter { | | private String someprop; | | ... setters and getters | | } | | When I try to put something in daughters property someprop | | the contents of the html field are not transfered to someprop and any action invoked from the page is not even executed. It seems that the lifecycle ends when the framework tries to transfer values from the request to the properties inside the object inside the EJB. I am using seam 1.2.1 and quite desperated. Thaks in advance. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121467#4121467 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121467 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: changes on @In injected properties with BUSINESS_PROCESS
Sorry for double posting (desperation superseded manners). I have been trying different approaches for thee days. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054996#4054996 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054996 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Business process variables duplicted when updated.
Thank you Gavin for your PROMPT (yes in capitals :-) ) response. I would like to verify if I am interpreting the right way what´s going on. Here is a snippet from my code: @Stateful @Name("verifyData") public class verificarDatosBean implements verificarDatos { @In @Out(scope=ScopeType.BUSINESS_PROCESS, required=false) @EndTask public String saveModifiedData() { return "/home.seam"; } @Remove @Destroy public void destroy(){} public String getUnDato() { return unDato; } public void setUnDato(String unDato) { this.unDato = unDato; } } 1. When seam finds: @In private String unDato; injects the the BUSSINESS_PROCESS variable unDato. (The variable was already created elsewere with BUSSINESS_PROCESS scope AND I already called a method annotated with @StartTask, so I am inside a BUSSINESS_PROCESS) 2. As soon as any method inside the object is executed (I think in my case it is the getter because this EJB is acting as a Backing Bean) Seams finds: private String unDato; @Out(scope=ScopeType.BUSINESS_PROCESS, required=false) and creates the new variable with the same name (unDato) and scope (unDato) but with different Id. 3. When I execute: @EndTask public String saveModifiedData() Seam sees that the task is completed and updates the original variable. Forgive my verbosity but I want to be sure I am conceptually right. (So I learn once for good) Claudio View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054995#4054995 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054995 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: changes on @In injected properties with BUSINESS_PROCESS
Hi koenhandekyn I noticed almost the same behavior but, in my case, the variable gets duplicated. What I mean is that after executing a method in the class I end up with TWO variables with the same name (in your case invoice), one containing the new value and the new one (also called invoice but with a higher Id) containing the same value of the original invoice. Have you seen something like that? Thanks in advance, Claudio View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054979#4054979 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054979 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Business process variables duplicted when updated.
Hi all! I am trying to update JBPM business process variables using Seam annotations. I noticed the following behavior: When I use: @In @Out private String unDato; my class retrieves the variable but the modifications do not get persisted when I call the @EndTask annotated function (the last one before destroying the class) When I use: @In @Out(scope=ScopeType.BUSINESS_PROCESS, required=false) private String unDato; my class also retrieves the variables but as soon as the class gets created a new variable with the same name (unDato) and value is created in the database (jbpm_variableinstance). When I leave the class and finish the task, The old variable is updated correctly but the new "ghost" variable remains in the DB (with the original value). I found a workaround by updating variables "by hand": instead of using @Out I use: Contexts.getBusinessProcessContext().set("unDato", unDato); This way I do what I need: just modify the content of the original value. Im I doing something wrong in the way I am trying to use annotations? Thanks in advance, Claudio View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054978#4054978 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054978 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Seam Registration Example - trouble with Hibernate Valid
Just in case somebody finds the same problem: following chopin and Gavin King´s suggestions I tried version 1.1.6 and everything works fine. There are a couple differences between Registration versions (a couple tags missing and declaring Log as static) that are not related with the validation problem. The main problem is that jboss-seam-registration.war generated by version 1.1.0 does not contain jboss-seam-ui.jar in WEB-INF directoy. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022669#4022669 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022669 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation issue in adapted Registration example
Following your comments I made a few more tests using the same JBoss installation and Seam 1.1.6: Everything workd fine. There are a couple differences between Registration versions (a couple tags missing and declaring Log as static) that are not related with the validation problem. The main problem is that jboss-seam-registration.war generated by version 1.1.0 does not contain jboss-seam-ui.jar in WEB-INF directoy. Thanks a lot gentlemen! View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022665#4022665 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022665 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation issue in adapted Registration example
Do validations work in the original example? I hava a rather similar problem: if data is OK it´s made persistent without problems. I data is invalid (for Hibernate Validators rules), instad of getting error messages the application throws an exception (wich is sent to the client). I`ve tried version 1.1.0 with JBoss installed by means of JEMS installer 1.2.0.BETA3. Tomorrow I´ll try 1.1.6 but I´m not very comfident because source codes are almost identical. Best regards. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021853#4021853 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021853 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Seam Registration Example - trouble with Hibernate Validator
Hi all, I?m trying to learn Seam by following the tutorial. I followed installation instructions (http://labs.jboss.com/portal/jbossseam/gettingstarted) thoroughly and everything went on seamlessly (pun intended :-)). Registration example is working OK, EXCEPT when data don?t pass Hibernate Validator validation. If I don?t misunderstand it is supposed to redisplay the original page. Instead of that I?m getting an ugly: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Error calling action method of component with id _idJsp0:_idJsp4 javax.faces.webapp.FacesServlet.service(FacesServlet.java:152) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) root cause javax.faces.FacesException: Error calling action method of component with id _idJsp0:_idJsp4 org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74) javax.faces.component.UICommand.broadcast(UICommand.java:106) javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94) javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168) org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343) org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86) javax.faces.webapp.FacesServlet.service(FacesServlet.java:137) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs. Validators ARE exacuted but I guess somebody (¿Seam?) is not catching the exception and directing JSF to the previous page to show the error messages. Instead of that the exception is being sent back to the client (b!!!) I know there are more interesting examples but I would like to understand what am I doing wrong. I´ve been googling the whole afternoon but nobody seems to have noticed such behavior. Any clues will be VERY wellcome. Thanks in advance, View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021847#4021847 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021847 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user