+ Start a Discussion
UmapenUmapen 

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)

 

 

 

Message Edited by Umapen on 11-29-2009 11:52 PM
Best Answer chosen by Admin (Salesforce Developers) 
BeeddiskShahBeeddiskShah

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

bob_buzzardbob_buzzard

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.

 

 

BeeddiskShahBeeddiskShah

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

 

This was selected as the best answer
BeeddiskShahBeeddiskShah
Hey this is the exact approach I have used to develop a few things. Using the id on parameters.