front: Move some java code functionality into xml resources.