-
1. Re: rich:datatable filterExpression f:setPropertyActionListe
ilya_shaikovsky Mar 25, 2009 9:25 AM (in response to christian.yttesen)RF version?
-
2. Re: rich:datatable filterExpression f:setPropertyActionListe
christian.yttesen Mar 25, 2009 9:29 AM (in response to christian.yttesen)RichFaces 3.3.0.GA
-
3. Re: rich:datatable filterExpression f:setPropertyActionListe
ilya_shaikovsky Mar 25, 2009 11:55 AM (in response to christian.yttesen)could you please check this using actionparam instead of f:set*.. Such issue was fixed even before 3.3.0 Ga.
-
4. Re: rich:datatable filterExpression f:setPropertyActionListe
christian.yttesen Mar 26, 2009 8:08 AM (in response to christian.yttesen)Using the a4j:actionparam like:
<a4j:actionparam name="account" value="#{item.accountID}" assignTo="#operatorActivityPageBean.accountId}" />
works fine - however it seems like the value attribute ends up as a String - I receive an IllegalArgumentException: argument type mismatch if using it "like" the f:setPropertyActionListener (e.g value="#{item}") - I read the JavaDoc for the value attribute to evaluate to a java.lang.Object?:javax.el.ELException: /operatorActivity.jsp @131,79 assignTo="#{operatorActivityPageBean.selectedOperatorActivityLog}": Can't set property 'selectedOperatorActivityLog' on class 'dsl.gui.bean.OperatorActivityPageBean' to value '<jli>, 2009-03-04 19:35:34.0, Modified value for css_rac_cat_id [New value: 1,000,380], Subscription Log, administrator, Parameter value changed, 1112000'.
-
5. Re: rich:datatable filterExpression f:setPropertyActionListe
christian.yttesen Mar 26, 2009 8:13 AM (in response to christian.yttesen)Please disregard my understanding of the value attribute - I was clearly wrong (referring to the developers guide instead of just the tag information doc).
-
6. Re: rich:datatable filterExpression f:setPropertyActionListe
christian.yttesen Mar 27, 2009 5:25 AM (in response to christian.yttesen)Ilya,
Any change you have been able to investigate further on this issue?
Regards,
Christian -
7. Re: rich:datatable filterExpression f:setPropertyActionListe
ilya_shaikovsky Mar 27, 2009 7:19 AM (in response to christian.yttesen)my changed code from demosite
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> <h:form> <a4j:region> <rich:dataTable value="#{dataTableScrollerBean.allCars}" var="category" rows="20" rowKeyVar="row" ajaxKeys="#{dataTableScrollerBean.keys}" id="table"> <f:facet name="header"> <h:outputText value="Cars Store"/> </f:facet> <rich:column filterBy="#{category.make}"> <f:facet name="header"> <h:outputText value="Make" /> </f:facet> <h:outputText value="#{category.make}" id="make" /> </rich:column> <rich:column> <f:facet name="header"> <h:outputText value="Model" /> </f:facet> <h:outputText value="#{category.model}" id="model" /> </rich:column> <rich:column> <f:facet name="header"> <h:outputText value="Price" /> </f:facet> <h:outputText value="#{category.price}" id="price" /> </rich:column> <rich:column> <f:facet name="header"> <h:outputText value="Mileage" /> </f:facet> <h:outputText value="#{category.mileage}" /> </rich:column> <rich:column width="200px"> <f:facet name="header"> <h:outputText value="VIN" /> </f:facet> <h:outputText value="#{category.vin}" /> </rich:column> <rich:column> <f:facet name="header"> <h:outputText value="Stock" /> </f:facet> <h:outputText value="#{category.stock}" /> </rich:column> <rich:column> <f:facet name="header"> Actions </f:facet> <a4j:commandLink ajaxSingle="true" id="editlink" oncomplete="#{rich:component('editPanel')}.show()"> <h:graphicImage value="/images/icons/edit.gif" style="border:0"/> <f:setPropertyActionListener value="#{category}" target="#{dataTableScrollerBean.currentItem}" /> <f:setPropertyActionListener value="#{row}" target="#{dataTableScrollerBean.currentRow}" /> </a4j:commandLink> <rich:toolTip for="editlink" value="Edit"/> <a4j:commandLink ajaxSingle="true" id="deletelink" oncomplete="#{rich:component('deletePanel')}.show()"> <h:graphicImage value="/images/icons/delete.gif" style="border:0"/> <f:setPropertyActionListener value="#{row}" target="#{dataTableScrollerBean.currentRow}" /> </a4j:commandLink> <rich:toolTip for="deletelink" value="Delete"/> </rich:column> <f:facet name="footer"> <rich:datascroller renderIfSinglePage="false" maxPages="5"/> </f:facet> </rich:dataTable> </a4j:region> </h:form> <rich:modalPanel id="editPanel" autosized="true" width="450"> <f:facet name="header"> <h:outputText value="Edit Current Car" /> </f:facet> <f:facet name="controls"> <h:panelGroup> <h:graphicImage value="/images/modal/close.png" id="hidelink" styleClass="hidelink"/> <rich:componentControl for="editPanel" attachTo="hidelink" operation="hide" event="onclick" /> </h:panelGroup> </f:facet> <h:form> <rich:messages style="color:red;"></rich:messages> <h:panelGrid columns="1"> <a4j:outputPanel ajaxRendered="true"> <h:panelGrid columns="2"> <h:outputText value="Make"/> <h:inputText value="#{dataTableScrollerBean.currentItem.make}" /> <h:outputText value="Model" /> <h:inputText value="#{dataTableScrollerBean.currentItem.model}" /> <h:outputText value="Price" /> <h:inputText value="#{dataTableScrollerBean.currentItem.price}" label="Price"/> </h:panelGrid> <rich:message showSummary="true" showDetail="false" for="price"/> </a4j:outputPanel> <a4j:commandButton value="Store" action="#{dataTableScrollerBean.store}" reRender="make, model, price" oncomplete="if (#{facesContext.maximumSeverity==null}) #{rich:component('editPanel')}.hide();" /> </h:panelGrid> </h:form> </rich:modalPanel> <rich:modalPanel id="deletePanel" autosized="true" width="200"> <f:facet name="header"> <h:outputText value="Delete this car from list?" style="padding-right:15px;" /> </f:facet> <f:facet name="controls"> <h:panelGroup> <h:graphicImage value="/images/modal/close.png" styleClass="hidelink" id="hidelink2" /> <rich:componentControl for="deletePanel" attachTo="hidelink2" operation="hide" event="onclick" /> </h:panelGroup> </f:facet> <h:form> <table width="100%"> <tbody> <tr> <td align="center" width="50%"> <a4j:commandButton value="Yes" ajaxSingle="true" action="#{dataTableScrollerBean.delete}" oncomplete="#{rich:component('deletePanel')}.hide();" reRender="table" /> </td> <td align="center" width="50%"> <a4j:commandButton value="Cancel" onclick="#{rich:component('deletePanel')}.hide();return false;" /> </td> </tr> </tbody> </table> </h:form> </rich:modalPanel> <a4j:status onstart="#{rich:component('wait')}.show()" onstop="#{rich:component('wait')}.hide()"/> <rich:modalPanel id="wait" autosized="true" width="200" height="120" moveable="false" resizeable="false"> <f:facet name="header"> <h:outputText value="Processing"/> </f:facet> <h:outputText value="Wait Please..."/> </rich:modalPanel> <rich:messages></rich:messages> </ui:composition>
works fine after filtering. I'm using edit button and new values shown in modal panel. -
8. Re: rich:datatable filterExpression f:setPropertyActionListe
christian.yttesen Mar 27, 2009 8:40 AM (in response to christian.yttesen)Lesson learned - don't store your "filtering" value in a request-scoped bean.
My filtering bean was stored in request scope. This explains the observed behavior. I was facing a similar unwanted behavoir - using filtering and navigation using the datascroller - it was "clearing" my filter - thus all elements would reappear when using the datascroller.
Thanks Ilya for taking the time to confirm it was not a RF bug - I'm still learning.