function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BridgetreeBridgetree 

copy pageBlockTable details to fields

I have a pageBlockTable in which value refers to a Wrapper class refering to one object. I am adding some products and its details. Suppose now i have 5 rows, each of data fetched in from wrapper class. Now i want each of these column data in each row to be copied to fields of another object.

 

someone can really think of it.

 

Thanks in advance

Raaaaj

 

 

bob_buzzardbob_buzzard

Does each row of the table refer to a wrapper class, or is there a single wrapper class that contains all the data for the pageblocktable?

 

Are you looking to copy this information via apex code?

BridgetreeBridgetree

its a single wrapper class that contains all the data for the pageblocktable. I am trying to copy it thru javascript., by please tell me the way to do in apex. Its not workin in JS.

 

 

Raaj

bob_buzzardbob_buzzard

Are you allowing the user to change the values in the wrapper class?  If so, you'll need a way to submit the form (an apex:commandbutton is a good candidate) that is tied to an action method in the controller.  Then in the action method you can traverse the wrapper class and pull the information out into your other objects.

BridgetreeBridgetree

Let me explain it fully to you.

I have pop up to select the required products in the store. Once i select the product(suppose 3),

3 rows are filled up in the pageBlockTable, Product name, prod code, Unit price, etc. All these are perfectly working with the help of wrapper class. Now this table is embeded in a VFP for a standard controller of another object. 

 

So when i click save the same pageBlock table should appear in the record. I have created the Product name, prod code, Unit price fields in this custom object as well. Now i have to embed the values to this with the values in  table.

 

 

Raaj

bob_buzzardbob_buzzard

I'm still not quite clear about this - can a single instance of the other object contain information on those three products? It sounds like you have a single product name field - how would the three product names from the table map to that?

BridgetreeBridgetree

i think you will have to see my coding lively. A help on skype would a greatest help. Please do help me. There is a sword on my neck i have to finish off this by today.

 

Waiting to hear from you.

Personal id is phanirajnadiger@gmail.com

 

Raaj

 

bob_buzzardbob_buzzard

Sorry, but I can't do one to one consults without charging for it.

BridgetreeBridgetree

Absolutely no issues... i think i have found the solution. If i get any probs i will put it on board.

 

 

Raaj

bob_buzzardbob_buzzard

Cool.  Glad to hear you got there.