Um... Strikes me that you may after all have been asking about the automatic flush, rather than the urinal?
If so, there's an adjustable restrictor valve giving a trickle of water to fill a cistern, then some kind of mechanism in there which flushes it when it's full. Don't know how that works.
I've also seen them operated by an electric timer.
Apparently Virginia Woolf was caught short in a compartment in a non-corridor train, and peed out of the window through a rolled up magazine. Not sure whether there were other passengers present, or any line-side spectators...