addwidgetinpage should always be called