From jira-events at lists.jboss.org Wed Jun 1 01:02:02 2011 Content-Type: multipart/mixed; boundary="===============0101836462985505466==" MIME-Version: 1.0 From: umanath muthuvel (JIRA) To: richfaces-issues at lists.jboss.org Subject: [richfaces-issues] [JBoss JIRA] Updated: (RF-11028) Dynamic extendDataTable not support ajax support Date: Wed, 01 Jun 2011 01:02:01 -0400 Message-ID: <1529492554.38948.1306904521988.JavaMail.tomcat@jira02.app.mwc.hst.phx2.redhat.com> In-Reply-To: 1695541044.38854.1306901160917.JavaMail.tomcat@jira02.app.mwc.hst.phx2.redhat.com --===============0101836462985505466== 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 ] umanath muthuvel updated RF-11028: ---------------------------------- Description: = Dynamic extendDataTable creation not supporting ajax support Creating Dynamic binding for rich:extendedDataTable with 2 columns and 5 ro= w of dateList. = And after running my xhtml page the hole data (5 row of data with 2 columns= are displayed) But after I am clicking any row the a4j:support not firing corresponding me= thod. ( But whenever clicking the row the jsf life cycle are printing in co= nsoule) So I am trying Statically with same data and same a4j:support event and act= ion... this time it firing the corresponding method. = = = = = = ---------------------------------------------------------------------------= ---------------- And attached Static xhtml Page = = = = = = = ---------------------------------------------------------------------------= ------------- And for your reference i attached Dynamic table creation Source code here private static HtmlExtendedDataTable createTable(String beanName, TableAttr= ibutes tableAttributes) { System.out.println("-------- createTable -----------"); HtmlExtendedDataTable extendedDataTable =3D new HtmlExtende= dDataTable(); extendedDataTable.setId(tableAttributes.getId()); String binding =3D "${" + beanName + "." + tableAttributes.= getValue() + "}"; = System.out.println("Tabel Value =3D "+binding); ValueExpression valExp =3D getExpressionFactory() .createValueExpression(getELContext(), binding, Lis= t.class); extendedDataTable.setWidth("100"); extendedDataTable.setValueExpression("value", valExp); extendedDataTable.setVar(tableAttributes.getVar()); extendedDataTable.setSelectionMode(UPMUIConstant.MAINTENANC= E_TABLE_SEL_MODE); extendedDataTable.setSortMode(UPMUIConstant.MAINTENANCE_TAB= LE_SORT_MODE); = for(ColumnAttributes columnAttributes : tableAttributes.get= ColumnAttributesList()) { System.out.println(" column "+columnAttributes.get= Header()); = if(HtmlOutputText.COMPONENT_TYPE.equalsIgnoreCase(c= olumnAttributes.getComponentType())) { HtmlOutputText headerComponent =3D new Html= OutputText(); headerComponent.setValue(columnAttributes.g= etHeader()); = HtmlColumn htmlColumn =3D new HtmlColumn(); htmlColumn.setHeader(headerComponent); = // Column ID is Must while creating dynamic= ally, To avoid null pointer Exception. // Based on id value to set the Column Inde= x internally. htmlColumn.setId(columnAttributes.getValue(= )); = binding =3D "#{" + tableAttributes.getVar()= + "." + columnAttributes.getValue() + "}"; = System.out.println("Column Value =3D "+bind= ing); valExp =3D getExpressionFactory() .createValueExpression(getELContext= (), binding, String.class); = HtmlOutputText outputText =3D new HtmlOutpu= tText(); = outputText.setValueExpression("value", valE= xp); htmlColumn.getChildren().add(outputText); = = extendedDataTable.getChildren().add(htmlCol= umn); System.out.println(" column added "); = = } = else if(HtmlAjaxSupport.COMPONENT_TYPE.equalsIgnore= Case(columnAttributes.getComponentType())) { System.out.println(" Inside : "+ HtmlAjaxSu= pport.COMPONENT_TYPE ); = HtmlAjaxSupport ajaxSupport =3D new HtmlAja= xSupport(); = ajaxSupport.setId("static_ajax_id"); = binding =3D "#{" + beanName + "." +columnAt= tributes.getAction() + "}"; = System.out.println(" Method binding: "+bind= ing); = MethodExpression methodBind =3D getExpressi= onFactory().createMethodExpression(getELContext(), binding, null, new Class= [] {}); = ajaxSupport.setActionExpression(methodBind); = // MethodBinding action =3D FacesContext.getCu= rrentInstance().getApplication() // .createMethodBinding(binding, new Class[0]); // ajaxSupport.setAction(action); // = System.out.println("Ajax Action :" +ajaxSup= port.getAction().getExpressionString()); System.out.println("Ajax Action1 :" +ajaxSu= pport.getActionExpression().getExpressionString()); ajaxSupport.setEvent(columnAttributes.getEv= ent()); System.out.println("Ajax event :" +ajaxSupp= ort.getEvent()); extendedDataTable.getChildren().add(ajaxSup= port); } } = System.out.println(" return extendedDataTable "); return extendedDataTable; } was: Dynamic extendDataTable creation not supporting ajax support Creating Dynamic binding for rich:extendedDataTable with 2 columns and 5 ro= w of dateList. = And after running my xhtml page the hole data (5 row of data with 2 columns= are displayed) But after I am clicking any row the a4j:support not firing corresponding me= thod. ( But whenever clicking the row the jsf life cycle are printing in co= nsoule) So I am trying Statically with same data and same a4j:support event and act= ion... this time it firing the corresponding method. > 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 > > 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 --===============0101836462985505466==--