Rene O created MYFACES-3911: ------------------------------- Summary: Can't execute a second form from another form Key: MYFACES-3911 URL: https://issues.apache.org/jira/browse/MYFACES-3911 Project: MyFaces Core Issue Type: Bug Affects Versions: 2.2.4 Environment: java 7, tomcat 7 Reporter: Rene O Priority: Blocker
I have 2 forms within a site. I try to execute form B from form A, but it doesn't work. {code} <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:p="http://xmlns.jcp.org/jsf/passthrough" xmlns:jsf="http://xmlns.jcp.org/jsf"> <h:head></h:head> <h:body> <h:panelGroup id="pagePanel"> 1. type a character into input-field <br/> 2. click button 'Button B' <br/> 3. input-field validates and a message appears, which is the expected behaviour <br/> 4. change the character within input-field <br/> 5. click 'Button A' <br/> 6. now no validation takes place and no message appears, which is not the expected behaviour <br/> --- formB is not executed, if you submit the page via ajax from formA <br/> --- you can also see, that no value is submitted if you insert a valid input in this case <br/> <br/> <h:messages /> <h:form id="formA"> <h:commandButton value="Button A"> <f:ajax execute="pagePanel" event="click" render="pagePanel" /> </h:commandButton> </h:form> <br/> <br/> <h:form id="formB"> Input: <h:inputText id="inputA" value="#{model.value}" required="true"> <f:validateLength minimum="5"/> </h:inputText> <br/> <br/> <h:commandButton value="Button B"> <f:ajax execute="pagePanel" event="click" render="pagePanel" /> </h:commandButton> <br/> <br/> Submitted input value: #{model.value} </h:form> </h:panelGroup> </h:body> </html> {code} A testcase is attached. Open URL {code} http://localhost:8080/jsftest22/mypage.jsf {code} -- This message was sent by Atlassian JIRA (v6.2#6252)