I've replaced a lot of that molding on my trailer, and it is held in place with 3M double sided tape, an automotive product used for attaching moldings to cars. However, once it lets go (usually due to oil or silicone on the surface), it really won't stick on again.
Contact cement might work if you can get the surfaces clean before applying it. You can also buy the tape at an auto parts store, but that would mean removing all of that piece of molding, and then cleaning off all of the old tape...not an easy task.
Then the last resort, you can buy new molding with the tape already attached, but it is not inexpensive....sold by the foot and IIRC around $3/ft.
"To compel a man to subsidize with his taxes the propagation of ideas which he disbelieves and abhors is sinful and tyrannical."-- Thomas Jefferson