on 05-05-2008 3:14 PM
Hello@all,
I have 4 Tabs and on the right side on extra view.
Now I only want to show (enable) the view if I selected the firstTab.
when I selected the other three Tabs, the View should be disabled.
How should I do this??
With a context attribute?
or
With an action for the onSelected row in the TabStrip properties?
What should I do exactly. Please write the code for this feature.
It's a big problem.
Thanks
Best regards
Marcus
This can be done like this:
- Add a ViewContainerUIElement "viewArea" to the right of the tabstrip
- Embed the additional view inside "viewArea" using the window editor
- Bind property "visible" of "viewArea" to a calculated context attribute "viewAreaVisibility" of dictionary type "Visibility"
- Bind property "selectedTab" of tabstrip to a context attribute "selectedTabId" of type "string"
- Assign any action to the "onSelect" event of the tabstrip
Implement the calculated attribute as
WDVisibility getViewAreaVisibility(...element)
{
return "id_of_first_tab".equals( element.getSelectedTabId() );
}
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have 4 Tabs and on the right side on extra view.
Now I only want to show (enable) the view if I selected the firstTab.
when I selected the other three Tabs, the View should be disabled.
How should I do this??
Create a context attribute of type WDVisibility, bound this attribute to the visibility of your viewContainer and initially set this to WDVISIBLE if first Tab is selected by default.
And on change of the tabs check for the selected tab if its not the first tab then make the visibility to NONE.
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
In the tab strip , there will be an event OnSelect . here u create an action and bind the Action to the OnSelect property of the Tab Strip.
In the Window design the Required ViewSet.
For eg :
Consider this is the window and in the u have design the viewset according to ur requirements.
###################################################
# Another View #
#
#
TabStrip View # # Empty View
#
#
# #
#
#
#
# #
#
#
##################################################
Now Consider in the above viewSet , create a Outbound Plug from the TabStrip View to the Another View .
and In the same way create another outBound Plug from the TabStrip View to the Empty View . create the Data Link between the TabStrip view and the Another View .
in the similar way data link between the TabStrip View to the Empty View .
In the Tab Strip View:
Create a Attribute such as "Test" and type is String .
Bind The test Attribute to the selectedTab property of the Tab Strip.
Now go the OnAction Method :
Use this code :
OnActionMethod :
If("FirstTabName ".equals(wdContext.currentContextElement.getTest())) {
wdThis.wdFirePlugToAnotherView();
}
else{
wdThis.wdFirePlugToEmptyView();
}
Thanks and regards
Fistae
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.