Displaying the tabs

Hi
i have tabs in two rows.. 4 in the first and three in the second... if i click a tab in the first row, the rows itself should interchange as in windows dialog boxws.... is it possible in JSF... if so what ll be the logic in it...

Anything is possible in JSF, but some things take more code than others. In your case I imagine you would have a bean similar to the following:
public class TabRowBean {
    public List<String> getTabNames() { ... }
/** Session scoped bean */
public class TabbedPaneBean {
   private List<TabRowBean> _tabRows = null;
   public List<TabRowBean> getTabRows() {
      if(_tabRows == null) {
         // initialize collection
      return _tabRows;
   public String tabClicked(ActionEvent evt) {
      TabRowBean rowClicked = getRowClicked(evt);
      int rowClickedIdx = getTabRows().indexOf(rowClicked);
      // Take items off the front of the list and put them on the
      // end of the list to "rotate" the selected tab row to the top
      for(int i = 0; i < rowClickedIdx; i++) {
         _tabRows.add(_tabRows.removeAt(0));
   private TabRowBean getRowClicked(ActionEvent evt) {
      // TODO
}In your JSP you would iterate through the tab rows and in each row iterate through the tabs and render them in order. When a tab is clicked the tabClicked action handler method is called to rotate the order of the rows so that the clicked row shows up on top.
The only problem with this is that there is no generic iterate tag that will let you build a horizontally expanding row of tabs, so you'd either have to hard-code your TabRowBean to have up to 4 tabs and render each on explicitly or implement your own custom tag for rendering a variable number of columns horizontally.
Bottom line, it's possible in JSF, but non-trivial. Something like this is a pain in any web framework really, unless there is a custom tag designed to do exactly this. (It might be worth looking for a third-party tabbed pane tag.)
- Jesse

Similar Messages

  • Hiding and displaying the tab

    Hi Every body :
    In my application I have 4 tabs and I want to know how I can hide the tab according to the user previllige, if he has the privillage then the tab will be visible and if he doesn't it shold be hided...
    Thanx in advance

    JTabbedPane itself uses the visibility of the children to control which one is shown and, of course, draws the tabs itself. There is no way to hide a tab, just don't add the child in the first place.

  • In fullscreen mode, is there a way to prevent the page from shifting down when displaying the menu and tabs?

    In fullscreen mode (F11), when moving the mouse toward the top of the screen to display the tabs & stuff, the page displayed is shifted down. This makes it annoying when returning down with the mouse - you want to reach a certain link, for example, but your target gets shifted up once the tabs & stuff is hidden back.
    Is there any way to make the tabs & stuff display 'above' the page content, like on another layer?

    Is it the web page display that is changing its own position, or is it something
    about the toolbars that is pushing the page down? I have the same issue with
    my browser using an add-on to show a multiple line bookmark bar.

  • Firefox sometimes does not display my tabs along the menu bar when two or less are open - is this a bug?

    When I have less than three tabs open after having more open, Firefox does not display the tabs along the menu bar. This means I can't see tabs when I have two open. Is this a glitch?
    Note: I am aware that I can set Firefox to always show the tabs, but I do not like this setting for when I only have one tab opened.

    Hi,
    You can try to '''Reset toolbars and controls:''' and '''Make Changes and Restart''' in the [https://support.mozilla.org/en-US/kb/Safe%20Mode Safe Mode] start screen.
    If the problem persists, please try a [https://support.mozilla.org/en-US/kb/Managing-profiles?s=profile&r=0&e=sph&as=s new profile]. You can later copy [https://support.mozilla.org/en-US/kb/Backing%20up%20your%20information?s=backup&r=1&e=sph&as=s needed data] from the old profile to this.
    [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder & Files]

  • How do I left justify the text in the tabs of a JTabbedPane.

    In 1.3.1 this used to work by supplying an HTML string with <div align="left"> but when I run with 1.4.1 this is now broken and I get center justification.
    Does anybody know a way to get the text in the tabs to be left justified.
    Thanks,
    Philip

    First, I found while using JTabbedPane that the "standard" behavior is to allow to a tab the exact space needed to display the tab text. Hence with this behavior, there is actualy no difference of "left" or "center" aligned text. So I assumed that you found a way or another to make your tabs wider than the "string width"...
    Here is a solution:
    You can override the TabbedPaneUI class and ajust the "layoutLabel()" method. Here is the code..
    //Your code using the tabbedPane
    JTabbedPane tp = new JTabbedPane();
    tp.setUI(new LeftTabbedPaneUI());
    //File containing the overrided TabbedPaneUI
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.text.View;
    class LeftTabbedPaneUI extends javax.swing.plaf.metal.MetalTabbedPaneUI {
            //I also overrided this function just to force tabs wider than
            //the displayed "String Width". I asume that you found another
            //way to do this so you can delete this function in your
            //implementation
         protected int calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics){
              return 150;
        protected void layoutLabel(int tabPlacement,
                                   FontMetrics metrics, int tabIndex,
                                   String title, Icon icon,
                                   Rectangle tabRect, Rectangle iconRect,
                                   Rectangle textRect, boolean isSelected ) {
            textRect.x = textRect.y = iconRect.x = iconRect.y = 0;
         View v = getTextViewForTab(tabIndex);
         if (v != null) {
             tabPane.putClientProperty("html", v);
         //This Line is added to avoid writing on tab border while aligned to left.
         //You can comment this line to test and or adjust the "5" pixel space
         Rectangle rec = new Rectangle(tabRect.x+5,tabRect.y,tabRect.width,tabRect.height);
            SwingUtilities.layoutCompoundLabel((JComponent) tabPane,
                                               metrics, title, icon,
                                               SwingUtilities.CENTER,
                                               SwingUtilities.LEFT,
                                               SwingUtilities.CENTER,
                                               SwingUtilities.TRAILING,
                                               rec,
                                               iconRect,
                                               textRect,
                                               textIconGap);
         tabPane.putClientProperty("html", null);
         int xNudge = getTabLabelShiftX(tabPlacement, tabIndex, isSelected);
         int yNudge = getTabLabelShiftY(tabPlacement, tabIndex, isSelected);
         iconRect.x += xNudge;
         iconRect.y += yNudge;
         textRect.x += xNudge;
         textRect.y += yNudge;
    }Here I overrided the "Metal" implementation of the tab but you must override the implementation of the used Look And Feel,
    ex. "com.sun.java.swing.plaf.window.WindowsTabbedPaneUI" for the windows LAF.

  • I changed my Apple ID (other email address and password) and now I can not login to my account in the iPhone iCloud. When I open the tab iCloud displayed my old Apple ID (it was in the iCloud) and asks for a password, but neither the old nor the new passw

    I changed my Apple ID (other email address and password) and now I can not login to my account in the iPhone iCloud. When I open the tab iCloud displayed my old Apple ID (it was in the iCloud) and asks for a password, but neither the old nor the new password does not match. What to do?

    If you want to change your iCloud ID or password on your phone go to Settings>iCloud and tap Delete Account, then sign back in with your updated information.  Note: this only deletes the account and any synced data from your phone, not from iCloud.  Provided you are signing back into the same account and not changing accounts it will be synced back to your device when you sign back in.

  • How to define the number of tab displayed in Tab page group

    Hello,
    I have an application with Tab Page group  with 8 tabs and the browser is displaying only 5 of thems. I have to scroll to display the remaining 3 although I have enough spaces on the screen to displayed all of them.
    Do you know what parameter/setup I need to change to display all of them at once ?
    Thanks for your help,
    Manuel

    The link is to the closest linkable point in the documentation to the description of the Number of Rows (Item) attribute.
    It sounds like you have been trying to enter&mdash;unsuccessfully&mdash;an item name or substitution string into the Number of Rows attribute. The Number of Rows (Item) attribute is the one that actually allows you to do this. Click on the flashlight icon beside it to get a list of items from the application.

  • How can I get Firefox 4 to display the URL of active tabs in the location bar so I can see and copy it?

    The only URL that I ever see in the location bar is the last one I typed there. No matter which tab I activate, the last typed URL is displayed. When I need to copy the URL of an active tab to paste into an email or something I can't see it.
    The location bar used to display the URL of each active tab and you could simply click in the address field and the URL would be highlighted so you could edit/copy it or jump to the end of a very long URL to see the final file name.
    I can't get this feature to work and I really need this feature as I need to copy URL's quite often. When I have multiple tabs active I sometimes forget which one is for which domain and need to see the URL. It is very annoying to surf blind.
    Please help me with this issue as quickly as possible so I can once again do my work easily and with the firefox browser instead of chrome. :(

    A couple of possible causes.
    The first is the file that stores details of browsing history and bookmarks is corrupt. For details on how to fix that see http://kb.mozillazine.org/Locked_or_damaged_places.sqlite
    Another possible cause is an add-on interfering with the location bar. To test this, use the procedure in this link - https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • I have just used air display with macbook pro. i have disconnected now from apple tv. but my laptop screen is still very small like its connected to the tv. this means all the tabs and writing is very small, how do i full disconnect my laptop?

    i have just used air display with macbook pro. i have disconnected now from apple tv. but my laptop screen is still very small like its connected to the tv. this means all the tabs and writing is very small. like the display down the bottom where al the applications are, is n the middle of the page and not spread down the bottom. this is seriously annoying! all the writing is every small and the tabs are small and its hard to read.  the air display link has disappeared from my computer. but the laptop screen is still very small. i want to know how do i get rid of this and return my macbook screen to its normal size. thank you

    Hello chrispyw,
    If your content is still being displayed incorrectly, I would check the resolution setting for the built in display with this article:
    OS X Yosemite: Adjust your display’s resolution
    If it keeps happening whenever you use AirPlay then I would use this section of the following article to reset the display system:
    Apple computers: Troubleshooting issues with video on internal or external displays
    Reset the system
    You can reset the Mac's parameter RAM and SMC.Reset the resolution
    Start by resetting the Mac's parameter RAM. If the display does not come up, was previously set to an unsupported resolution, and still results in no video:
    Start up in Safe Mode.
    From the Apple () menu, choose System Preferences.
    Choose Displays from the View menu to open the preferences pane.
    Select any resolution and refresh rate that your display supports.
    Restart your computer.
    Thank you for using Apple Support Communities.
    Regards,
    Sterling

  • Tabs created with CMFCTabCtrl::STYLE_3D style didn't display the whole tab labels

    Hi,
    We use tab controls with multiple tabs created with CMFCTabCtrl::STYLE_3D style, but the tab labels are not displayed completely. For instance, the label should be "Process Control", but the tab header shows only part of it ""Process
    C...".
    How can I make the whole label being displayed?
    Thanks.
    MJ

    Hi mj118802,
    I think this is a by design issue, Form the picture, there is no enough space to show all your tab with the long label text. If you persiste want to use  CMFCTabCtrl::STYLE_3D style, you may need to draw your own CMFCTabCtrl.
    Please think about to use CMFCTabCtrl::STYLE_3D_SCROLLED style, see the picture.
    This is not too bad.
    Best regards,
    Shu Hu
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Moving tabs from one window to another makes the new window vanish. I have hot corners enabled so when I move up to the right corner of my display I can see all my open windows but when I click on the tab that I moved to make it its own window it vanishes

    Moving tabs from one window to another makes the new window vanish. I have hot corners enabled so when I move up to the right corner of my display I can see all my open windows but when I click on the tab that I moved to make it its own window it vanishes

    I came up with an alternative solution.
    Instead of actually trying to move the JInternalFrame from one JDesktopPane to another, I added a single, maximized JInternalFrame to the left side. When one of the right side frames is to be docked, I merely copy its ContentPane to the single JInternalFrame on the left, set the original to be non-visible, and adjust the properties of the JSplitPane to make the "docked" frame appear.
    When the "close" button on the docked frame is pressed, I simply undo this procedure to "undock" the frame and redisplay it on the right-hand side (with its content intact from the docked frame, but in its original position).

  • Favicons not displaying in tabs, but showing fine in the address bar and with bookmarks.

    We had a power outage this evening while I was on the computer, and now, all of a sudden, when I open a site in a tab, the tab itself fails to display the site's favicon when applicable, but the icons display without any issue in both the address bar and in bookmarks. Is there any way to fix this without having to reinstall?
    The same issue occurred yesterday while reinstalling Firefox after I had to reinstall Windows. But after reinstalling Windows a second time, things worked in Firefox fine, up until said power outage.

    Check to see if you have the FavIcon Picker add-on installed. If you do, this is the culprit. I had the same issue and disabling this add-on fixed my problem.

  • Display the panel container when user select the specific tab in a tab set

    Hi SAP Experts,
    I've faced some problems and i would like to seek some help from the experts.
    Basically, my requirement is to display the component "panel container" which contains some data whenever a user select e.g. Tab "A" of my component Tab set. Similarly, it hides again when the user select Tab "B" and another panel container appear for it.
    I am not sure if this is achievable in Xcelsius. Experts, please advise me.
    Your help will be greatly appreciated!
    Thanks a lot!
    Feel free to clear any doubts with me
    Best regards,
    htoh

    actually, you can not do that, since you dont have a reference of the current selected tab

  • Minimised Hotmail tab at botom of PC screen displays the email address I am using and I do not wish it to do so for privacy reasons

    When I have to quickly minimise my e-mail account the tab shows in the bottom tool-bar of the screen but still displays the email address I am trying to hide. I wish it would not do this. In previous versions it just showed 'Hotmail' e.g. now it shows 'Hotmail: woody@ hotmail.com (e.g) for all to read if they are passing by or checking up on me!

    This is caused by the changes Microsoft made to Hotmail. I could not find any setting s in Hotmail to change what was displayed. One option you can try is use the [https://addons.mozilla.org/en-US/firefox/addon/2987/ TabRenamizer] add-on.

  • How do I customize the tab text displayed on bookmarked sites?

    I often use "open all as tabs" for a bookmark folder of weather.com "5 day forecast" sites covering the towns in a geographical region where I plan to go hiking.
    One Firefox browser with six tabs for six towns in my state. "5 day forecast for Gorham," "5 day forecast for Jackson," "5 day forecast for Lincoln," etc.
    The problem is the tab displays only some of the first few words of the site description: "5 day forcas," "5 day forcas," "5 day forcas," etc.
    I'd like to display only the end of that sentence, which is the name of the town. This way I would have a list of towns across the top of the browser for direct reference.
    I changed the "name" property of each bookmark, but that only affects the name in the bookmark collection list, not the display name of a tab in use.

    1. With all due respect for your attempt to help; Of course it's part of the page source! That's a given.
    2. Again, with all due respect for you bothering; Letting me know that you don't think a thing is doable is not helpful, it's just chat.
    Thanks anyway, for your time.
    ~~~~
    My instinct is that of course there is something that could be done, it's a computer, every bit of it is adjustable.
    Some browser function grabs the title-tag text for display. It could just as well be redirected by a script (is that the right term?) to grab text held in a list in the bookmark for that page. Let's hear from someone on this idea, please.
    The point is, why have titles on tabs if it is junk information? Best use of the small tab text display area would be an abbreviation!

Maybe you are looking for

  • Security and/or filtering error in data form creation

    Hi, I am getting this error when I am trying to preview my data form. This is the first time I am creating an application and data form in Hyperion. The data form is multicurrency and plan type is Plan1. Row: Account members: Descendants(Account) Col

  • Formatting in ALV report

    Hi All, I wanted to do the formatting in ALV report output. How I can do that? Formatting means colour the field, & all. If possible send me any sample code.. Regards, Poonam

  • Problem with execution and running a Java program

    Good evening, I have downloaded the jdk-1_5_0_05-windows-i586-p.exe and installed it on my PC.A folder Java has been created.Now,I need an editor in order to type the program,execute it and run it.I have a shell named Cygwin which includes the nano e

  • Event Registration: Cluster vs. Individuals

    I have a piece of code called a "Receiver".   It listens on a TCP connection for various messages from a PXI box. There are about 30-40 different types of messages, some with large payloads, some with small. The receiver decodes which message came in

  • After I add a watermark to my pdf, most of the content gets deleted. How do I prevent this?

    When I tried adding watermarks for other pdfs it worked fine. Just for this particular pdf, it doesn't work properly.