java - Internet Explorer destroys context on a:commandButton -
i experiencing issues when using a:commandbuttonin internet explorer. using <a:commandbutton>
action add details object. working fine when use chrome or firefox. however, when clicking add button in internet explorer, context destroyed , new 1 created.
some code:
listpage.xhtml
<a:commandbutton action="#{articledetail.add}" value="add" id="popadarticlebtn" rerender="#{facescontext.maximumseverity eq null ? 'articlepanel' : 'poparticle, errormsg'}" oncomplete="#{facescontext.maximumseverity eq null ? 'richfaces.hidemodalpanel(\'addarticle\');' : ''}">
and articledetail.java class: (getters & setters included)
@name("articledetail") @scope(scopetype.conversation) @autocreate public class articledetail extends entityquery<articledetail> { private string fuupm; private string fuutm; private string fuudc; private string fuudn; private string fuuvc; private string fuuec; private string fuuic; private string fuutc; private string fuuuc; public void add() { boolean unique = boolean.true; boolean empty = boolean.false; article = populatearticle( article, getentitymanager().find( articlemaster.class, new articlemasterid(integer.parseint(fuupm), integer .parseint(fuutm), fuudc, fuudn, fuuvc, fuuec, fuuic, fuutc, fuuuc))); }
so problem: in chrome, when debugging, attributes have value, in internet explorer values null
because of nex context created
i have no clue why other browsers seem leave conversation context intact , ie somehow causes new context.
similar question: https://stackoverflow.com/questions/2906774/a4jcommandbutton-causes-full-page-reload-on-ie7
thanks in advance!
this issue occured because <a:commandbutton>
placed in nested form. removing form , commandbutton outside of form in, behavior expected.
it seems ie stricter on w3c norm concerning forms chrome & firefox: w3c forms norms
every form must enclosed within form element. there can several forms in single document, form element can't nested.
Comments
Post a Comment