spring web flow sub subflow-state that open the same jsp my code is:
in jsp on click button:
$("#formid").get(0).setAttribute('action','search-comune.htm'); $("#formid").submit();
controller:
@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;
}
flow xml:
<view-state id="nuovo-operatore-rer" view="aut/nuovo-operatore-rer">
</view-state>
<view-state id="search-comune" view="aut/nuovo-operatore-rer" />
servlet
<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 name:nuovo-operatore-rer.jsp
doesn't work.