Dear all,
I have below code but does not know why the flowScope variable of dtWebVoTcs may be empty after change or no data shown on teacher-records.xhtml. Do you know why??
//-------------After Change-----------------------------//
<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.4.xsd"
parent="parent-flow" start-state="checkFirstInit">
<decision-state id="checkFirstInit" >
<if test="flowScope.dtWebVo ne null" then="main" else="initdtWebVo" />
</decision-state>
<action-state id="initdtWebVo">
<evaluate expression="ActivitiesController.getAllInfo('99999982')" result="flowScope.dtWebVo"/>
<set name="flowScope.dtWebVoTcs" value="flowScope.dtWebVo.filterList('Tcs')" />
<set name="flowScope.startYear" value="2017" />
<set name="flowScope.endYear" value="2018" />
<transition to="main"/>
</action-state>
<view-state id="main" view="teacher-records.xhtml">
<on-entry>
..........................
//-------------------------Before ------------------------------------------//
It works as below:
<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.4.xsd"
parent="parent-flow" start-state="main">
<view-state id="main" view="teacher-records.xhtml">
<on-entry>
<evaluate expression="ActivitiesController.getAllInfo('99999982')" result="flowScope.dtWebVo"/>
<set name="flowScope.dtWebVoTcs" value="flowScope.dtWebVo.filterList('Tcs')" />
<set name="flowScope.startYear" value="2017" />
<set name="flowScope.endYear" value="2018" />
..........................