[JBoss JIRA] Created: (RF-9529) rich:popupPanel with a4j:commandButton. After an ajax submit there are no values submitted
by P N (JIRA)
rich:popupPanel with a4j:commandButton. After an ajax submit there are no values submitted
------------------------------------------------------------------------------------------
Key: RF-9529
URL: https://jira.jboss.org/browse/RF-9529
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: component-a4j-core
Affects Versions: 4.0.0.Milestone3
Environment: Richfaces M2 and M3
Reporter: P N
On my page i´m using a rich:popupPanel. On this panel i have a form and some input field (for test only 1) and an a4j:commandbutton with it. I want to make an Ajax Request on it to save the data, when i click the button the actionListener is called, but i get no value from the input field, i always get null. If i test this on a normal page, without a rich:popupPanel it works.It works when i use a <h:commandButton actionListener="#{myActionListener.method}"> <f:ajax execute="@form" render="@form"/>, then the data is submitted.
Example:
<rich:popupPanel
id="popup"
modal="true"
height="600"
width="800"
resizeable="true"
>
<f:facet name="header">
<h:outputText value="Create new Project"/>
</f:facet>
<f:facet name="controls">
<h:form
prependId="false"
id="insidefrm"
>
<a4j:commandLink
actionListener="#{projectVC.close}"
oncomplete="#{rich:component('popup')}.hide();"
>
<h:graphicImage
value="/resources/ui-richfaces/gfx/close.gif"
/>
</a4j:commandLink>
</h:form>
</f:facet>
<h:form
id="popupfrm"
>
<h:panelGrid id="errmsg">
<h:messages id="msg"/>
</h:panelGrid>
<h:panelGrid
columns="4"
columnClasses="columnslabel,columnstextfield,columnslabel,columnstextfield"
>
<h:outputLabel
for="txttitle"
value="Title"
styleClass="labelfortext"
/>
<h:inputText
id="txttitle"
value="#{projectVM.budget}"
styleClass="textafterlabelblack"
required="true"
autocomplete="off">
</h:inputText>
</h:panelGrid>
<a4j:commandButton
id="save"
value="save"
execute="@form"
render="projecttbl errmsg" <!-- After click i want to reRender a Datatable -->
actionListener="#{projectVC.saveTest}"
>
</a4j:commandButton>
</h:form>
</rich:popupPanel>
Controller code
public void saveTest(ActionEvent event) {
log.debug("Test Ajax ");
if(getProjectVM().getBudget() != null ) {
log.debug("You Entered ["
+ getProjectVM().getBudget() + "]");
}
FacesUtils.addMessageIntoContextSeverityInfo(null, "Just an Info Message", null) ;
}<rich:popupPanel
id="popup"
modal="true"
height="600"
width="800"
resizeable="true"
>
<f:facet name="header">
<h:outputText value="Create new Project"/>
</f:facet>
<f:facet name="controls">
<h:form
prependId="false"
id="insidefrm"
>
<a4j:commandLink
actionListener="#{projectVC.close}"
oncomplete="#{rich:component('popup')}.hide();"
>
<h:graphicImage
value="/resources/ui-richfaces/gfx/close.gif"
/>
</a4j:commandLink>
</h:form>
</f:facet>
<h:form
id="popupfrm"
>
<h:panelGrid id="errmsg">
<h:messages id="msg"/>
</h:panelGrid>
<h:panelGrid
columns="4"
columnClasses="columnslabel,columnstextfield,columnslabel,columnstextfield"
>
<h:outputLabel
for="txttitle"
value="Title"
styleClass="labelfortext"
/>
<h:inputText
id="txttitle"
value="#{projectVM.budget}"
styleClass="textafterlabelblack"
required="true"
autocomplete="off">
</h:inputText>
</h:panelGrid>
<a4j:commandButton
id="save"
value="save"
execute="@form"
render="projecttbl errmsg" <!-- After click i want to reRender a Datatable -->
actionListener="#{projectVC.saveTest}"
>
</a4j:commandButton>
</h:form>
</rich:popupPanel>
This is my Controller code
public void saveTest(ActionEvent event) {
log.debug("Test Ajax ");
if(getProjectVM().getBudget() != null ) {
log.debug("You Entered ["
+ getProjectVM().getBudget() + "]");
}
FacesUtils.addMessageIntoContextSeverityInfo(null, "Just an Info Message", null) ;
}
When i change in the popup from a4j:commandButton to (then it works as supposed)
<h:commandButton
id="save"
value="save"
actionListener="#{projectVC.saveTest}"
>
<f:ajax
execute="@form"
render=":datatablefrm @form"
/>
</h:commandButton>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 5 months
[JBoss JIRA] Created: (RF-9587) Inplace input: NullPointerException when running with Myfaces
by Pavol Pitonak (JIRA)
Inplace input: NullPointerException when running with Myfaces
-------------------------------------------------------------
Key: RF-9587
URL: https://jira.jboss.org/browse/RF-9587
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: component-input
Environment: RichFaces 4.0.0-SNAPSHOT r.19749
Metamer 4.0.0-SNAPSHOT r.19763
Apache MyFaces JSF-2.0 Core Impl 2.0.2
Apache Tomcat 6.0.28
OpenJDK Runtime Environment 1.6.0_18-b18 @Linux
Chrome 7.0.517.41 @ Linux x86_64
Reporter: Pavol Pitonak
1. deploy Metamer with Myfaces to Tomcat
http://nexus.qa.jboss.com:8081/nexus/content/repositories/snapshots/org/r...
2. open http://localhost:8080/metamer/faces/components/richInplaceInput/simple.xhtml
result:
javax.faces.FacesException: java.lang.NullPointerException
at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.wrap(ExceptionHandlerImpl.java:241)
at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:156)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:258)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.richfaces.tests.metamer.TestIdentityFilter.doFilter(TestIdentityFilter.java:93)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:636)
Caused by: java.lang.NullPointerException
at org.richfaces.renderkit.InplaceInputRendererBase.getStateStyleClass(InplaceInputRendererBase.java:160)
at org.richfaces.renderkit.html.InplaceInputRenderer.encodeEnd(InplaceInputRenderer.java:96)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:519)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:543)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChildren(RendererUtils.java:520)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:541)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChildren(RendererUtils.java:520)
at org.apache.myfaces.shared_impl.renderkit.html.HtmlGroupRendererBase.encodeEnd(HtmlGroupRendererBase.java:92)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:519)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:618)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:614)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:614)
at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:1159)
at org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:263)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:59)
at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:85)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:239)
... 16 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 5 months