0

default-response でパラメータを定義するとおかしい

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>
4

0 に答える 0