-1

同じjspを開く私のコードは次のとおりです。

クリックボタンのjspで:

$("#formid").get(0).setAttribute('action','search-comune.htm'); $("#formid").submit();

コントローラ:

  @RequestMapping("/aut/nuovo-operatore-rer")
            public ModelMap start() {

            OperatoreRerVO opVO = new OperatoreRerVO();
            ModelMap model = new ModelMap();
            model.addAttribute("OperatoriRer",opVO);
            return model;
            }


         @RequestMapping(value = "/aut/search-comune", method = RequestMethod.POST)
            public ModelMap searchcomune(@ModelAttribute("OperatoriRer") OperatoreRerVO opVO) {
            List<Comuni> comuniList = new ArrayList <Comuni>() ;
            Comuni comune = new Comuni();
            String descrizione  = "%"+opVO.getComune().getDescrizione().toUpperCase()+"%";
            comuniList = comuniDao.selectByName(descrizione);
            ModelMap model = new ModelMap();
            model.addAttribute("comuniList",comuniList);
            model.addAttribute("OperatoriRer",opVO);
            return model;
            }

フロー xml:

<view-state id="nuovo-operatore-rer" view="aut/nuovo-operatore-rer">
</view-state>
<view-state id="search-comune" view="aut/nuovo-operatore-rer" />

サーブレット

<webflow:flow-location id="aut/nuovo-operatore-rer" path="/WEB-INF/flows/aut/nuovo-operatore-rer.xml" />
        <webflow:flow-location id="aut/search-comune" path="/WEB-INF/flows/aut/nuovo-operatore-rer.xml" />

jsp 名:nuovo-operatore-rer.jsp

動作しません。

4

1 に答える 1

0

異なる ID でそれらを呼び出すことができるようにする場合は、フローを 2 つに分ける必要があります。
(ところで、フローの ID はビューステートと同じ ID である必要はありません)

flow1 (aut/nuovo-operatore-rer.xml):

<view-state id="view1" view="aut/nuovo-operatore-rer">
</view-state>

flow2 (aut/search-comune.xml):

<view-state id="view2" view="aut/nuovo-operatore-rer">
</view-state>


<webflow:flow-location id="aut/nuovo-operatore-rer" path="/WEB-INF/flows/aut/nuovo-operatore-rer.xml" />
<webflow:flow-location id="aut/search-comune" path="/WEB-INF/flows/aut/search-comune.xml" />
于 2013-01-10T15:39:27.500 に答える