Title: Message
Hi Ved,
 
Here is a page which does something similar to what you are trying :
http://technology.amis.nl/blog/?p=1187
 
HTH,
 
Fintan
-----Original Message-----
From: ved.gunjan [mailto:[EMAIL PROTECTED]
Sent: 13 July 2006 19:38
To: MyFaces Discussion; guillaume bouichet
Subject: Re: HtmlDataTable and HtmlCommandLink


Hi Guillaume,
Im running in to similar kind of probelm..in fact my problem is worse....my requirment is that i have to create a dynamic datatable and which contains listing of question and and respectives answer. these questions and answer come from the server and along with the answer i also get the answer type , which tells what is the type of the UIComponent that is associated with the answer, so i have to dynamically create these UIComponent inside the datable.
My problem is that im not able to create this componets.
After going through your code below, it seems that u are doing similer kind of stuff.
Can u please provide me the entire java method which creates the uicomponents along with the jsp.
 
it will be greate if can help me out as im really in a bad shape.
looking forward for a positive response.
 
Thanks
ved

guillaume bouichet <[EMAIL PROTECTED]> wrote:
I'm trying to render dynamic HtmlDataTable with HtmlCommandLink as rows :

//my binding with my jsp is on HtmlPanelGrid grid
Application app = FacesContext.getCurrentInstance().getApplication();
HtmlPanelGrid grid = new HtmlPanelGrid();
List children = grid.getChildren();
HtmlDataTable dataTableComponent = new HtmlDataTable();
String simpleName = classModele.getSimpleName();
dataTableComponent.setVar(simpleName);
...
for (each columns) {
//Populate with UIColumn , it works fine
}

//Last column

UIColumn columnComponent = new UIColumn();
HtmlOutputText headerComponent = new HtmlOutputText();
headerComponent.setValue("MAJ");
columnComponent.setHeader(headerComponent);
HtmlCommandLink htmlCommandLink=(HtmlCommandLink)app.createComponent (HtmlCommandLink.COMPONENT_TYPE);
htmlCommandLink.setValue("Update");
Class[] argTypes = {ActionEvent.class };
MethodBinding vb=FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{renderer.update}", argTypes);
htmlCommandLink.setActionListener(vb);
MethodBinding mb = app.createMethodBinding("#{renderer.updateLine}",null);
htmlCommandLink.setAction(mb);
columnComponent.getChildren().add(htmlCommandLink);
childrenList.add(columnComponent);

// Then populate with data , work fine too.

The problem, is when I click on the html link no action is called, it just return to my original page ( my htmldatatable) with no data :-(

I've tried different ways but it always do the same.
I only succeed once but not programmatically ( just like http://www.oracle.com/technology/products/jdev/101/howtos/jsfdrilldown/index.html )

I think it's the same problem as : http://marc2.theaimsgroup.com/?l=myfaces-user&m=114106477925143&w=2

Guillaume













Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail Beta.


* ** *** ** * ** *** ** * ** *** ** *
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed.
Any views or opinions presented are solely those of the author, and do not necessarily represent those of ESB.
If you have received this email in error please notify the sender.

Although ESB scans e-mail and attachments for viruses, it does not guarantee
that either are virus-free and accepts no liability for any damage sustained
as a result of viruses.

* ** *** ** * ** *** ** * ** *** ** *

Reply via email to