webadmin: template import

- When trying to import a template the popup would
  generate a class cast exception. This patch solves
  that exception and another subsequent one.

Change-Id: Iec132ab7be596207c3bcee97753bbf08d14e737d
Signed-off-by: Alexander Wels <awels@redhat.com>