You need to sign in to do that
Don't have an account?
JimRae
Inputfield support on wrapper class member variables
Does anyone have a method for getting a wrapper class "object" to emulate an sObject, so that the fields have inputfield support on a VF page?
I have searched, and it appears you need to implement an instance of an object, and bind the fields to the objects fields, but I can't seem to make this work. Anyone ever do this? have sample code?
My actual requirement is this, I have a custom object and want to have a VF page for creation and editing. one section of the page is a grid with multiple rows of the same data (in the object they are labeled like this: valA1,valB1,valC1,valA2,valB2,valC2 etc). A is a string field, B is a lookup and C is a date.
Any thoughts or suggestions would be greatly appreciated.
Jim
I have searched, and it appears you need to implement an instance of an object, and bind the fields to the objects fields, but I can't seem to make this work. Anyone ever do this? have sample code?
My actual requirement is this, I have a custom object and want to have a VF page for creation and editing. one section of the page is a grid with multiple rows of the same data (in the object they are labeled like this: valA1,valB1,valC1,valA2,valB2,valC2 etc). A is a string field, B is a lookup and C is a date.
Any thoughts or suggestions would be greatly appreciated.
Jim
http://community.salesforce.com/sforce/board/message?board.id=Visualforce&message.id=8388#M8388
defining a wrapper.
note his comment:
To access the wrapper class, I just used {!product.line.UnitPrice} for the standard Salesforce or {!product.UnitPrice} for the value in my custom wrapper class to get the formatting that I wanted.
this will give your InputField a valid sobject to display
then i can offer suggestions.
I don't think that I am doing it correctly at all.
Step back to my original scenario.
I have a custom object that has a section that includes 3 rows of similar data, a description (string), a Contact (lookup) and a date.(Date)
In the object, they look like this: desc1,contact1,date1,desc2,contact2,date2,desc3,contact3,date3
my goal was to display them on a VF page in a table grid view for both viewing and editing.
My original thought was to array them using a wrapper class, and creating a list of that class that could be accessed by a datatable on my page
The problem with this is that I lose access to the inputfield functionality (the lookup for example, and the datepicker).
I guess I could build my own table using the original fields, but I was hoping to figure this out, in case I needed the functionality in other cases.
So, my goal was to somehow access a wrapper class object in a way that the fields still had their inputfield properties, but could be manipulated in my apex code, and ultimately update one final instance of my custom object.
My thought was do do something like this:
Then somehow use those primitive datatypes to populate values in my real record to update.
Any suggestions would be greatly appreciated!