For best battery life, I would suggest that you really need to have it charging off the truck. This will help keep charge the battery between dumps, which keeps it from getting low.
For storage, if you park the trailer under cover, then a plug in unit that is advertised as a charger/maintainer is needed. There are many to choose from, and I can't recommend one over another. They will not be high amperage, and will take a week or more to charge a battery that's been run down, which is why getting power from the truck while the trailer is in use is important.
If you park the trailer outside and in a place that gets some sun, then I'd suggest you can't go wrong with a small solar panel mounted on the tool box. A 10W panel should do the job even if it only gets sun a few hours a day. A larger panel will charge it faster, but you would want to be sure to put a small charge controller on it so you don't overcharge the battery if it gets a lot of sun all the time. I have a 5w panel wired direct through a diode on my fire trailer, and it maintains the battery well without cooking the battery.