cancel
Showing results for 
Search instead for 
Did you mean: 

Switching Flash

Former Member
0 Kudos

Hi All,

I have a Flash Island View and another view containing a ViewContainer. I embedded the Flash Island View in the ViewContainer and it works fine.

Now, I need to load another flash in place of the first one, on an action.

How can this be done? Any ideas?

Regards,

Motaz

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

As i understood you have two FlashIslands and on some action you want to show the other Flash. So here is the workaround for that....

1) I assume you have a view

2) In that view insert two view containers each one have a view with Flash Islands. So now you have two view containers

holding two flash islands.

3) Now what you do is as ViewContainers are UI elements you have Visible Property. So create a attribute of type Visible and

bind that attribute to view container property Visible and set the visibility as according to your action.

Hope you understood this.....

Regards

Raghu

Answers (10)

Answers (10)

Former Member
0 Kudos

Decided to refresh the application and pass the new selection using context attributes.

Former Member
0 Kudos

Hi Arul,

Sorry, but I don't understand what you mean exactly?

Regards,

Motaz

Former Member
0 Kudos

Hi Armin,

I already tried that, but it does not load the new flash. Do I need to reload or refresh the view? If so, how can I do that?

Regards,

Motaz

Former Member
0 Kudos

That sounds strange to me. If you execute an action handler the view will be rendered automatically without any need for refresh.

Armin

Former Member
0 Kudos

An idea;

I am sure that you want to display a different flash with different User interface based on some data in the context. May be you can dynamicall handle the change within flash based on a flag. So develop one flash with different user interface. will that work for you?.

Arul

Former Member
0 Kudos

Hi Armin,

Well I already did it using plugs. The problem is, there is a large number of flashes and using plugs is not very efficient.

Setting the defaultViewUsage won't work? Even in the wdDoModifyView?

Regards,

Motaz

Former Member
0 Kudos

Can't you just use a single view with a FlashIsland UI element, bind the "swfFile" property to some context attribute and just change the attribute value in the action handler?

Armin

Former Member
0 Kudos

Hi All,

Please, if anyone has any idea what I am doing wrong or if this cannot be done, please inform me. I have been trying different methods to implement this for days, but nothing works!

Regards,

Motaz

Former Member
0 Kudos

I would create separate views for each Flash content, put a ViewContainerUIElement into the parent view, embed the first Flash view into this element, define a navigation link from the first to the second Flash view and fire the navigation link in the action handler.

Armin

Former Member
0 Kudos

Hi Raghu,

Thank You for your concern and help. However, I know about the visibility principal. As you said its not exactly navigation.

What I am trying to implement is ONE view container that can switch defaultViewUsages according to different actions.

Unfortunately, the code that performs this switch currently only works in wdDoInit. I tried it many times in actions and in wdDoModifyView, but it does not work!

Does anyone have any idea how this can be fixed?

This is my code:

myWindow = wdComponentAPI.getComponentInfo().findInWindows("FlashBECompWindow");

VCUIMain = myWindow.getViewUsageByID("VCMain");

VCAIMain = (IWDViewContainerAssignmentInfo)VCUIMain.getViewContainerAssignments().iterator().next();

Child = myWindow.getViewUsageByID("Test");

A=Child.getView();

VUInner = VCAIMain.createEmbeddedViewUsage();

VUInner.setView(A);

VCAIMain.setDefaultViewUsage(VUInner);

Regards,

Motaz

Edited by: Motaz Abu Karat on Jul 29, 2009 1:55 PM

Former Member
0 Kudos

Hi All,

Well can I navigate dynamically and not using plugs?

Regards,

Motaz

Former Member
0 Kudos

Hi,

That is what exactly i have suggested your in my earlier post.

You can navigate dynamically without using plugs when you have different view container UI elements each with one view embeded with FlashIsland.

As ViewContainer is Child UI element to the first view you can set the VISIBLE Property of View Container as per your requirement.

For this you need a context attribute of type IWDVisible

Bind the Visible property of the ViewContainer UI element to that attribute.

In your code write the following code as per your requirement.

wdContext.currentContextElement().setVisproperty(WDVISIBLE.VISIBLE) // to show the viewcontainer

wdContext.currentContextElement().setVisproperty(WDVISIBLE.NONE) // to hide the view container.

The above method is not exactly called navigation but you are just hiding the viewcontainer when ever you dont need and show the other on any action.

When you insert a ViewContainer in any View at a time you can see only ViewContainer, so you can manage the navigation.

Hope you understood....

Regards

Raghu

Former Member
0 Kudos

Hi,

Yes u create another view and embed flash island in that view.

Regards,

Sunaina Reddy T

Former Member
0 Kudos

Hi

Create another view and embedded flashIsland to that view.As per Armin said navigate view in action handler

Regards

Ruturaj

Former Member
0 Kudos

Just put the second FlashIsland into a separate view and navigate to that view in the action handler.

Armin

Former Member
0 Kudos

Hi

You can go with multiple views or embedded views and navigate based on the action or flag set.

regards

Anand