Li,
Yes you are correct, by default anything that is added as a UI widget will open automatically so what you are trying to achieve is to close the widget straight away (but the widget is still loaded into the application so can be open when required), I tested this by adding the code: this.wTemplate.widgetState = "closed" into the basewidget_widgetConfigLoaded() function, you may not have this as you are probably not using a config xml for your widget so placing it in the init() function should be OK.
I'm not sure why if you have built your widget based on the standard template why you cannot call this.wTemplate.widgetState, have you change the name of the id of the viewer:WidgetTemplate:
<viewer:WidgetTemplate id="wTemplate" ..........>
if you have changed the id you will need to use this.idname.widgetState
Regards
Anthony