adding new tab manually and changing focus to it - angularjs

So, in my <tabset> I have 3 sets of tabs. I first have three static tabs, then N dynamic tabs, and then an "add tab."
When you click on the add tab, you get a small input with which you can select your "layer type"
And when you select one, it adds a new tab of that type.
What I'm trying to do is make it so it selects that new tab, and deselects the "add tab." I've tried keeping an array of currently active tabs and checking every tab manually for "active", but for some reason, it always thinks the last tab is active, even when I manually set it's active to false and splice a new one into the array with true.
Any thoughts on how this can be accomplished?

In the tab set an active flag
<tab header="..." active="tabs.tab1"....>
In your controller setup a map of the tabs
$scope.theTabs = {'tab1':false, 'tab2':false };
To make a tab active or inactive you just need to set the flag to true/false
$scope.theTabs['tabl1'] = true;
Works great.

What I essentially had to do was remove the "funny stuff" from the tabs. That means no select menus, no weird controls that can take focus, etc. When those went away, my problems with tab focusing did as well.

Related

Ionic - Wrong tab active after changing tabs template

I am learning Ionic and I am stuck in one place because I want to change my default tabs layout to other one.
When I change to state where I reload my tabs layout, in new layout there is always selected second one, no matter what I do... I want first tab to be selected.
Here is plnkr. Go to friends, click one and look on tabs at bottom. Second one is active :(
$ionicTabsDelegate is not working (Or I have done something wrong)
http://plnkr.co/edit/AGNLaMqY6Hzbm5SVcgwI
Do you have any ideas why it's happening?

Sencha Touch - Nested List - Refreshing a list item. (Using getItemTextTpl to se Template )

I have a nested list with a template by using getItemTextTpl. Template is simple it checks for a flag and if true it shows a button on a list item. If false show no button.
When on the list item I press the button (It's a delete button) I want to refresh that list item to not show the button. To make the button change I have to navigate up two levels and back down for it to update the list item.
My problem is getting the list item to refresh/Update. Can force the template to check the list item again etc? I can get the button to fire the event.
Thanks!
for the display layer:
why not just use css to apply/change the class of the delete button to hide it? then you don't have to refesh anything.
then you can programically set the value in your code, or send to the server to make sure the status is set when the view reloads at another point.

EXTJS 4.0 grid in an inactive tab shows nothing

I create a tab panel with two tabs, first one is active and second isn't.
Then I create two grids and render them to first tab content and second tab content.
The first tab shows fine, and the inactive one shows nothing but only the gird layout appears.
I tried to put two grids into the active tab, and it works.
But I want each tab to contain one grid, how can I achieve this?

ExtJs: Programly select rows of a GridPanel in an inactive tab not working?

Basicly, I have a window contains two tabs, the second tab is a GridPanel and is initially inactive.
I want to programly select two rows of this GridPanel(via CheckboxSelectionModel) by clicking a "show window" button , but found it not working. There will be a javascript error thrown and no rows selected. After I manually clicked the second tab to make the grid visible, everything works well.
what's the most possible mistake I made?
I'll paste the code soon if it's not a common mistake for extjs beginner.
This is because your tabpanel will not render any components that are not visible (i.e., any components in your second tab in this case).
If you add the following config option to your Ext.TabPanel it should fix your problem:
deferredRender: false

Setting the TabIndex property of many form controls in Visual Studio?

What is the most efficient way to set/re-order the TabIndex properties of many form controls in Visual Studio? When I change the layout on a large form, or even on initial design, I often wonder if there's a faster way than clicking each individual control then setting the TabIndex in the properties window.
While in Designer mode, select Tab Order from the View menu then click on each control in the order you want. Then remember to turn off Tab Order when you're finished, otherwise when you select a control to do something else you lose the work you've just done (I wish Tab Order would turn off when you Save..)
Bring up the Form in design mode.
Click the View Menu -> Tab Order
Then a little number will show up on each form representing its tab order. Now click each item in order that you want their tab order set.
To bring up the tab order in VS2012 while in Design View Click on the actual form then goto VIEW / TAB ORDER then this will enable the tab order window.
once you have finished changing the tab order go back to VIEW / TAB ORDER this will deactivate the tab order layout
In case some other will have the same issue(you may also see print screens in link):
First step: as you are in Design View of your form in menu go to View and select Tab Order. Second step: on your controls will appear a number that represents the Tab Order of your control. For re - setting tab order press a click in ascending order the controls that want to succeed, including Labels(even they are not selectable). I hope it is very intuitive this step for you too.
Print screens at: http://how-to-code-net.blogspot.ro/2013/06/how-to-set-tab-order-for-controls-in.html

Resources