-
1. Re: a4j:support Troubles
ilya_shaikovsky Aug 13, 2009 5:26 AM (in response to johndoe123)problem 2 related to concurrent requests. blur occurs together with button press. try to use queue.
and on first one - show more code to check how did you trying to change it's value. -
2. Re: a4j:support Troubles
johndoe123 Aug 13, 2009 5:37 AM (in response to johndoe123)<rich:dataTable id="datatable" rows="#{controller.pageSize}" var="item" value="#{controller.model}" width="100%" reRender="scroller, datatableHeader, footer, dialog" > <rich:column> <f:facet name="header">Actions</f:facet> <a4j:commandLink id="editlink" action="#{controller.select(item)}" reRender="dialog, datatable" onClick="this.focus(); return false;"> <h:graphicImage value="/img/edit.gif" style="border:0"/> <f:setPropertyActionListener value="#{true}" target="#{controller.editMode}" /> </a4j:commandLink> <rich:toolTip for="editlink" value="Edit"/> </rich:column> <a4j:region> <h:form id="dialogForm"> <a4j:outputPanel id="dialog" ajaxRendered="true" width="500px"> <div class="scrollable" style="width: 500px;"> <h:panelGroup> <rich:panel id="dialogPanel"> <rich:messages level="INFO" ajaxRendered="true" id="messages" /> <f:facet name="header"> <h:outputText value="Edit"/> </f:facet> <h:panelGrid columns="2"> <f:facet name="beforeInvalidField"> </f:facet> <f:facet name="afterInvalidField"> <h:graphicImage src="/img/error.gif"/> <a4j:outputPanel ajaxRendered="true"> <s:message/> </a4j:outputPanel> </f:facet> <f:facet name="aroundInvalidField"> <s:span styleClass="errors"/> </f:facet> <s:decorate id="someDecorator" template="/layout/edit.xhtml"> <ui:define name="label">Label</ui:define> <h:inputText disabled="false" readonly="false" id="someFieldId" required="false" value="#{controller.selectedEntity.someValue}"> <a4j:support event="onblur" reRender="someDecorator" bypassUpdates="true" ajaxSingle="true"/> </h:inputText> </s:decorate> </h:panelGrid> <rich:panel style="text-align:right; border-color: white;" > <h:panelGroup> <a4j:commandButton value="Save" id="saveButton" reRender="datatable, dialog, messages" action="#{controller.saveSelectedEntity}"/> </h:panelGroup> </rich:panel> </rich:panel> </h:panelGroup> </div> </a4j:outputPanel> </h:form>
The code looks like this. The commandLink inside the datatable calls the select action. When I now edit a field in the dialog and then call the select action again, the value in the field is still the same, although the selected entity has an other value. Confusing, isn't it? -
3. Re: a4j:support Troubles
johndoe123 Aug 13, 2009 5:39 AM (in response to johndoe123)Sorry, there are some mistakes in it and I can't edit it :(
It's missing the tag and the </a4j:region> tag. -
4. Re: a4j:support Troubles
ilya_shaikovsky Aug 13, 2009 5:50 AM (in response to johndoe123)make the links in dataTAble ajaxSingle.
-
5. Re: a4j:support Troubles
johndoe123 Aug 13, 2009 5:55 AM (in response to johndoe123)That won't help.
Workflow is like that:
1.) Press Edit-Link => Dialog is filled with values
2.) Change contents of a field inside the dialog
3.) Do NOT Save and don't do anything else
4.) Press Edit-Link on another item
=> Contents of the field aren't updated with values from the new entity but still have the value that we put in and didn't save -
6. Re: a4j:support Troubles
nbelaevski Aug 14, 2009 6:36 PM (in response to johndoe123)Hi,
Looks like https://jira.jboss.org/jira/browse/RF-7136. Please check the issue and blog link in comments.