In this pull request we created the ability to have template widgets. This feature allows you to change only your entity file for portal to get a smart widget. The example I give is the payroll information portlet.
You need to add the following portlet-preferences to your portlet-definition file:
This is where we will get the data from (in a JSON format). If this is an external call outside of the portal container, you have to do some magic that I'll cover in another post.