From jira-events at lists.jboss.org Fri Jun 10 12:11:59 2011 Content-Type: multipart/mixed; boundary="===============1887772243347343221==" MIME-Version: 1.0 From: Jay Balunas (JIRA) To: richfaces-issues at lists.jboss.org Subject: [richfaces-issues] [JBoss JIRA] Updated: (RF-11028) Dynamic extendDataTable not support ajax support Date: Fri, 10 Jun 2011 12:11:59 -0400 Message-ID: <2089855500.19603.1307722319629.JavaMail.tomcat@jira02.app.mwc.hst.phx2.redhat.com> In-Reply-To: 1695541044.38854.1306901160917.JavaMail.tomcat@jira02.app.mwc.hst.phx2.redhat.com --===============1887772243347343221== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable [ https://issues.jboss.org/browse/RF-11028?page=3Dcom.atlassian.jira.p= lugin.system.issuetabpanels:all-tabpanel ] Jay Balunas updated RF-11028: ----------------------------- Fix Version/s: 3.Future > Dynamic extendDataTable not support ajax support > ------------------------------------------------ > > Key: RF-11028 > URL: https://issues.jboss.org/browse/RF-11028 > Project: RichFaces > Issue Type: Task > Security Level: Public(Everyone can see) = > Components: component-a4j-core, component-tables > Affects Versions: 3.3.3.Final > Environment: Operating system Windows XP, Browser IE-7 and FirFox4 > The JDK or JRE you are using, e.g. Sun Microsystems JDK 1.5.0_09 = > Reporter: umanath muthuvel > Labels: richfaces > Fix For: 3.Future > > > Dynamic extendDataTable creation not supporting ajax support > Creating Dynamic binding for rich:extendedDataTable with 2 columns and 5 = row of dateList. = > And after running my xhtml page the hole data (5 row of data with 2 colum= ns are displayed) > But after I am clicking any row the a4j:support not firing corresponding = method. ( But whenever clicking the row the jsf life cycle are printing in = consoule) > So I am trying Statically with same data and same a4j:support event and a= ction... this time it firing the corresponding method. > > > xmlns:h=3D"http://java.sun.com/jsf/html" > xmlns:f=3D"http://java.sun.com/jsf/core" > xmlns:ui=3D"http://java.sun.com/jsf/facelets" > xmlns:rich=3D"http://richfaces.org/rich" > xmlns:a4j=3D"http://richfaces.org/a4j" > xmlns:hex=3D"http://hexaware.com/custom"> > > = > > = > = > > = > = > = > > > > > -------------------------------------------------------------------------= ------------------ > And attached Static xhtml Page > > > xmlns:h=3D"http://java.sun.com/jsf/html" > xmlns:f=3D"http://java.sun.com/jsf/core" > xmlns:ui=3D"http://java.sun.com/jsf/facelets" > xmlns:rich=3D"http://richfaces.org/rich" > xmlns:a4j=3D"http://richfaces.org/a4j" > xmlns:hex=3D"http://hexaware.com/custom"> > > = > > = > = > = > > var=3D"category" = > sortMode=3D"single" = > value=3D"#{upmBranchMaintenanceBean.resultBranchListVO}" > > > > > > > > = > > > > > > > = > action=3D"#{upmBranchMaintenanceBean.takeSelection}" /> > = > > > > > -------------------------------------------------------------------------= --------------- > And for your reference i attached Dynamic table creation Source code here > private static HtmlExtendedDataTable createTable(String beanName, TableAt= tributes tableAttributes) { > System.out.println("-------- createTable -----------"); > HtmlExtendedDataTable extendedDataTable =3D new HtmlExten= dedDataTable(); > extendedDataTable.setId(tableAttributes.getId()); > String binding =3D "${" + beanName + "." + tableAttribute= s.getValue() + "}"; = > System.out.println("Tabel Value =3D "+binding); > ValueExpression valExp =3D getExpressionFactory() > .createValueExpression(getELContext(), binding, L= ist.class); > extendedDataTable.setWidth("100"); > extendedDataTable.setValueExpression("value", valExp); > extendedDataTable.setVar(tableAttributes.getVar()); > extendedDataTable.setSelectionMode(UPMUIConstant.MAINTENA= NCE_TABLE_SEL_MODE); > extendedDataTable.setSortMode(UPMUIConstant.MAINTENANCE_T= ABLE_SORT_MODE); > = > for(ColumnAttributes columnAttributes : tableAttributes.g= etColumnAttributesList()) { > System.out.println(" column "+columnAttributes.g= etHeader()); = > if(HtmlOutputText.COMPONENT_TYPE.equalsIgnoreCase= (columnAttributes.getComponentType())) { > HtmlOutputText headerComponent =3D new Ht= mlOutputText(); > headerComponent.setValue(columnAttributes= .getHeader()); > = > HtmlColumn htmlColumn =3D new HtmlColumn(= ); > htmlColumn.setHeader(headerComponent); > = > // Column ID is Must while creating dynam= ically, To avoid null pointer Exception. > // Based on id value to set the Column In= dex internally. > htmlColumn.setId(columnAttributes.getValu= e()); > = > binding =3D "#{" + tableAttributes.getVar= ()+ "." + columnAttributes.getValue() + "}"; > = > System.out.println("Column Value =3D "+bi= nding); > valExp =3D getExpressionFactory() > .createValueExpression(getELConte= xt(), binding, String.class); > = > HtmlOutputText outputText =3D new HtmlOut= putText(); = > outputText.setValueExpression("value", va= lExp); > htmlColumn.getChildren().add(outputText);= = > = > extendedDataTable.getChildren().add(htmlC= olumn); > System.out.println(" column added "); > = > = > } = > else if(HtmlAjaxSupport.COMPONENT_TYPE.equalsIgno= reCase(columnAttributes.getComponentType())) { > System.out.println(" Inside : "+ HtmlAjax= Support.COMPONENT_TYPE ); = > HtmlAjaxSupport ajaxSupport =3D new HtmlA= jaxSupport(); > = > ajaxSupport.setId("static_ajax_id"); > = > binding =3D "#{" + beanName + "." +column= Attributes.getAction() + "}"; = > System.out.println(" Method binding: "+bi= nding); > = > MethodExpression methodBind =3D getExpres= sionFactory().createMethodExpression(getELContext(), binding, null, new Cla= ss[] {}); = > ajaxSupport.setActionExpression(methodBin= d); > = > // MethodBinding action =3D FacesContext.get= CurrentInstance().getApplication() > // .createMethodBinding(binding, new Class[0]); > // ajaxSupport.setAction(action); > // = > System.out.println("Ajax Action :" +ajaxS= upport.getAction().getExpressionString()); > System.out.println("Ajax Action1 :" +ajax= Support.getActionExpression().getExpressionString()); > ajaxSupport.setEvent(columnAttributes.get= Event()); > System.out.println("Ajax event :" +ajaxSu= pport.getEvent()); > extendedDataTable.getChildren().add(ajaxS= upport); > } > } = > System.out.println(" return extendedDataTable "); > return extendedDataTable; > } -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira =20 --===============1887772243347343221==--