2 Replies Latest reply on Jun 4, 2007 3:25 PM by Roger Martin

    dynamically created collection id's and a4j:support possible

    Roger Martin Newbie

      Because of the usefulness of h:dataTable for dynamic tables with its data model would it be possible to default the reRender attribute of a4j:support to the parent id? Then for dynamically generated id's during the rendering phase it could use the default rather than reRender defaulting to the whole region?

       <f:facet name="header">
       <h:outputText value="Flag"/>
       <a4j:region selfRendered="true">
       <h:selectBooleanCheckbox id="volumetricsFlag" value="#{volumetricsBean.dataTable.rowData.FLAG}" valueChangeListener="#{volumetricsBean.valueSelectedChanged}">
       <a4j:support event="onchange" ajaxSingle="true" reRender="#{volumetricsBean.dataTable.rowData.FLAG}" oncomplete="alert('It happened')"><a4j:ajaxListener type="org.ajax4jsf.ajax.ForceRender"/></a4j:support>
       <f:converter converterId="intCheckboxConverter"/>

      Output page source shows
      <td class="input-td"><input id="VolumetricSelection:volumetricsTable:4:volumetricsFlag" type="checkbox" name="VolumetricSelection:volumetricsTable:4:volumetricsFlag" checked="checked" onchange="A4J.AJAX.Submit('VolumetricSelection:volumetricsTable:4:j_id_id117','VolumetricSelection',event,{'control':this,'single':true,'oncomplete':function(request,event,data){alert('It happened')},'parameters':{'VolumetricSelection:volumetricsTable:4:j_id_id121':'VolumetricSelection:volumetricsTable:4:j_id_id121'},'actionUrl':'/jsf-wita/dbi/volumetrics.jsf'})" /></td>

      which has the typical indexed id's but the ajax generated script id is olumetricSelection:volumetricsTable:4:j_id_id121 and not the individual table cell component's id. The resulting behavior is the form does a submit and other components are getting events to flow as well.

      says reRender can have an EL expression for arrays and Collections. I've tried reRender="#{volumetricsBean.dataTable.rowData.FLAG}" which is a Hashtable for the row supplied by the data model from the h:datatable. What kind of content should this EL be?

      http://livedemo.exadel.com/a4j-repeat-rerender/ is a new example about forcing the rendering to be accomplished in time for the a4j run. This being new, implies there is no way to make reRender work with an EL?

      Overcoming this obstacle would open up a lot of sweet dynamic tables to the full power of ajax!