I am creating the model in backing bean.
My java lines of code are like this
UIColumn column = new HtmlColumn();
dynamicDataTable.getChildren().add(column);
UIAjaxCommandLink editLink = new HtmlAjaxCommandLink();
editLink.setId("edit");
HtmlGraphicImage img = new HtmlGraphicImage();
img.setUrl("../images/edit.gif");
editLink.getChildren().add(img);
editLink.setActionExpression(createActionExpression("#{myBean.editRow}", String.class));
editLink.setAjaxSingle(true);
editLink.setValueExpression("onComplete", createValueExpression("#{rich:component('editPanel')}.show()", RichFunction.class));
editLink.setValueExpression("reRender", createValueExpression("editPanel", String.class));
column.getChildren().add(editLink);
I get an error. The same works for in the xhtml page.
<a4j:commandButton value="Edit" ajaxSingle="true"
oncomplete="#{rich:component('editPanel')}.show()"
actionListener="#{myBean.addActionListener}" reRender="editPanel"/>
How can I resolve the above error.
I got the solution, I put the following code
instead of
McDowell : Now coming to the createValueExpression:
I used the example from this to create this table with dynamic columns.
http://balusc.blogspot.com/2006/06/using-datatables.html#PopulateDynamicDatatable
Thanks Bauke Luitsen Scholtz (BalusC)