[
https://jira.jboss.org/jira/browse/RF-5752?page=com.atlassian.jira.plugin...
]
Chris Simons commented on RF-5752:
----------------------------------
Nick - Definitely, I actually just did so this morning. Thank you for considering this
issue again. I can link to other forums/sites where users had similar issues. Note that
I can easily build a modalPanel to *delete* the selected object; something about the form
- it's not refreshing the input values to what's in the backing bean.
Here is the RF Community Form link for my post:
http://community.jboss.org/thread/147103
I realize the code may not be that helpful; please understand that I have fiddled with
this issue for the better part of three days. I have tried to follow the RF Component
Showcase example, "DataTable - Edit with ModalPanel" to a tee. I have tried
everything, including wrapping the modalPanel in an a4j:outputPanel, setting rendered = to
the backing bean, and so forth.
Here is some backing bean code that I did not include with the forum post.
@Stateful
@Scope(ScopeType.SESSION)
@Name("responseManager")
public class ResponseManager implements ResponseManagerLocal {
// ... other code ...
private ResponseParagraph currentResponseParagraph = new ResponseParagraph();
/** the method that is called when clicking the _responseParagraph object **/
@Begin(join=true)
public void modifyParagraph(ResponseParagraph responseParagraph) {
log.info("modifyParagraph: id= " + responseParagraph.getParaName());
currentResponseParagraph = entityManager.find(ResponseParagraph.class,
responseParagraph.getId());
}
reRender of components inside modalPanel does not work
------------------------------------------------------
Key: RF-5752
URL:
https://jira.jboss.org/jira/browse/RF-5752
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 3.2.2
Environment: Microsoft Windows XP, Tomcat 6.0.16
Reporter: Juan Ignacio Garzon
Assignee: Nick Belaevski
I have a table showing items and a button to edit them. When I click on the button, the
entity is set on a session bean property, and a modal panel appears, with a form to edit
the selected entity (in the example, the entity has only a name).
The first time I select an entity, the modal panel shows an inputText with the name of
the entity, in order to edit it. After that first time, the inputText in the modal panel
never changes again, it will show always the name of that first entity.
I also have an inputText outside the modalpanel that rerenders every time the edit button
is clicked, and It changes every time another entity is selected.
Here is a reduced version of the code that also shows the problem:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!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:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:t="http://myfaces.apache.org/tomahawk"
xmlns:bdrc="http://www.pan-energy.com.ar/bdrc">
<f:view>
<f:loadBundle basename="#{paisController.resourceGeneralName}"
var="msg" />
<f:loadBundle basename="#{paisController.resourceBundleName}"
var="msgEntidad" />
<a4j:form id="formListado">
<rich:dataTable var="entidad"
value="#{paisController.listado}">
<rich:column width="18">
<f:facet name="header">
<h:outputText value="" />
</f:facet>
<h:outputText value="#{entidad.nombre}" />
</rich:column>
<rich:column width="18">
<!-- THIS IS THE "EDIT" BUTTON -->
<a4j:commandLink
oncomplete="javascript:Richfaces.showModalPanel('ventanaEditar');"
reRender="nombre, nombre2">
<a4j:actionparam name="componenteEditar" value="#{entidad}"
assignTo="#{paisController.entidadSeleccionada}"
converter="#{paisController.converterEntidad}" />
<h:graphicImage value="/img/pencil.png"
style="cursor:pointer; border: 0px" />
</a4j:commandLink>
</rich:column>
</rich:dataTable>
</a4j:form>
<!-- THIS INPUTTEXT RE RENDERS CORRECTLY -->
<h:inputText id="nombre2"
value="#{paisController.entidadSeleccionada.nombre}" />
<rich:modalPanel id="ventanaEditar" zindex="2000"
autosized="true"
resizeable="false">
<a4j:form id="formEditar" status="statusGeneral">
<!-- THIS INPUTTEXT DOES NOT RE RENDER-->
<h:inputText id="nombre"
value="#{paisController.entidadSeleccionada.nombre}" />
<a4j:commandLink id="btnSubmit" styleClass="botonLink"
action="#{paisController.guardarEntidadSeleccionada}"
reRender="formListado"
oncomplete="javascript:windowclose_ventanaEditar();"
style="float:right" status="statusGeneral"
immediate="false">
<h:graphicImage value="/img/accept.png"
style="cursor:pointer; border: 0px" />
<h:outputText value="#{msg.guardar}" />
</a4j:commandLink>
<a4j:commandLink id="btnCancelar"
action="#{paisController.cancelarModificacion}"
reRender="formListado"
oncomplete="javascript:windowclose_ventanaEditar();"
styleClass="botonLink" style="float:right"
status="statusGeneral"
immediate="true">
<h:graphicImage value="/img/cancel.png"
style="cursor:pointer; border: 0px" />
<h:outputText value="#{msg.cancelar}" />
</a4j:commandLink>
</a4j:form>
</rich:modalPanel>
<script type="text/javascript"> function
windowclose_ventanaEditar(){
javascript:Richfaces.hideModalPanel('ventanaEditar'); }; </script>
</f:view>
</html>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira