+ Start a Discussion

Passing parameter to Controller WITHOUT ID



I a complex VF page and controller acting as a wizard to create new records.  The controller has 3 wrapper classes that nest inside each other.  I have a checkbox that will allow the user to 'selectAll' items from one of the nested wrapper classes.  I need to be able to pass the specific OUTER wrapper class to update the 'selected' value for all of the INNER wrapper classes on it.  Please note that this is all done in memory so I don't have a record ID to pass using the parameters function.


If I need to add code to help illustrate the issue I can, but thought it might muddy the waters.


Thanks for any help,

Jeremy Stender


You'll still need an identifier of some type, to allow you to uniquely identify the wrapper class.


I wrote a blog post on managing lists of new records which has one example of identifying records from an id assigned by the controller:




Is that any help?


I got around it by sitting a boolean variable on the wrapper that I update using <apex:param/> to true, then call the method onclick.  The method cycles through all the wrappers (or sub-wrappers if appropriate) until it finds the one that is true.  It does its job then resets it to false.   Fairly simple just took a little thinking on top of the fact that I forgot that the <apex:param> tag DOESN'T ACTUALLY WORK unles you give it a name.  It compiles just fin but never does its job.


Anyhow, thanks for the help!


Jeremy Stender