Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-1546

Allow detailStamp to be Ajaxified using f:ajax

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.9
    • 1.1.10
    • Extended Datatable, JSF2
    • None

    Description

      The idea is allow detailStamp row to be ajaxified, using a new inner facet called detailStampRow with a component with the same id, that will render the detailStamp including its clientId, to make possible use it through ajax. The idea is something like this:

      <t:dataTable id="data" styleClass="standardTable" headerClass="standardTable_Header" footerClass="standardTable_Header"
      rowClasses="standardTable_Row1,standardTable_Row2"
      columnClasses="standardTable_Column,standardTable_ColumnCentered,standardTable_Column" var="currentCountry"
      value="#

      {countryList.countries}

      " preserveDataModel="true" varDetailToggler="detailToggler" preserveRowComponentState="true">
      <h:column>
      <f:facet name="header">
      <h:outputText value="#

      {example_messages['label_country_name']}

      "/>
      </f:facet>
      <t:commandLink action="go_country" immediate="true">
      <h:outputText value="#

      {currentCountry.name}

      "/>
      <!-- for convenience: MyFaces extension. sets id of current row in countryForm -->
      <Unable to render embedded object: File (-- you don't have to implement a custom action) not found. -->
      <t:updateActionListener property="#

      {countryForm.id}

      " value="#

      {currentCountry.id}

      "/>
      </t:commandLink>
      </h:column>

      <h:column>
      <f:facet name="header">
      <h:outputText value="#

      {example_messages['label_country_iso']}

      "/>
      </f:facet>
      <h:outputText value="#

      {currentCountry.isoCode}

      "/>
      </h:column>

      <h:column>
      <f:facet name="header">
      <h:outputText value="#

      {example_messages['label_country_cities']}

      "/>
      </f:facet>
      <t:div id="panel">
      <h:commandLink rendered="#

      {detailToggler.currentDetailExpanded}

      " action="#

      {detailToggler.toggleDetail}">
      <h:outputText value="Hide"/>
      <f:ajax render="panel detailStampRow"/>
      </h:commandLink>
      <h:commandLink rendered="#{!detailToggler.currentDetailExpanded}" action="#{detailToggler.toggleDetail}

      ">
      <h:outputText value="Show"/>
      <f:ajax render="panel detailStampRow"/>
      </h:commandLink>
      </t:div>
      </h:column>
      <f:facet name="detailStamp">
      <t:dataTable id="cities" styleClass="standardTable_Column" var="city" value="#

      {currentCountry.cities}

      " preserveDataModel="true" preserveRowComponentState="true">
      <h:column>
      <h:outputText value="#

      {city}

      " style="font-size: 11px"/>
      </h:column>
      <h:column>
      <h:selectBooleanCheckbox id="selcity" value="#

      {city.selected}

      " onclick="this.blur();">
      <f:ajax/>
      </h:selectBooleanCheckbox>
      </h:column>
      <h:column>
      <h:commandLink action="#

      {city.unselect}

      " value="Unselect">
      <f:ajax execute="@this" render="cities"></f:ajax>
      </h:commandLink>
      </h:column>
      </t:dataTable>
      </f:facet>
      </t:dataTable>

      I'll commit the proposal, but let this one open until all tests for this feature will be done.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            lu4242 Leonardo Uribe
            lu4242 Leonardo Uribe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment