tomcat - JSF Flash - Unexpected behavior - Values of the Flash remains alive -
i'm having unexpected behavior while using elflash of jsf. have 2 pages(page1 , page2) each page have own managedvean(bean1 , bean2). in page1, have button thah calls method bean1:
elflash.getflash().put("xxx", "test"); return "page2?faces-redirect=true"; and in page2, have following statement in constructor, recover value flash:
map<string,object> flash = elflash.getflash(); for(string s : flash.keyset()){ if(s.equals("xxx")){ myvariable=true; } } and when click button in page1 redirects page2 , sets variable myvariable true. problem is, after if update page, or re-open page in tab, keeps entering in if statement setting myvariable true. if @ console, see warning tomcat:
03/05/2013 08:57:56 com.sun.faces.context.flash.elflash setcookie aviso: jsf1095: response committed time tried set outgoing cookie flash. values stored flash not available on next request.
by understand, te flash should clean it's state after request over. or must clean manually?
Comments
Post a Comment