5 Replies Latest reply on Jan 30, 2008 8:29 AM by ilya_shaikovsky

    Eventsqueue does not work: THIS FRAMEWORK IS BAD FOR PROFESS

    jim20100

      I really need help because I have a professional application to finalize.

      I have a big problem because the input screen is not refreshed correctly.

      Here is the problem:
      I have a richdatatable.
      On each line, I have several input fields (dropdown list, input text, etc)
      When a value is changed, the value must be checked, the price must changed, etc.

      So I have set Eventsqueue and so on on the different fields like explained in the documentation.

      If I do my changes very fast between fields, the screen is not refreshed correcly. ESPECIALLY THE PRICE MAY BE WRONG FOR THE LINE !!!!!!!

      Here is the code


      <rich:dataTable id="dataParts" align="right"
      rendered="#{ShoppingCartBean.partsSize>0}"
      styleClass="scrollerTableNoWidth"
      headerClass="standardTable_Header"
      footerClass="standardTable_Footer"
      rowClasses="standardTable_Row1,standardTable_Row2"
      columnClasses="standardTable_ColumnCentered,standardTable_ColumnCentered,standardTable_ColumnCentered,standardTable_ColumnCentered,standardTable_ColumnCentered,standardTable_ColumnCentered,standardTable_ColumnCentered,standardTable_ColumnCentered,standardTable_ColumnRight"
      onRowMouseOver="this.style.backgroundColor='#EAEAEA'"
      onRowMouseOut="this.style.backgroundColor='#ECF5FC'"
      onRowClick="this.style.backgroundColor='#FFDFAE'"
      onRowDblClick="this.style.backgroundColor='#E0E0E0'"
      var="part"
      value="#{ShoppingCartBean.dataModel}"
      rows="10">


      ......

      <t:column style="width:40px">
      <f:facet name="header">
      <h:outputText
      value="#{my_messages['part.type']}" />
      </f:facet>
      <!-- row is also available -->

      <h:panelGrid columns="2">
      <t:column>
      <h:outputText
      rendered="#{ShoppingCartBean.onlyOneType}"
      value="#{ShoppingCartBean.type}" />

      <t:selectOneMenu
      binding="#{htmlInputSelectCartType.valueRef}"
      immediate="false"
      value="#{(ShoppingCartBean.type)}"
      rendered="#{(!ShoppingCartBean.onlyOneType)&&(ShoppingCartBean.type!=null)}">
      <f:selectItems
      value="#{ShoppingCartBean.typeList}" />
      <a4j:support event="onchange" eventsQueue="queueDataCart" ignoreDupResponses="true"
      immediate="true"
      action="#{htmlInputSelectCartType.change}"
      reRender="idPrice,idPartsPrice,idPriceTotal,idShoppingCartAction,idTypeInvalid" />
      </t:selectOneMenu>

      </t:column>

      <a4j:outputPanel id="idTypeInvalid">
      <t:column rendered="#{part.typeInvalid}">

      <h:graphicImage
      value="/images/error_mark.gif"
      alt="#{my_messages['part.type_invalid']}#{part.typeInvalidValue}" />

      </t:column>
      </a4j:outputPanel>
      </h:panelGrid>


      </t:column>

      <t:column style="width:px">
      <f:facet name="header">
      <h:outputText
      value="#{my_messages['part.h_dimension']}" />
      </f:facet>
      <!-- row is also available -->
      <h:panelGrid id="idHDim" columns="2">
      <t:column>

      <h:inputText id="dimensionH"
      binding="#{htmlInputTextCartHDim.valueRef}"
      immediate="false" maxlength="5" size="5"
      value="#{part.partDimension.dimensionH}"
      rendered="#{(part.partDimension!=null) && (part.partDimensionMinimum.dimensionH < part.partDimensionMaximum.dimensionH)}"
      converter="#{partCatalogList.integerConverter}">
      <f:validator
      validatorId="dimensionValidator" />
      <a4j:support event="onkeyup" eventsQueue="queueDataCart" ignoreDupResponses="true" requestDelay="500"
      immediate="true"
      action="#{htmlInputTextCartHDim.change}"
      reRender="idPrice,idPartsPrice,idPriceTotal,idShoppingCartAction,idHDim" />
      </h:inputText>


      <h:message styleClass="errorMark"
      for="dimensionH" tooltip="true"
      showDetail="true" showSummary="false">
      </h:message>


      <h:outputText
      value="#{part.partDimension.dimensionH}"
      rendered="#{(part.partDimension!=null) && (part.partDimension.dimensionH > 0) && (part.partDimensionMinimum.dimensionH == part.partDimensionMaximum.dimensionH)}">
      </h:outputText>

      </t:column>

      <t:column
      rendered="#{part.partDimensionInvalid}">

      <h:graphicImage
      value="/images/error_mark.gif"
      alt="#{my_messages['part.part_dimension_invalid']}" />

      </t:column>

      </h:panelGrid>


      </t:column>


      ........