Can not set StiOptions.viewer.toolbar.showAboutButton
Posted: Mon Sep 17, 2012 5:16 am
Hi,
I am trying to set viewer toolbar properties by doing the following:
And as a result I have:
What is wrong in my sequence?
Regards
I am trying to set viewer toolbar properties by doing the following:
Code: Select all
protected function init(event:FlexEvent):void {
StiApiProvider.provider = new StiApiProviderJava(StiApiProvider.AppDesignerFx);
var initializeProviderEvent: StiApiProviderEvent = new StiApiProviderEvent(StiApiProviderEvent.INITIALIZE_PROVIDER, stiJavaServerUrl, StiProgressMode.Visible);
StiApiProvider.provider.addEventListener(StiApiProviderEvent.INITIALIZE_PROVIDER_RESULT, onInitailizeProviderResult);
StiApiProvider.provider.addEventListener(StiApiProviderEvent.LOAD_DATA_RESULT, checkOptons);
StiApiProvider.provider.addEventListener(StiApiProviderEvent.LOAD_REPORT_RESULT, checkOptons);
StiApiProvider.provider.addEventListener(StiApiProviderEvent.LOAD_CONFIGURATION_RESULT, checkOptons);
StiApiProvider.provider.dispatchEvent(initializeProviderEvent);
}
protected function onInitailizeProviderResult(event:StiApiProviderEvent):void {
trace("before onInitailizeProviderResult showAboutButton: " + StiOptions.viewer.toolbar.showAboutButton);
StiViewerFx.initialize();
StiOptions.applicationType = StiApplicationType.Java;
StiOptions.connection.enableDataLogger = true;
...
StiOptions.viewer.toolbar.showAboutButton = false;
StiOptions.viewer.toolbar.showOpenButton = false;
StiOptions.viewer.toolbar.showParametersPanel = true;
StiViewerFx.initialize();
trace("after onInitailizeProviderResult showAboutButton: " + StiOptions.viewer.toolbar.showAboutButton);
}
protected function checkOptons(event:StiApiProviderEvent):void {
trace("after :" + event.baseType + " showAboutButton:" + StiOptions.viewer.toolbar.showAboutButton);
}
Code: Select all
before onInitailizeProviderResult showAboutButton: true
after onInitailizeProviderResult showAboutButton: false
after creationComplete showAboutButton:false
after :loadConfiguration showAboutButton:false
after :loadReport showAboutButton:true
after :loadData showAboutButton:true
after :loadData showAboutButton:true
after :loadData showAboutButton:true
after :loadData showAboutButton:true
after :loadData showAboutButton:true
after :loadData showAboutButton:true
Regards