26bd309 webui: treat value as pkey in link widget

Authored and Committed by pvoborni 9 years ago
    webui: treat value as pkey in link widget
    
    Current default mechanism of a link widget assumes that pkeys of a current facet are pkeys for the link. It works for the only usage - in password policy. It's rather inflexible since it can't be used if the keys are in other attribute. This behavior is also bad in nested entities - creates a link to itself which is pointless.
    
    This patch changes the default behavior to assume that the supplied value are the pkeys and that the last pkey is the value to display.
    
    It also keeps the old method of overriding `other_pkeys` method so if the last and only pkey is the actual value to display then the method can tranform it into the pkeys which keeps compatibility with descendant widgets (`host_dnsrecord_entity_link_widget`, `dnsrecord_host_link_widget`).
    
    Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>