Re: [Rife-users] exit after form submission
Hi Henk, if you don't use the named input bean, RIFE doesn't automatically add the prefix you used for the bean properties. You can however specify the prefix yourself in the getInputBean method. Hope this helps, Geert On 07 Nov 2006, at 14:05, Henk wrote: Hi Geert, it turned out I needed to use get*NAMED*InputBean instead of getInputBean. Not sure when I can use the named or the plain one though. Thanks Henk Geert Bevin wrote: Hi Henk, can you also provide the implementation of the bean? A minimal standalone testcase that I can run would be very handy indeed. Best regards, Geert On 02 Nov 2006, at 13:06, Henk wrote: This is the first element : prefix="subm_"/> this is the second : prefix="subm_"/> and this is how they are linked : destinbean="trackformbean" /> The NewTrackFormElement : public void processElement() throws EngineException { TrackSubmissionBean bean = (TrackSubmissionBean) getInputBean(TrackSubmissionBean.class,"trackformbean"); System.out.println(bean.getBand_id()); } the bean is emtpy. I will try a standalone testcase. thanks Henk Emmanuel Okyere wrote: How do you know the outputbean is not being set? How does your site structure look like? Do you have a test case? Cheers, Emmanuel On 11/1/06, Henk <[EMAIL PROTECTED]> wrote: Hi, I have a form handled by element1, after a successful submission the results have to be handled by element2. I have this code in element1 : TrackSubmissionBean trackBean = (TrackSubmissionBean)getSubmissionBean(TrackSubmissionBean.class); if (trackBean != null) { Validated val = (Validated)trackBean; if (val.validate()) { setOutputBean(trackBean,"trackformbean"); exit("element2"); } else { Set errors = val.getValidationErrors(); ValidationBuilderXhtml builder = new ValidationBuilderXhtml(); builder.generateErrorMarkings(templ, errors, null, null); } } Apparently, the exit to element2 does not receive the output bean values. Is there another way I need to follow ? Thanks Henkl ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users -- Geert Bevin Uwyn "Use what you need" - http://uwyn.com RIFE Java application framework - http://rifers.org Music and words - http://gbevin.com ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users -- Geert Bevin Uwyn "Use what you need" - http://uwyn.com RIFE Java application framework - http://rifers.org Music and words - http://gbevin.com ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] exit after form submission
Hi Geert, it turned out I needed to use get*NAMED*InputBean instead of getInputBean. Not sure when I can use the named or the plain one though. Thanks Henk Geert Bevin wrote: Hi Henk, can you also provide the implementation of the bean? A minimal standalone testcase that I can run would be very handy indeed. Best regards, Geert On 02 Nov 2006, at 13:06, Henk wrote: This is the first element : prefix="subm_"/> this is the second : prefix="subm_"/> and this is how they are linked : destinbean="trackformbean" /> url="/newtrackform" /> The NewTrackFormElement : public void processElement() throws EngineException { TrackSubmissionBean bean = (TrackSubmissionBean)getInputBean(TrackSubmissionBean.class,"trackformbean"); System.out.println(bean.getBand_id()); } the bean is emtpy. I will try a standalone testcase. thanks Henk Emmanuel Okyere wrote: How do you know the outputbean is not being set? How does your site structure look like? Do you have a test case? Cheers, Emmanuel On 11/1/06, Henk <[EMAIL PROTECTED]> wrote: Hi, I have a form handled by element1, after a successful submission the results have to be handled by element2. I have this code in element1 : TrackSubmissionBean trackBean = (TrackSubmissionBean)getSubmissionBean(TrackSubmissionBean.class); if (trackBean != null) { Validated val = (Validated)trackBean; if (val.validate()) { setOutputBean(trackBean,"trackformbean"); exit("element2"); } else { Set errors = val.getValidationErrors(); ValidationBuilderXhtml builder = new ValidationBuilderXhtml(); builder.generateErrorMarkings(templ, errors, null, null); } } Apparently, the exit to element2 does not receive the output bean values. Is there another way I need to follow ? Thanks Henkl ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users -- Geert Bevin Uwyn "Use what you need" - http://uwyn.com RIFE Java application framework - http://rifers.org Music and words - http://gbevin.com ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] exit after form submission
Hi Henk, can you also provide the implementation of the bean? A minimal standalone testcase that I can run would be very handy indeed. Best regards, Geert On 02 Nov 2006, at 13:06, Henk wrote: This is the first element : prefix="subm_"/> this is the second : prefix="subm_"/> and this is how they are linked : destinbean="trackformbean" /> The NewTrackFormElement : public void processElement() throws EngineException { TrackSubmissionBean bean = (TrackSubmissionBean)getInputBean (TrackSubmissionBean.class,"trackformbean"); System.out.println(bean.getBand_id()); } the bean is emtpy. I will try a standalone testcase. thanks Henk Emmanuel Okyere wrote: How do you know the outputbean is not being set? How does your site structure look like? Do you have a test case? Cheers, Emmanuel On 11/1/06, Henk <[EMAIL PROTECTED]> wrote: Hi, I have a form handled by element1, after a successful submission the results have to be handled by element2. I have this code in element1 : TrackSubmissionBean trackBean = (TrackSubmissionBean)getSubmissionBean(TrackSubmissionBean.class); if (trackBean != null) { Validated val = (Validated)trackBean; if (val.validate()) { setOutputBean(trackBean,"trackformbean"); exit("element2"); } else { Set errors = val.getValidationErrors(); ValidationBuilderXhtml builder = new ValidationBuilderXhtml(); builder.generateErrorMarkings(templ, errors, null, null); } } Apparently, the exit to element2 does not receive the output bean values. Is there another way I need to follow ? Thanks Henkl ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users -- Geert Bevin Uwyn "Use what you need" - http://uwyn.com RIFE Java application framework - http://rifers.org Music and words - http://gbevin.com ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] exit after form submission
This is the first element : prefix="subm_"/> this is the second : prefix="subm_"/> and this is how they are linked : destinbean="trackformbean" /> The NewTrackFormElement : public void processElement() throws EngineException { TrackSubmissionBean bean = (TrackSubmissionBean)getInputBean(TrackSubmissionBean.class,"trackformbean"); System.out.println(bean.getBand_id()); } the bean is emtpy. I will try a standalone testcase. thanks Henk Emmanuel Okyere wrote: How do you know the outputbean is not being set? How does your site structure look like? Do you have a test case? Cheers, Emmanuel On 11/1/06, Henk <[EMAIL PROTECTED]> wrote: Hi, I have a form handled by element1, after a successful submission the results have to be handled by element2. I have this code in element1 : TrackSubmissionBean trackBean = (TrackSubmissionBean)getSubmissionBean(TrackSubmissionBean.class); if (trackBean != null) { Validated val = (Validated)trackBean; if (val.validate()) { setOutputBean(trackBean,"trackformbean"); exit("element2"); } else { Set errors = val.getValidationErrors(); ValidationBuilderXhtml builder = new ValidationBuilderXhtml(); builder.generateErrorMarkings(templ, errors, null, null); } } Apparently, the exit to element2 does not receive the output bean values. Is there another way I need to follow ? Thanks Henkl ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] exit after form submission
How do you know the outputbean is not being set? How does your site structure look like? Do you have a test case? Cheers, Emmanuel On 11/1/06, Henk <[EMAIL PROTECTED]> wrote: Hi, I have a form handled by element1, after a successful submission the results have to be handled by element2. I have this code in element1 : TrackSubmissionBean trackBean = (TrackSubmissionBean)getSubmissionBean(TrackSubmissionBean.class); if (trackBean != null) { Validated val = (Validated)trackBean; if (val.validate()) { setOutputBean(trackBean,"trackformbean"); exit("element2"); } else { Set errors = val.getValidationErrors(); ValidationBuilderXhtml builder = new ValidationBuilderXhtml(); builder.generateErrorMarkings(templ, errors, null, null); } } Apparently, the exit to element2 does not receive the output bean values. Is there another way I need to follow ? Thanks Henkl ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users -- blog -- http://eokyere.blogspot.com RIFE Framework -- http://rifers.org RIFE Training -- http://rifers.org/training It is always something (corollary). Good, Fast, Cheap: Pick any two (you can't have all three). RFC 1925 ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
[Rife-users] exit after form submission
Hi, I have a form handled by element1, after a successful submission the results have to be handled by element2. I have this code in element1 : TrackSubmissionBean trackBean = (TrackSubmissionBean)getSubmissionBean(TrackSubmissionBean.class); if (trackBean != null) { Validated val = (Validated)trackBean; if (val.validate()) { setOutputBean(trackBean,"trackformbean"); exit("element2"); } else { Set errors = val.getValidationErrors(); ValidationBuilderXhtml builder = new ValidationBuilderXhtml(); builder.generateErrorMarkings(templ, errors, null, null); } } Apparently, the exit to element2 does not receive the output bean values. Is there another way I need to follow ? Thanks Henkl ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users