在默认响应中定义参数时很奇怪
default-response 中定义的参数不会传递给目标 url,如下所示:
<transition name="editProductFeature">
<path-parameter name="productFeatureId"/>
<default-response url="../Feature">
<parameter name="productFeatureId" from="productFeatureId"/>
<parameter name="action" value="edit"/>
</default-response>
</transition>
在参数映射中定义它们时它也不起作用:
<transition name="editProductFeature">
<path-parameter name="productFeatureId"/>
<default-response url="../Feature" parameter-map="['productFeatureId':productFeatureId, 'action':'edit']">
</default-response>
</transition>
但如果在过渡中添加空操作,它确实有效:
<transition name="editProductFeature">
<path-parameter name="productFeatureId"/>
<actions></actions>
<default-response url="../Feature" parameter-map="['productFeatureId':productFeatureId, 'action':'edit']">
</default-response>
</transition>