You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2010/09/03 03:41:33 UTC
[jira] Created: (TOMAHAWK-1546) Allow detailStamp to be Ajaxified
using f:ajax
Allow detailStamp to be Ajaxified using f:ajax
----------------------------------------------
Key: TOMAHAWK-1546
URL: https://issues.apache.org/jira/browse/TOMAHAWK-1546
Project: MyFaces Tomahawk
Issue Type: Improvement
Components: Extended Datatable
Affects Versions: 1.1.9
Reporter: Leonardo Uribe
Assignee: Leonardo Uribe
Attachments: TOMAHAWK-1546-1.patch
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 -->
<!-- you don't have to implement a custom action! -->
<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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.