-
1. Re: scrollableDataTable and commandLink
ilya_shaikovsky Oct 2, 2007 4:24 AM (in response to jzuccaro)Strange..
<rich:scrollableDataTable width="300px" height="400px" value="#{capitalsBean.capitals}" var="cap"> <rich:column> <h:inputText value="#{cap.name}" styleClass="myClass"/> </rich:column> <rich:column> <h:outputText value="#{cap.state}"/> </rich:column> <rich:column> <a4j:commandLink value="simple" action="#{bean.action}"></a4j:commandLink> </rich:column> </rich:scrollableDataTable>
andpublic String action() { System.out.println("action called"); return null; }
And I'm able to see the output from the console.
Bean - request
CapitalsBean - session
JSF 1.2_04
Facelets 1.1.12
RF 3.1.1 SNAPSHOT
Tomcat 6
please use phasetracker to get info about the JSF phase that failed to be processed normally. -
2. Re: scrollableDataTable and commandLink
alexmreis Oct 3, 2007 3:41 PM (in response to jzuccaro)Having the exact same problem under Sun JSF RI 1.1_02.
<h:commandLink> and <h:commandButton> don't call their action methods when used inside a rich:scrollableDataTable. Changing it for a rich:dataTable fixes the problem (although i need the ajax scrolling functionallity in my app so I still have a problem).
Anyone found a solution yet? -
3. Re: scrollableDataTable and commandLink
sergeysmirnov Oct 3, 2007 4:08 PM (in response to jzuccaro)<h:commandLink> and <h:commandButton> don't call OR just <h:commandLink> ?
-
4. Re: scrollableDataTable and commandLink
alexmreis Oct 3, 2007 4:24 PM (in response to jzuccaro)h:commandLink> AND <h:commandButton> - not necessarily together, happens with both, whether there's only one of them, or if they are isolated or on the same cell.
-
5. Re: scrollableDataTable and commandLink
alexmreis Oct 3, 2007 4:29 PM (in response to jzuccaro)Btw, I'm using Tomcat 5.5.25, JDK 1.6.0_02, JSF RI 1.1_02 and RichFaces 3.1.0
-
6. Re: scrollableDataTable and commandLink
ilya_shaikovsky Oct 4, 2007 9:20 AM (in response to jzuccaro)Ok I've changed my Env to
JSF RI Implementation-Version: 1.1_02-b08
No facelets
RF 3.1.1
Tomcat 5.5
And still have action fired with<f:view> <h:form> <rich:scrollableDataTable value="#{capitalsBean.capitals}" var="cap" width="200px" height="300px"> <rich:column> <h:outputText value="#{cap.name}" /> </rich:column> <rich:column> <h:outputText value="#{cap.state}" /> </rich:column> <rich:column> <h:commandLink value="action" action="#{capitalsBean.action}"></h:commandLink> </rich:column> </rich:scrollableDataTable> </h:form> </f:view>
public String action() { System.out.println("Action fired"); return null; }
-
7. Re: scrollableDataTable and commandLink
ilya_shaikovsky Oct 4, 2007 9:20 AM (in response to jzuccaro)Probably need your full sample to reproduce.
-
8. Re: scrollableDataTable and commandLink
alexmreis Oct 4, 2007 12:29 PM (in response to jzuccaro)http://alexeshadow.googlepages.com/tabela.zip
Page with the test case is home.jsp
WEB-INF/lib has been ommited to save space. If you wanna run the full app you'll need all hibernate libs, hibernate JPA, JSF and apache commons manager, and apache myfaces tomahawk. -
9. Re: scrollableDataTable and commandLink
alexmreis Oct 5, 2007 10:35 AM (in response to jzuccaro)Where can I get a 3.1.1 build so I can try this issue with the same config as yours?
-
11. Re: scrollableDataTable and commandLink
arielfernando Oct 5, 2007 10:56 AM (in response to jzuccaro)I try 3.3.1 and same problem.... actionListener method is never called from a commandLink inside scrollableDataTable, and works fine fom a dataTable.
Richfaces 3.1.1
No facelts
Trinidad 1.03
Myfaces 1.1.5
Tomahawk 1.1.6
Tomcat 5.5.23
(I try others enviroments...Tomcat 6.0.14, JSF 1.2, Trinidad 1.2.2... with and without a4j-trinidad.jar... but no success).
This is my original post:
http://jboss.com/index.html?module=bb&op=viewtopic&t=119995 -
12. Re: scrollableDataTable and commandLink
maksimkaszynski Oct 8, 2007 10:43 AM (in response to jzuccaro)arielfernando,
I'm still unable to reproduce the problem. I tried on both Myfaces 1.1.5 and RI 1.2.
can you provide source code of your action method? -
13. Re: scrollableDataTable and commandLink
arielfernando Oct 8, 2007 12:03 PM (in response to jzuccaro)Yes, sure!!!.
This is my complete "newCountry.jsp" file:<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%> <%@ taglib uri="http://myfaces.apache.org/trinidad/html" prefix="trh"%> <%@ taglib uri="http://myfaces.apache.org/trinidad" prefix="tr"%> <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%> <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%> <f:view> <a4j:page> <f:loadBundle basename="com.goytiapkg.econtroller.bundles.mensajes" var="msg" /> <f:loadBundle basename="com.goytiapkg.econtroller.bundles.titles" var="title" /> <f:loadBundle basename="com.goytiapkg.econtroller.bundles.forms" var="tag" /> <tr:document title="#{title.applicationName}"> <t:div styleClass="main"> <f:subview id="idSubView"> <t:saveState value="#{newCountry}" /> <t:div styleClass="mainPanel"> <rich:panel> <f:facet name="header"> <h:outputText value="#{title.newCountry}" /> </f:facet> <tr:panelBorderLayout> <f:facet name="left"> <tr:form id="formCountry"> <a4j:outputPanel id="idFormPanel"> <tr:panelFormLayout> <tr:inputText id="idCodeName" label="#{tag.codeName}" value="#{newCountry.codeName}" required="true" requiredMessageDetail="{0} is required." columns="4" maximumLength="3" binding="#{newCountry.inputTextCodeName}"> <tr:validateLength minimum="1" maximum="3" /> </tr:inputText> <tr:inputText label="#{tag.countryName}" value="#{newCountry.name}" binding="#{newCountry.inputTextNombre}"> </tr:inputText> <tr:panelButtonBar> <tr:commandButton id="idBtnSave" text="Save" actionListener="#{newCountry.save}" partialSubmit="true"> <a4j:support event="onclick" reRender="idListaPaises" /> </tr:commandButton> <tr:commandButton id="idBtnCancel" text="Cancel" actionListener="#{newCountry.cancelEditCountry}" partialSubmit="true" binding="#{newCountry.botonCancelEdition}" rendered="false" immediate="true" /> </tr:panelButtonBar> </tr:panelFormLayout> </a4j:outputPanel> </tr:form> </f:facet> <f:facet name="right"> <h:form id="formLista"> <rich:scrollableDataTable id="idListaPaises" value="#{pais.listPaises}" rowKeyVar="rowKey" var="row" height="250px" width="400px" rows="0" sortMode="single" frozenColCount="1"> <rich:column id="codeName"> <f:facet name="header"> <h:outputText value="#{tag.countryName}" /> </f:facet> <h:outputText value="#{row.codeName}" /> </rich:column> <rich:column id="nombre"> <f:facet name="header"> <h:outputText value="#{tag.codeName}" /> </f:facet> <h:outputText value="#{row.nombre}" /> </rich:column> <rich:column id="acciones" sortable="false"> <f:facet name="header"> <h:outputText value="Action" /> </f:facet> <a4j:commandLink value="Edit" actionListener="#{newCountry.editPais}" reRender=":idSubView:idFormPanel, :idSubView:prueba2" immediate="true"> <a4j:actionparam name="idCountry" value="18" assignTo="#{newCountry.id}" /> </a4j:commandLink> </rich:column> </rich:scrollableDataTable> </h:form> </f:facet> </tr:panelBorderLayout> <h:form id="formDataTable"> <rich:dataTable id="idListaPaisesDataTable" value="#{pais.listPaises}" var="row2"> <rich:column id="codeName2"> <f:facet name="header"> <h:outputText value="#{tag.countryName}" /> </f:facet> <h:outputText value="#{row2.codeName}" /> </rich:column> <rich:column id="nombre2"> <f:facet name="header"> <h:outputText value="#{tag.codeName}" /> </f:facet> <h:outputText value="#{row2.nombre}" /> </rich:column> <rich:column id="acciones2"> <f:facet name="header"> <h:outputText value="Action" /> </f:facet> <tr:commandLink id="editTrinidad" text="Editar" immediate="true" partialSubmit="true" actionListener="#{newCountry.editPais}"> <tr:setActionListener from="#{row2.id}" to="#{newCountry.id}" /> </tr:commandLink> <a4j:commandLink value="Edit" actionListener="#{newCountry.editPais}" reRender=":idSubView:idFormPanel, :idSubView:prueba2" immediate="true"> <a4j:actionparam name="idCountry" value="18" assignTo="#{newCountry.id}" /> </a4j:commandLink> </rich:column> </rich:dataTable> </h:form> <h:outputText id="prueba2" value="#{newCountry.name}" /> <t:div styleClass="mainPanelButtonBar"> <rich:separator /> <rich:spacer height="5px" /> </t:div> </rich:panel> </t:div> </f:subview> </t:div> </tr:document> </a4j:page> </f:view>
And, action method ("editPais") source code:public void editPais(ActionEvent event) { System.out.print("***START EDITPAIS METHOD****"); if(this.country.getId() >= 0) { this.inputTextCodeName.resetValue(); this.inputTextNombre.resetValue(); this.setCodeName("XXX"); this.setName("THIS IS A TEST"); this.botonCancelEdition.setRendered(true); } }
You can see that I'm mixed some trinidad and richfaces components. All works so fine from dataTable, but nothing happend from scrollableDataTable. The only problem that I found when reRender is called from dataTable, is that trinidad components styles are broken. For example, labels font types, or input text...
Best regards,
Ariel. -
14. Re: scrollableDataTable and commandLink
alexmreis Oct 8, 2007 2:38 PM (in response to jzuccaro)Just tested the issue with Richfaces 3.1.1 and still having the same problem, Tomcat 5.5.25, JSF RI 1.1_02, Apache MyFaces tomahawk 1.1.6, Richfaces 3.1.1. Test project posted before