Webflow にないコントローラーがありますが、それを weblflow にリダイレクトする必要があります。問題は、アクセスする必要があるビューが webflow のアクション内にあることです。
ここに私のウェブフローがあります
クラス EditSpouseContactInfoController {
def index = { redirect(action:"editSpouseContact") }
def editSpouseContactFlow = {
start{
action {
//some codes here
}
on("success").to("editSpouseContact")
on(Exception).to("editSpouseContact")
}
editSpouseContact {
/************************************/
// Veteran Marital History Processing
/************************************/
on("addMaritalHistory"){
flow.contactInstance.properties = params
if(!flow.maritalHistoryLst){
flow.maritalHistoryLst = []
}
conversation.maritalHistoryInstance = new MaritalHistory()
conversation.maritalHistoryInstance.isVeteranMaritalHistory = false
}.to("editSpouseMaritalHistory")
}
}
これが私の非weblowコントローラーです:
def addMaritalHistory={
MySession session = MySession.getMySession(request, params.id)
def caseInstance = CmCase.get(params.cmCaseIdCmCase.id as Long)
redirect(controller: "editSpouseContactInfo", action: "editSpouseContact ", id:caseInstance.id)
}
上記の行は機能しますが、editSpouseContact内の addMaritalHistory に直接アクセスすることは可能ですか?上記のアクションを使用する代わりに、 action: "addMaritalHistory"になりますか? もちろん機能していませんが、それをアクションと呼ぶ方法はありますか?ありがとう