jQuery tabs reloading content - jquery-ui

I have an application that uses jQuery tabs to display different dynamic content for the user. The user has the ability to subscribe to various information feeds into "pods" on each tab. So for example the first tab might have 4 pods and each pod on the tab displays different information. The user has the ability to select a different template for each tab (like 4 smaller pods, or 2 larger ones, etc).
I have built a user interface to allow the user to rename the tab and to change the template that is displayed in that tab. The problem is when the user changes the template for a tab, the tab does not refresh/reload to show the new template. The only way to display the new template is to reload the whole screen.
I have tried using the following code after the tab has been updated in the database
$("#tabselector").tabs("load", tabindex);
However the above does not seem to reload the tab. I am not sure what I am doing wrong. Any suggestions would be greatly appreciated.

I'm not sure I got your question, but I'll try to guess what you are after from the last paragraph of your question.
If you want to change the URL of the remote/AJAX tab, you need to use the .tabs( "url" , index , url ) method. The load method will not load the tab again if it is already loaded. See the documentation.

Related

How to create a link to open a Tab within your site

http://www.duellinksmeta.com/pve2.html
This is a test page of my site. I learned how to create a link to jump to a specific part of a page, but what I want to accomplish is a link that opens a tab and/or jumps to content within a tab.
My main reason for this is I want people to be able to share a link that when used as a URL, it will go directly to the relevant tab opened with the content they want to see.
Without using javascript and CSS there is no provision in HTML to accomplish what you are looking for. However, if you do use javascript and CSS, this is quite easy. Tab sets can be implemented with <ul> and <li> elements, and jumps to tabs and specific bookmarks on tabs can be implemented with javascript based manipulation of CSS rules.

Best way to realize multi page site in Vaadin

I'm working on pretty simple web side that cointains login screen (almost same as in demo presentation, white page with login and password) and main screen with sidebar and navigation bar. How should it be done? My plan is to build main screen using navigation bar, sidebar (just few buttons in layout basicly) and few layouts with content of the webside. On each button click change layout used to create content to another one, for example for Schudele button I'm gonna load layout that contains some tables, for About button plain text. Is it good idea?
So finnaly is should look like this:
init() function decides if user is logged or not and display Login page or Main page, Main Page is builded from modules like navbar, sidebar and content, content depends on sidebar buttons click. I'm right?
Handling it on your own is legit way to start or learn Vaadin. If you have a first grasp of this works out, the most common way to handle such a scenario is the use of the Navigator See the book of Vaadin.
With the Navigator you define Views and give them a name, register them with the Navigator. Then you can navigate your application with the Navigator, it takes care to give you nice ...#!view... URLs so the Users can have bookmarks and navigate your app also e.g. with the back button in the browser.
The Navigator hooks into an event system, where listeners (ViewChangeListener) can react to "before enter" and "leave". The "before enter" can be used to realize auth needs, since they are allowed to object entering a view.

PyQt: Reorder tabs in QTabWidget

I made my GUI using Qt Designer and I have a QTabWidget with multiple tabs. My tabs contain specific tools that are used in my app. Now I would like to set my tabs closable and movable so I could save the order of my tabs and load it when the app starts. The problem is, I don't know how to reorder my tabs when the application loads. Is this possible?
You can move tabs by accessing the QTabBar object associated with the QTabQidget
QTabBar has a method moveTab() which will allow you to reorder tabs.
So you would do something like my_tab_widget.tabBar().moveTab(old_position, new_position) where old_position and new_position are integers which specify the tab to move and the position to move it to respectively.
Lots of details in the c++ documentation (it translates to python pretty easily). See QTabBar docs and QTabWidget docs

How to separate menu and content in the same page

I have a list of menu items and content in a single page. In PC browser or ipad, I want to see both parts in the same page. But in the smaller devices such as iphone and android phone, I want to separate the two so that you selects one of menu items in a page and see its content when he clicks it.
Jquery mobile demo page already does it. But I can't figure out how I can achieve it. Can someone explain or point to any good reference? Thanks
You may take a look at the following blog post which illustrates how you could organize your views so that based on the client type you could provide different contents.

How to create tabs in a ipad app that is similar a web browser tabs

I have a requirement to create a ipad app that supports tab to view content. I have created a custom splitview controller, whenever user goes to a particular section in the left section, the contents related to that will be displayed in the content view(right view). If a user selects a particular link in that content view it should open a tab and display the contents of that link in that new view. Similar to Web Browser tabs i need to handle tabs in this app. Please suggest any available open source component or any ideas to implement tabbing inside a ipad app.
You can use Three20 for your tab purpose. Also there are many open Source components available. You just need to search in google.

Resources