You need to sign in to do that
Don't have an account?
Does Dynamic Visualforce Component (Page block table) support "wrapper class"??
I was tring to build a Page Block table with Inner class list :
Component.Apex.PageBlockTable pbt = new Component.Apex.PageBlockTable(var = 'opl' , id='ptable') ; pbt.expressions.value='{!opClassList}' ;
here opClassList is list of inner class elements.
and was try ing to add input field as column
Component.Apex.InputField inputField = new Component.Apex.InputField(); inputField.expressions.value = '{!opl.ol.' + fName + '}'; column.childComponents.add(inputField);
here the fname is API name.
The wrapper class looks like this :
public class otable { public Opportunity_Line__c ol{get;set;} public boolean selected{get;set;} public otable(Opportunity_Line__c o) { ol = o; selected = false; } }
But it does not seem to work. But if I use Opportunity Line list directly then it works perfectly. so my question is Does Dynamic Visualforce Component (Page block table) support "wrapper class"?? or there is some prob with my code. Have any one tried wrapper class with Visualforce Component (Page block table) to get the selected list?
Thanks in advance :)
What is the output of the variable fName?
Should it not be:
Hai,
Sry that was typo problem. It was
and fname is the Field API.
but it does not seem to work when I use the wrapper class . but it works perfectly when I use the normal object list and try to show it through page block table.
Have u tried it and does that work for you? any working example of "wrapper class" table will do. I just want to be sure that Dynamic Visualforce Component (Page block table) supports "wrapper class" or not.
Could you post the whole code (from getting the fields, to setting them using the wrapper class, the wrapper class and the dynamic component builder and append).