Lagrangian formalism and retarded classical electrodynamics