spring-webflow-2

Can Thymeleaf access the Spring servletContext?

☆樱花仙子☆ 提交于 2021-02-07 10:57:19
问题 I wonder if anyone can help. We are in the process of converting a Spring Webflow 2 application from using a jsp based view layer, to a Thymeleaf based view. For this most part this is OK, but now I'm struggling to get Thymeleaf to access an object that we've put in the servletContext . So, we have an object that is put in the servletContext as part of a bean (implementing ServletContextAware and InitializingBean ) For the sake of simplicity, lets say it is a string: public class

Access flashattribute in Springflow

耗尽温柔 提交于 2020-01-13 06:58:10
问题 Added value to redirectAttrs.addFlashAttribute("some", value); and then redirect to Springflow How to access flashattribute some in Springflow ? <on-start> <evaluate expression="do.Action(???)" result="flowScope.someobject" /> </on-start> 回答1: try: <evaluate expression="webFlowUtils.getFlashAttribute(externalContext, 'some')"/> with: @Component public final class WebFlowUtils { public Object getFlashAttribute(ExternalContext context, String attributeName) { Map<String, ?> flashMap =

Primefaces Dialog box - show it conditionally. javascript code not working

谁说我不能喝 提交于 2020-01-05 06:55:08
问题 I want to show a dialog box on the click of a primefaces commandbutton. Before the dialog box , I need to check a condtional. I am using Spring web-flow 2.3.0. So I am doing it like this , And the Dialog Box is I am not able to show this dialog box based on this condition. Please help me ,any pointers? SWF 2.3.0 Primefaces 2.2.1 JSF 2 Spring Security 3 Spring 3.1.0M1I EhCache Apache Tomcat 6.0 STS 2.5.1 So I have changed my code as per below <p:commandLink id="addRequest" immediate="true"

How to execute transition on value change in h:selectOneMenu?

孤街浪徒 提交于 2020-01-01 15:05:09
问题 Usually i do something like below. Clicking button execute transition. <!-- view --> <h:form> <h:commandButton action="doit"> <f:ajax render="@form"/> </h:commandButton> </h:form> <!-- flow --> <transition on="doit">...</transition> How to fire a transition on change value in (for example) h:selectOneMenu ? <h:form> <h:selectOneMenu value="#{selected}"> <f:selectItems value="#{items}/> <f:ajax event="valueChange" render="@form" /> </h:selectOneMenu> </h:form> Edit: I thought about registering

How to execute transition on value change in h:selectOneMenu?

家住魔仙堡 提交于 2020-01-01 15:05:08
问题 Usually i do something like below. Clicking button execute transition. <!-- view --> <h:form> <h:commandButton action="doit"> <f:ajax render="@form"/> </h:commandButton> </h:form> <!-- flow --> <transition on="doit">...</transition> How to fire a transition on change value in (for example) h:selectOneMenu ? <h:form> <h:selectOneMenu value="#{selected}"> <f:selectItems value="#{items}/> <f:ajax event="valueChange" render="@form" /> </h:selectOneMenu> </h:form> Edit: I thought about registering

Spring Web Flow - Multiple forms on page - validating correct form

冷暖自知 提交于 2019-12-24 03:39:17
问题 I am using Spring Web Flow 2.3 and I have a page that has two forms on it that transition to different places depending on which is submitted. To accomplish this, I have one composite model object for my view-state that holds the two forms inside. The problem I am seeing is that if transition A is fired, I only want to validate form A, and likewise with form B - only want to validate B if B transition fired. I am not sure how to indicate which form to validate. View state that is validating

Spring Web Flow exception handling

元气小坏坏 提交于 2019-12-24 00:25:34
问题 How to prevent exception, if requestParameters.sortBy is passed as string ( java.lang.NumberFormatException ) or is missing ( java.lang.NullPointerException )? <view-state id="journeySearch" model="journeyForm"> ... <transition on="sort"> <set name="journeyCriteria.sortBy" value="requestParameters.sortBy" type="int" /> <evaluate expression="bookingService.searchJourneys(journeyCriteria)" result="viewScope.journeys" /> </transition> </view-state> 回答1: requestParameters.sortBy will be null if

How to handle MultipartException in Spring

两盒软妹~` 提交于 2019-12-21 16:50:32
问题 My configuration is here. I made some modifications according to the answer in that post. filterMultipartResolver @Bean public StandardServletMultipartResolver filterMultipartResolver() { return new StandardServletMultipartResolver(); } AppInitializer public class AppInitializer implements WebApplicationInitializer { @Override public void onStartup(final ServletContext servletContext) throws ServletException { // Create the 'root' Spring application context final WebApplicationContext context

not able to get the flow scope variable from one state transition to another state transition junit

倾然丶 夕夏残阳落幕 提交于 2019-12-18 09:44:17
问题 When I transit from view state to decision state or action state all the input set is lost while transitioning to another state. How to do I get the flow scope variable for decision state or action state on transitioning from view state to decision state and action state in junit ? In my flow definition right now I am in view state when I set the event Id as submit it moves to registerEnroll decision state where it needs flowScope.regform.loyaltyLookUp value. When I see the flow execution

webflow.xsd - Start state is missing. Add at least one state to the flow

空扰寡人 提交于 2019-12-14 02:58:22
问题 I am working with Spring Core 4.0.7 and Spring Web Flow 2.4.0 Using Spring Tool Suite I am able to create a Spring Web Flow Definition File For the <flow> tag it generates <?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"> Observe spring-webflow-2.0.xsd When