【问题标题】:What does the "value" attribute in <set> element of spring web flow contain?spring web flow的<set>元素中的“value”属性包含什么?
【发布时间】:2018-07-28 03:25:14
【问题描述】:

我是 Spring Web Flow 的初学者。我在流 xml 文件中遇到了这个标签。一个这样的例子是

<on-start>
    <set name="flowScope.products" value="cartService.products"/>
    <set name="flowScope.shippingOptions"value="cartService.shippingOptions"/>
    <set name="requestScope.productId" value="requestParameters.productId"/>
</on-start>

值 - cartService.shippingOptions 是什么意思?它是指任何java领域吗?还是只是一个字符串? value = "requestParameters.productId" 是什么意思 参考?总的来说,&lt;set&gt; 标签的可能值是多少? 我参考了文件,但不清楚。请问&lt;set&gt;标签的value属性是包含字符串还是引用java字段?

请找到整个代码的链接 https://github.com/DanielMichalski/spring-web-flow/blob/master/src/main/webapp/WEB-INF/flows/checkout.xml

谁能回答这个问题?

【问题讨论】:

    标签: java spring spring-webflow


    【解决方案1】:

    requestParameters是一个特殊的EL变量,引用http请求中的参数。见special variables

    value 更普遍地是一个可以计算的 EL 表达式。您可以使用任何 spring bean、输入、变量、范围、事件等。

    有关 EL 的更多详细信息,请参阅this link

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-06-27
      • 1970-01-01
      • 2012-12-18
      • 1970-01-01
      • 2012-06-30
      • 1970-01-01
      • 2020-11-15
      • 1970-01-01
      相关资源
      最近更新 更多