Spring Best Webflow Practice

I have a java web application that uses spring webflow as a framework. I have a problem processing data on a simple xml stream. When processing becomes more complex, it is difficult for me to implement using the xml stream on the Internet. I was considering using controllers to perform these operations. How can I do it. They have no idea how to use controllers in a web stream. And from the controllers, can I go to the xml stream to continue processing?

An example of my problem is submitting forms. Here is the script. I have a table table of users and users. I also have a User class representing tablebecbec that I used Hibernate here. On my registration page, I have username, password, and authority fields (not custom class fields). I am binding this form to a User object using spring web stream binding. My problem is that I cannot bind the authority field because it does not exist in my User class. Do I need to create a bean representing my form? I need to add a username and password to a table and user credentials in another table. Where can I do initialization for the User object and the Authority object, or where to set the values ​​from registerFormBean to my POJOs? I think this is not a good approach, or it will make my xml stream complicated

+6
java spring spring-mvc spring-webflow
source share
1 answer

you can implement this jsf as presentation + webflow + mvc as a controller

first you create a backup bean with username, password, permissions then let webflow create a backup bean in the session, when sending the action it will call @controller "Spring MVC" and the controller will call your company and the DAO business call that you implemented as Hibernate

like this <on-start> <evaluate expression="youractionClass.createbackingBean()" result="conversationScope.yourbean" /> </on-start>

the second solution, you can bind the view to a model that contains a username, password, authority, then when sending the action it will call @controller "Spring MVC" and the controller will call your company and the DAO business call that you implemented as Hibernate

 <view-state id="registerForm" model="registerBean" 
+4
source share

All Articles