在default-response
中定义参数时很奇怪默认响应中定义的参数不会传递到目标网址,如下所示:
<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>