My intended application is to provide a list of products in a simple Joomla list/table display with check boxes where the end user can click on one or more items, press the print button and the data behind those items is collected and passed to another Joomla component to manage the printing of the labels for those products selected.
There is planned to be multiple components(Component X) wanting to print various labels so I want to keep the printing side of things separate in its own component(Component P) and not embedded in each component, making it plug-able so I can replace it later on if a better solution becomes available.
In Component X I have the controller processing the selected items, calling the model to get extra information for those products and creating a data-set that is in JSON format, but will consider other options. After this processing occurs I plan to trigger a Plugin and pass the JSON file to the plugin.
The plugin will do a few checks and then call Component P, the print manager component, that will essentially display a Form with a couple of buttons and the data from Component X in a field or object, at least in some form that I can access it. There will be other controllers and helpers behind this form to find printers and layout templates etc. to do the actual printing.
And this is where I need help, I can't think of a way or find any suitable examples of how to get the data from Component X that is in my Plugin across to a view or model in Component P. Can anyone suggest some possible approaches I might be able to research?
I have considered putting the data to a SQL table to pass between the components but then it creates further issues with multiple requests happening at the same time, cleaning up afterwards and the fields used are not always going to be the same. Therefore I am reluctant to use a table if it can be avoided.