Я использую webapp using, Весна безопасности Весна рамки. Весна webflow. Я хочу выполнить аутентификацию с той же страницы входа в систему двумя разными типами пользователей i.e user1 и user2. Оба имеют разные таблицы в базе данных для них и разные классы сущностей, определенные для них. Я использую страницу jsf .xhtml для моей страницы входа. Я использовал прайсы gui и с помощью вкладки, предоставленной на странице входа для user1 и user2. вот мой файл определения webflow.SpringWebflow аутентифицирует пользователя двух типов
Проблема заключается в том, что я хочу принимать значения для user1 и user2 из одного и того же состояния представления с идентификатором «приветствовать», но я не знаю, как принять их учетные данные, поскольку разрешена только одна модель, так как я указал model = "student ».
<?xml version="1.0" encoding="UTF-8"?>
<flow xmlns="http://www.springframework.org/schema/webflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/webflow
http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">
<var name="student" class="be.project.studNtwrk.domain.StudentEntity"/>
<var name="mentor" class="be.project.studNtwrk.domain.MentorEntity"/>
<view-state id="welcome" view="welcome.xhtml" model="student" >
<transition on="ssignUp" to="userType"></transition>
<transition on="msignUp" to="userType"></transition>
<transition on="studentSignIn" to="finish">
<evaluate expression="studentAuthenticationProviderService.processUserAuthentication(student)" />
</transition>
<transition on="mentorSignIn" to="finish">
<evaluate expression="mentorAuthenticationProviderService.processUserAuthentication(student)" />
</transition>
</view-state>
<view-state id="userType" view="ChooseUser.xhtml">
<transition on="student" to="studentsignup" />
<transition on="mentor" to="mentorsignup" />
</view-state>
<view-state id="studentsignup" view="studentregistration.xhtml" model="student">
<transition on="backToSignIn" to="welcome"></transition>
<transition on="backToChoice" to="userType"></transition>
<transition on="confirmSignUp" to="StudentAuthentication">
<evaluate expression="studentService.createUser(student)"></evaluate>
</transition>
</view-state>
<action-state id="StudentAuthentication">
<evaluate expression="studentAuthenticationProviderService.processUserAuthentication(student)" />
<transition on="yes" to="finish"></transition>
<transition on="no" to="welcome"></transition>
</action-state>
<view-state id="mentorsignup" view="mentorregistration.xhtml" model="mentor">
<transition on="backToSignIn" to="welcome"></transition>
<transition on="backToChoice" to="userType"></transition>
<transition on="confirmSignUp" to="MentorAuthentication">
<evaluate expression="mentorService.createUser(mentor)"></evaluate>
</transition>
</view-state>
<action-state id="MentorAuthentication">
<evaluate expression="mentorAuthenticationProviderService.processUserAuthentication(mentor)" />
<transition on="yes" to="finish"></transition>
<transition on="no" to="welcome"></transition>
</action-state>
<end-state id="finish" view="externalRedirect:account" />
</flow>
как это связано с PF? Работает ли он с использованием простого h: dataGrid? вместо вкладок PF? – Kukeltje
@kukeltje Я использую PrimeFaces для компонентов jsf. PLZ вы можете объяснить ур вопрос –
Вы отметили этот вопрос с 'primefaces', но я думаю, что если вы используете h: panelgrid вместо ap: tabview, у вас есть одна и та же проблема, и, следовательно, это не связанный с PF imo, и должен быть тег primefaces удаляться – Kukeltje