4 Replies Latest reply on Apr 8, 2010 11:52 AM by ilya_shaikovsky

    AJ4:outputPanel id to row/col ids of datatable

      Hello.  Is there anything particularly stupid in what I'm trying to do below?  What is happening is that the row and column indexes are showing up blank and the id is getting generated automatically.  The display works fine but I want to create a known, unique name of the outputPanel so I can have Spring Webflow do a render fragment to it on ajax updates.  Since at update time I know the row and column I should be able to identify the output panel.  Also, the "row" var doesn't seem to be available when I'm inside the rich:columns area.

       

      <rich:dataTable rows="24"

               value="#{buildingResourcesModel.seriesSets[0]}" var="time" rowKeyVar="row"

               rowClasses="row1, row2"

               columnClasses="column1"

               cellpadding="0">

       

      <rich:column>

      <f:facet name="header"><h:outputText value="Period Ending" /></f:facet>

      <h:outputText value="#{time[0].seriesDisplay}" />

      </rich:column>

       

      <rich:columns value="#{buildingResourcesModel.columnSets[0]}" var="column" index="ind">

      <f:facet name="header"><h:outputText value="#{column.header}" /></f:facet>

       

      <a4j:outputPanel id="R_#{row}_C_#{ind}">

      <h:inputText rendered="#{time[ind].forecastType==2}" styleClass="editable-cell-forecast" value="#{time[ind].availability}">

      <a4j:support event="onchange" action="save">

      <a4j:actionparam name="guid" value="#{time[ind].guid}" />

      <a4j:actionparam name="row" value="#{row}" />

      </a4j:support>

      </h:inputText>

       

      <h:inputText rendered="#{time[ind].forecastType!=2}" styleClass="editable-cell" value="#{time[ind].availability}">

      <a4j:support event="onchange" action="save">

      <a4j:actionparam name="guid" value="#{time[ind].guid}" />

      <a4j:actionparam name="row" value="#{row}" />

      </a4j:support>

      </h:inputText>

      </a4j:outputPanel>

      </rich:columns>

       

      </rich:dataTable>