You need to sign in to do that
Don't have an account?
Umapen
List view, add new and edit all in one page
I am trying to (1)provide list of records, (2) ability to add new record and (3) edit record on the same page.
I am able to add but not able to edit. any suggestions.
I am able to show the list and add to the list. when click on the edit commandlink I want the output panel inputfields to be populated by selected record for edit.
(cannot see my attached image)
What you need is multiple output panel with Show/Hide Div facility.
Here is a sample code which can help.
Hope it helps,
Siddhesh Kabe
http://force.siddheshkabe.co.in
All Answers
We have a couple of pages that do exactly this.
I can't see your attached image, so I'm not sure how far you've got.
We display the list via a pageBlockTable. There are view and edit columns - the view columns just display the contents of the sobject, while the edit columns display input fields for the sobject. The view columns are rendered when the id of the sobject doesn't match that selected for edit. The edit columns are rendered when the id of the sobject does match that selected for edit. There is an edit command link that sets the id selected for edit into the page controller.
Does this match with how you are trying to do it? If you need more help, can you post your page and controller so that we can see exactly how you are trying to achieve this.
What you need is multiple output panel with Show/Hide Div facility.
Here is a sample code which can help.
Hope it helps,
Siddhesh Kabe
http://force.siddheshkabe.co.in