Data in first tab also shown in second tab

I'm using Java Swing.
I have a tab panel with 2 tabs. In the first tab, I entered data. I want the data to show on the Combo Box in the second tab without closing the tab panel and open it again. How can I refresh the second tab with the newly added data shown?
Thanks!

JComboBox box;
JLabel info;
JTabbedPane tabPane;
private void render()
     tabPane = new JTabbedPane();
     JDesktopPane leftPane = new JDestkopPane();
     JDesktopPane rightPane = new JDesktopPane();
     tabPane.addTab("Left", leftPane);
     tabPane.addTab("Right", rightPane);
     Vector items = new Vector();
     items.add("Item 1");
     items.add("Item 2");
     box = new JComboBox(items);
     box.setBounds(10, 10, 100, 20);
     box.addActionListener(this);
     leftPane.add(box);
     info = new JLabel("Item 1 Info");
     info.setBounds(10, 10, 200, 20);
     rightPane.add(info);
     this.add(tabPane);
public void actionPerformed(ActionEvent e)
     if(e.getSource().equals(box))
          if(box.getSelectedIndex()==0)
               info.setText("Item 1 Info");
          if(box.getSelectedIndex()==1)
               info.setText("Item 2 Info");
          tabPane.setSelectedIndex(1);
}Edited by: Snape53 on Aug 21, 2009 12:13 AM

Similar Messages

  • Paging - Rows in first page also showing in second page: listitemcollectionposition

    Hi,
    I am trying to use the listitemcollectionposition to achieve paging. The pagination is shown, but some of the records in first page are getting displayed in second page as well.
    I have totally 13 records in the list, and paging is applied for 10 items to show. I have set the rowcount to 10.
    private void FillData(string pagingInfo)
    int currentPage = Convert.ToInt32(ViewState["CurrentPage"]);
    uint rowCount = 10; // Default of 10 items per page
    string columnValue = string.Empty;
    string nextPageString = "Paged=TRUE&p_ID={0}&p_";
    string PreviousPageString = "Paged=TRUE&PagedPrev=TRUE&p_ID={0}&p_";
    SPListItemCollection collection;
    collection = GetTestItems(pagingInfo, rowCount);
    public SPListItemCollection GetTestItems(string pagingInfo, uint rowLimit)
    using (SPSite oSite = new SPSite(Sitename))
    using (SPWeb oWeb = oSite.OpenWeb())
    SPList lstPages = oWeb.Lists["Pages"];
    SPQuery sQuery = new SPQuery();
    SPListItemCollection collection;
    sQuery.RowLimit = rowLimit;
    sQuery.Query = "<Where>" +
    "<And>" +
    "<And>" +
    "<Contains><FieldRef Name='PublishingPageLayout'/><Value Type='URL'>TC_NtestPageLayout.aspx</Value></Contains>" +
    "<Eq><FieldRef Name='_ModerationStatus'/><Value Type='ModStat'>0</Value></Eq>" +
    "</And>" +
    "<Eq><FieldRef Name='_Level'/><Value Type='Integer'>1</Value></Eq>" +
    "</And>" +
    "</Where><OrderBy><FieldRef Name='TestLayoutDate' Ascending='FALSE' /></OrderBy>";
    sQuery.ViewFields = string.Concat(
    "<FieldRef Name='PublishingPageLayout' />",
    "<FieldRef Name='Title' />",
    "<FieldRef Name='EncodedAbsUrl' />",
    "<FieldRef Name='TestLayoutDate' />");
    sQuery.ViewFieldsOnly = true;
    if (!string.IsNullOrEmpty(pagingInfo))
    SPListItemCollectionPosition position = new SPListItemCollectionPosition(pagingInfo);
    sQuery.ListItemCollectionPosition = position;
    collection = lstPages.GetItems(sQuery);
    return collection;
    How to get the Paging properly?
    Thanks

    Hi,
    According to your post, my understanding is that you want to display list data using a
    SPGridView with Paging in a visual web part .
    The following code snippet for your reference:
    VisualWebPart1.ascx:
    <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
    <%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
    <%@ Import Namespace="Microsoft.SharePoint" %>
    <%@ Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="VisualWebPart1.ascx.cs" Inherits="VisualWebPartProject3.VisualWebPart1.VisualWebPart1" %>
    <SharePoint:SPGridView ID="sgvPagersample" runat="server" AutoGenerateColumns="false" DataSourceID="objSample" AllowPaging="True" PageSize="3">
    <Columns>
    <asp:BoundField HeaderText="Title" DataField="Title" />
    <asp:BoundField HeaderText="Test1" DataField="Test1" />
    <asp:BoundField HeaderText="Test2" DataField="Test2" />
    </Columns>
    </SharePoint:SPGridView>
    <asp:ObjectDataSource ID="objSample" runat="server" SelectMethod="BindGridView"></asp:ObjectDataSource>
    <center>
    <SharePoint:SPGridViewPager id="sgvPager" runat="Server" GridViewId="sgvPagersample"></SharePoint:SPGridViewPager>
    </center>
    VisualWebPart1.ascx.cs:
    using System;
    using System.ComponentModel;
    using System.Web.UI.WebControls.WebParts;
    using System.Data;
    using Microsoft.SharePoint;
    namespace VisualWebPartProject3.VisualWebPart1
    [ToolboxItemAttribute(false)]
    public partial class VisualWebPart1 : WebPart
    // Uncomment the following SecurityPermission attribute only when doing Performance Profiling using
    // the Instrumentation method, and then remove the SecurityPermission attribute when the code is ready
    // for production. Because the SecurityPermission attribute bypasses the security check for callers of
    // your constructor, it's not recommended for production purposes.
    // [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Assert, UnmanagedCode = true)]
    public VisualWebPart1()
    protected override void OnInit(EventArgs e)
    base.OnInit(e);
    InitializeControl();
    protected void Page_Load(object sender, EventArgs e)
    objSample.TypeName = this.GetType().AssemblyQualifiedName;
    public DataTable BindGridView()
    SPWeb currentWeb = SPContext.Current.Web;
    SPList lstEmployee = currentWeb.Lists["CustomList4"];
    SPQuery sQuery = new SPQuery();
    sQuery.Query = "<OrderBy><FieldRef Name='ID' Ascending='False' /></OrderBy>";
    SPListItemCollection myColl = lstEmployee.GetItems(sQuery);
    return myColl.GetDataTable();
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected].
    Dennis Guo
    TechNet Community Support

  • How to change data shown as seconds format in to full hour (HH:MM:SS)?

    Hello
    I have created a table with data that represents time.
    This data are shown in seconds format.
    How can I change this format in to full hour (HH:MM:SS) format?

    Hello,
    Click on the small hand icon on the column and click on data format tab and you can change to any custom format you want.
    thanks
    DS

  • Requirement to print data of first and second report of an ALV at once

    Hi,
    I have an interactive ALV report in which on double click of any of the record on first report, its details get displayed in second report. My requirement is to print all the data (of first and second report) at once.
    Kindly tell me how can I achieve this functionality.
    Regards,
    Seema Naharia

    Hi Seema,
    Try with this FM 'REUSE_ALV_HIERARCHICAL_LIST_DISPLAY'.   
    Regards,
    Sujatha B.

  • My new macbook pro is giving me hardtime. even apple team is not being to solve it. they replace the motherboard first it didn't work. second time they formatted the computer and that also didn't work. every time my mac showing different problems.

    my new macbook pro is giving me hardtime. even apple team is not being to solve it. they replace the motherboard first it didn't work. second time they formatted the computer and that also didn't work. every time my mac showing different problems.
    At first my computer had issues. Once it go to sleep it will not back again. I dropped my laptop at apple store to fix it. After 10  days they returned my laptop saying they were no able to fix the problem so they replaced motherboard aiming if that might help. Acttually that didn't help.I had same issue again. I visited apple store again. This time they said they could fix, if I will allow them to format the harddrive. I said ok. They formatted it. It was working fine for few daysAfter few days compter is taking.even more than 15 min to shutdown. Now computer has another problem. It is being hang frequently like every 20'to.30 min.
    I don't know what to do? I still have one month left on first year warranty. I have requested couple times to apple associates either to fix or replace or refund. They are showing me rude behavior. They are not understanding my situation. I am a student. I need to do lot of home work. Since last three month my mac book and apple associates giving me hard time. Any suggestions are welcome.

    Contact Apple Customer Care - not Apple Care - Customer Support. Have your receipts handy and/or case numbers. Be patient, be calm, and tell your story just as you have here. I get the sense you are not in the US and don't have access to an Apple Store but are going to an independent shop. This makes using Customer Support all the more important. If phoning isn't viable, use registered mail.
    Since time is running short, be prepared to purchase AppleCare to exennd your warranty 2 more years. Yes, you shouldn't have to do this, but it gives you added protection and more opportunities over the next 2 years to claim a replacement computer if you don't get one immediately. After dealing with a similar unhappy situation with a Mac in the late 1990s I finally got a replacement computer and reimbursed for the AppleCare policy.

  • How to disable certain text fields in second tab based on the drop down selection from first tab?

    My first tab contains a drop down menu which has two options
    1. Personal info
    2. Office info
    The second tab contains all the information regarding Office and Personal Information. But I need to selectively disable certain fields based on the drop down in first tab.
    For example,
    The second tab consissts of all fields like
    Name,
    Age
    Job title,
    Office Location, etc.
    And i dont want office related details to be displayed if I am selecting personal info in the first tab.
    It would be really great if someone could send me the code for achieving this.
    Thanks in advance.

    Hi Vishnu
                  Can you check the List component in foundation/components ? I think "Build list using" works he same as your requirement. Check the listener they have used in dialog/items/list/items/ listFrom/listeners
    "selectionchanged"  : function(box,value){box.findParentByType('tabpanel').manageTabs(value);}
    here the ExtJs will find the tabpanel with value you are selecting fromdropdown. The title of each panel should match with the dropdown values
    Some queries
    Disable values means you have to remove it from your CRX?
    "values should become mandatory". for tab2? or tab3? - if tab2 and if it is a customized widget then u have to write it in your js only i think.
    Thanks
    Veena

  • I CANNOT CLOSE THE FIRST TAB WHEN I SEARCH FOR SOMETHING AND CLOSE A SECOND TAB IT WILL NOT LET ME CLOSE THE FIRST TAB

    I CANNOT CLOSE THE FIRST TAB AFTER I TYPE IN A SEARCH
    == This happened ==
    Every time Firefox opened
    == I UPGRADED TO 3.6

    I have the same problem and tested it in Safe Mode, and did the disable the add-ons thing. Everything went OK, even up to the last add-on. There wasn't a hint of the problem anymore, so I went back to regular use of FF (3.6.12) again. WELL, THE SAME THING HAPPENED AGAIN!!! I agree with the person who said that your supposed troubleshooting is B.S. You blame the user instead of saying something useful like "OK, we heard you (and over two dozen others) and we know it's not your doing, and it's OUR PROBLEM, and we're going to look into it and figure out how to fix it, AND we'll get back to you when we do and tell you how to fix it too." THAT's the kind of answer we FF users want to hear, not some claptrap about how WE the users didn't try hard enough to fix it on our own!

  • The first tab I have never closes and when I open a second one and close that the whole browser will close. Is this a bug?

    Since downloading the 4.0 beta, in both versions (4.0 and 3.6) I can't close the first tab that is opened when I start the browser. I click the red close button and nothing happens but if I open another tab and close that then it will close and the whole browser will close. I have uninstalled the beta version and the 3.6 version and reinstalled the 3.6 version but it hasn't made a difference.

    JUst experienced the exact  same problem after changing password.Getting same message. Hope someone has an answer for this.

  • First tab missing in second window

    I have multiples tabs opened in 2 browser windows. Every time I exited Firefox by choosing File - Exit so that the tabs can be opened when Firefox is launched.
    This works fine on version 9. After the upgrade (since 10.0.1), the first tab in 2nd window is missing. It can still be opened by choosing tab groups, but not visible on tab bar. Furthermore, the "Open a new tab" button appear at left of tabs instead of right side, which is in between the missing tab and the rest of the tabs.

    Not working.
    The + button is already on the right in customize menu.
    Cor-el solution works, but it has to be done every time the browser is re-open. Plus, the + button is in between the first and the rest of the tabs. So, I would say is a bug. I will log it in as a bug in bug tracker.

  • Accordion defaultPanel first tab value

    I have an application which has an accordion panel and
    several detailregions.
    - the accordian panel is dynamically generated in spry with
    xml (both the tabs and the content)
    - the detailregions are based on what the current selected
    tab is in the accordion panel
    I needed to be able to access these tabs via a URL query
    string - and have the correct panel / detailregion display based on
    the variable passed in the URL.
    I have this working correctly.
    The problem though, is that the tabs onClick events do not
    number correctly when using the defaultPanel attribute.
    For example,
    var acc = new Spry.Widget.Accordion("test",{defaultPanel:
    functionThatGeneratesDefaultPanel});
    works correctly for setting the panel which needs to be
    displayed, but then if you click on the tabs to navigate to a
    different panel, tab one ALWAYS defaults to whatever the
    defaultPanel value was instead of being 0. Obviously this disables
    the accordion panel from working correctly.
    Any suggestions on how I can get around this?
    Your assistance is appreciated!
    elaine

    Thanks for the reply Chris. I have somewhat narrowed down the
    problem, but still haven't solved it (had to move on and finish the
    rest of the website:)
    As I mentioned previously, I am creating these accordion
    panels dynamically through xml. Inside one of the panels, there is
    a secondary navigation system which is fed by xml as well. The
    problem seems to be caused by having two datasets in the same
    accordion panel. Here is the code:
    var observer = { onPostUpdate: function(notifier, data) { var
    acc = new Spry.Widget.Accordion("nav",{defaultPanel:
    requestedPanel}); dsNavItems.setCurrentRow(requestedPanel);
    displayCoupons(); } };
    Spry.Data.Region.addObserver("nav", observer);
    and the accordion:
    <div id="nav" class="Accordion" spry:region="dsNavItems
    dsNavSubs">
    <div class="AccordionPanel" spry:repeat="dsNavItems">
    <div class="AccordionPanelTab" spry:hover="rowHover"
    spry:select="rowSelected"
    onclick="clicker({dsNavItems::ds_RowID});">
    <h3 spry:if="({ds_RowNumber}) != 2"
    onClick="dsNavItems.setCurrentRow('{dsNavItems::ds_RowID}');hideLayer('comingSoon');hideL ayer('coupons');hideLayer('couponLarge');hideLayer('imageHolderScreen');hideLayer('submenu Content');hideLayer('submenu1');showLayer('featureGraphic');showLayer('ticker');showLayer( 'newsBar');"
    spry:content="{dsNavItems::name}"></h3>
    <!-- for coupons -->
    <h3 spry:if="({ds_RowNumber}) == 2"
    onClick="dsNavItems.setCurrentRow('{dsNavItems::ds_RowID}');hideLayer('comingSoon');hideL ayer('imageHolderScreen');hideLayer('submenuContent');hideLayer('submenu1');hideLayer('fea tureGraphic');hideLayer('ticker');hideLayer('newsBar');showLayer('coupons');showLayer('cou ponLarge');"
    spry:content="{dsNavItems::name}"></h3>
    </div>
    <div class="AccordionPanelContent">
    <div spry:state="loading"><img
    src="images/ajax-loader.gif"/></div>
    <div spry:state="error"><span spry:content="The
    website is currently down. Please try again in a few
    minutes."></span></div>
    <!-- departments nav -->
    <div spry:if="({ds_RowNumber}) == 0"
    spry:state="ready">
    <div class="department" spry:repeat="dsNavSubs"
    onClick="{dsNavSubs::onClick}; goToURL('{dsNavSubs::url}')"
    spry:hover="rowHover" spry:select="rowSelected"
    spry:content="{dsNavSubs::name}"></div>
    </div>
    <!-- non-departments items -->
    <div spry:if="({ds_RowNumber}) != 0"
    spry:state="ready">
    <span
    spry:content="{dsNavItems::content}"></span>
    </div>
    </div>
    </div>
    </div>
    This problem can be seen at
    http://www.sportzoutdoor.com/index.php?panel=2
    This will default to opening the page with the second tab
    appearing. Trying clicking on the first tab and you will see that
    it tries to refresh, but comes up as the 2nd tab. When running an
    echo with this, on the rownumber, it returns as 2 for both the
    selected tab and for the first tab. For some reason, it is
    assigning 2 to this tab when it generates it.
    The problem only occurs when it is selecting a specific panel
    from the url query. Otherwise at
    http://www.sportzoutdoor.com/index.php
    it works fine. Also, this is the page where you can view the
    secondary nav system built into the first panel.
    Also, in another example - this one without a secondary nav
    system, but still with the url query, works fine:
    http://www.sportzoutdoor.com/cycling.php?panel=4
    Let me know what you think...
    thanks,
    elaine

  • Acquire data from a tab delimited file using a popup dialog object on a stamp

    I am trying to import data from a tab delimited file using a popup dialog object on a stamp.  I have purchased the book by Thom Parker--All About PDF Stamps in Acrobat and Paperless Workflows and have been working through the examples in the appendix.
    My problem is understanding how to bring the data into the dialog object from the file.
    I don't want to plagiarize his book--so am electing at this time not to show my code.  The  script is reading the file, just not bringing in the records from the file so that I can select which line to import into the stamp.
    I have typed in the code exactly how the book describes, but when the popup dialog object is selected, there is nothing in the drop-down.  When I click OK, the first record is put on the stamp--except for the fields that I am wanting to appear in the dialog object popup box.
    I have searched the forums, and also the JavaScript reference.  There are examples of the popup dialog object, but none of them show how to import the data from a file--just for the items to be typed in as the list.
    Any help would be greatly appreciated!  i have been trying to work on this for several months now.

    Karl
    Thank you for getting back with me!
    In answer to your questions:
    1. Your trusted function is not a trusted function. Did you put this
    function into a folder level script so that it will get executed at system
    startup?--
         yes--I saved the script as a .js file and put it in the following path (I have Acrobat XI Pro for Windows)
    C:\Documents and Settings\tjohnson\Application Data\Adobe\Acrobat\Privileged\11.0\JavaScripts\GetTabData.js
    2. The script cannot find your tab delimited data file, or it cannot
    extract the data. Did you add the data file in the correct location? The
    location from the script in the book would be c:\mydata\Contacts.txt
    Yes--the file is in the same path as the book.
    Below is my code that references the file.
    var cPath = "/c/mydata/Contacts.txt";
    the slashes in the book go in the direction of the text above--should they go in the direction that you have in your question?
    Also,  the name and email address need to be separated by one Tab character.
    They are. 
    3. The fields need to be named the same way as the columns in the data file (the two names are in the first line of the file).
    My headings are RevByFromTab and EmailFromTab--which match the names of the two fields on the stamp.
    So, check that you are not getting any errors in the JavaScript console
    (Ctrl-J or Cmd-J), and verify that the tab delimited file is in the correct
    location
    When I run in the java script console--and I just run the script on the stamp,
    it says
    TypeError: event.source is null
    17:Console:Exec
    undefined
    When I place the stamp on the page, the popup box is working, but when you click on the down arrow, there is nothing listed.  When I click OK, the RevByFromTab is populated by the first item in the file, but the EmailFromTab field says undefined.
    Thank you
    Message was edited by: tdjohnson7700

  • Filter data in multiple tabs from same XMLDataSet

    Hi All:
    What I need to do is display the content from one XML file in
    several different modes. I would prefer to use only one data call
    if possible because all information exists in the one file;
    however, I have not yet found a way to successfully filter the data
    on load.
    The data needs to display in three modes: alphabetically, by
    phase, and by owner. The Spry tab widget is used to create the
    'modes'. Within each mode, I need to break it down further. The
    alphabetical listing exists as an additional tabbed subset -- one
    tab for each letter. The phases and owner tabs also have sub tab
    arrangements.
    Within each secondary tab, the data needs to display based
    the first letter in its name field. Therefore on tabbed panel 'A',
    I need to have a table with those documents whose name begins with
    an 'a'; tabbed panel 'B' with a table with all the docs beginning
    with b, etc. The alpha listing has 26 sub tabs. The owner and phase
    listings 8 each. Each panel will contain a table. The information
    simple repeats in different arrangements.
    While using the alpha listing as an example, I can filter the
    data theoretically on tabs B - Z via an on click method, I also
    need to filter the 'A' to show ONLY 'A' on load. I have not found a
    way to do both of these tricks. Additionally when you click back an
    forth between tabs, the data disappears.
    While a database would be easier, I cannot use one. The data
    is generated from an Excel spreadsheet into the xml file from which
    the data is called by Spry.
    I am flummoxed. I have included the relevant code snippets
    below, including the tabs and the first panel which includes the
    table code which repeats in each tabbed panel.
    Thanks for your help.
    Skip Keats
    CODE SNIPPETS (Comment out = previous tries):
    <script src="../assets/spry/xpath.js"
    type="text/javascript"></script>
    <script src="../assets/spry/SpryData.js"
    type="text/javascript"></script>
    <script src="../assets/spry/SpryTabbedPanels.js"
    type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var dsSDLC = new
    Spry.Data.XMLDataSet("../assets/data/sdlc_doc_templates.xml",
    "worksheets/worksheet",{sortOnLoad:"SDLC_Template_Document_Name",sortOrderOnLoad:"ascendi ng",distinctOnLoad:true});
    dsSDLC.setColumnType("SDLC_LastModified", "date");
    function aA(ds, row, index){ var c =
    row.SDLC_Template_Document_Name.charAt(0); return c != 'A' ? null :
    row; };
    function aB(ds, row, index){ var c =
    row.SDLC_Template_Document_Name.charAt(0); return c != 'B' ? null :
    row; };
    function aC(ds, row, index){ var c =
    row.SDLC_Template_Document_Name.charAt(0); return c != 'C' ? null :
    row; };
    //function loadFilter(f) { dsSDLC.addFilter(f, true); }
    var dsAlphaA = dsSDLC;
    var dsAlphaB = dsSDLC;
    var dsAlphaC = dsSDLC;
    if (document.getElementById('pAlphaA')) {
    dsAlphaA.filter(aA); }
    if (document.getElementById('pAlphaB')) {
    dsAlphaB.filter(aB); }
    if (document.getElementById('pAlphaC')) {
    dsAlphaC.filter(aC); }
    /*var rgnA = Spry.Data.getRegion('dsAlphaA');
    var rgnB = Spry.Data.getRegion('dsAlphaB');
    var rgnC = Spry.Data.getRegion('dsAlphaC');
    if (rgnA) { dsAlphaA.filter(aA); }
    if (rgnB) { dsAlphaB.filter(aB); }
    if (rgnC) { dsAlphaC.filter(aC); }
    //var rgnA = Spry.Data.getRegion('pAlphaA');
    //var rgnB = Spry.Data.getRegion('pAlphaB');
    //var rgnC = Spry.Data.getRegion('pAlphaC');*/
    /*if (rgnA) {
    var name = rgn.getState();
    if (name == "loading") { loadFilter(aA); }
    if (rgnB) {
    var name = rgn.getState();
    if (name == "loading") { loadFilter(aB); }
    if (rgnC) {
    var name = rgn.getState();
    if (name == "loading") { loadFilter(aC); }
    <div id="sdlcFull" class="TabbedPanels">
    <ul class="TabbedPanelsTabGroup">
    <li class="TabbedPanelsTab"
    tabindex="0">Alpha</li>
    <li class="TabbedPanelsTab"
    tabindex="0">Phase</li>
    <li class="TabbedPanelsTab"
    tabindex="0">Owner</li>
    </ul>
    <div class="TabbedPanelsContentGroup">
    <div class="TabbedPanelsContent">
    <p>
    This is an alphabetical listing of the library.
    </p>
    <div id="sdlcAlpha" class="TabbedPanels">
    <ul class="TabbedPanelsTabGroup">
    <li id="tAlphaA" class="TabbedPanelsTab"
    tabindex="0">A</li>
    <li id="tAlphaB" class="TabbedPanelsTab"
    tabindex="0">B</li>
    <li id="tAlphaC" class="TabbedPanelsTab"
    tabindex="0">C</li>
    </ul>
    <div class="TabbedPanelsContentGroup">
    <div id="pAlphaA" class="TabbedPanelsContent"
    spry:region="dsAlphaA">
    <table>
    <thead>
    <tr>
    <th id="DocName">Template Document Name</th>
    <th id="DocOwner">Document Owner</th>
    <th id="Phase">Phase</th>
    <th id="LastMod">Document Modified On</th>
    </tr>
    </thead>
    <tfoot>
    <tr>
    <td colspan="4">Info</td>
    </tr>
    </tfoot>
    <tbody>
    <tr spry:repeat="dsAlphaA">
    <td id="RA{ds_RowID}" headers="DocName"><a
    href="{SDLC_Document_File_Name}"
    title="{SDLC_Template_Document_Name}
    {SDLC_Description}">{SDLC_Template_Document_Name}</a></td>
    <td headers="RA{ds_RowID}
    DocOwner">{SDLC_Document_Owner}</td>
    <td headers="RA{ds_RowID}
    Phase">{SDLC_Phase}</td>
    <td headers="RA{ds_RowID}
    LastMod">{SDLC_LastModified}</td>
    </tr>
    </tbody>
    </table>
    </div>
    <div id="pAlphaB" class="TabbedPanelsContent"
    spry:region="dsAlphaB">
    <table>
    <thead>
    <tr>
    <th id="DocName">Template Document Name</th>
    <th id="DocOwner">Document Owner</th>
    <th id="Phase">Phase</th>
    <th id="LastMod">Document Modified On</th>
    </tr>
    </thead>
    <tfoot>
    <tr>
    <td colspan="4">Info</td>
    </tr>
    </tfoot>
    <tbody>
    <tr spry:repeat="dsAlphaB">
    <td id="RA{ds_RowID}" headers="DocName"><a
    href="{SDLC_Document_File_Name}"
    title="{SDLC_Template_Document_Name}
    {SDLC_Description}">{SDLC_Template_Document_Name}</a></td>
    <td headers="RA{ds_RowID}
    DocOwner">{SDLC_Document_Owner}</td>
    <td headers="RA{ds_RowID}
    Phase">{SDLC_Phase}</td>
    <td headers="RA{ds_RowID}
    LastMod">{SDLC_LastModified}</td>
    </tr>
    </tbody>
    </table>
    </div>
    <div id="pAlphaC" class="TabbedPanelsContent"
    spry:region="dsAlphaC">
    <table>
    <thead>
    <tr>
    <th id="DocName">Template Document Name</th>
    <th id="DocOwner">Document Owner</th>
    <th id="Phase">Phase</th>
    <th id="LastMod">Document Modified On</th>
    </tr>
    </thead>
    <tfoot>
    <tr>
    <td colspan="4">Info</td>
    </tr>
    </tfoot>
    <tbody>
    <tr spry:repeat="dsAlphaC">
    <td id="RA{ds_RowID}" headers="DocName"><a
    href="{SDLC_Document_File_Name}"
    title="{SDLC_Template_Document_Name}
    {SDLC_Description}">{SDLC_Template_Document_Name}</a></td>
    <td headers="RA{ds_RowID}
    DocOwner">{SDLC_Document_Owner}</td>
    <td headers="RA{ds_RowID}
    Phase">{SDLC_Phase}</td>
    <td headers="RA{ds_RowID}
    LastMod">{SDLC_LastModified}</td>
    </tr>
    </tbody>
    </table>
    </div>
    </div>
    </div>
    </div>

    A table control is a 2D array of strings. Thus, you have to work within the rules of how to add elements to a 2D array. The primary rule is that it must always be rectangular. The default paste action on a table control will try to insert rows/columns depending on the contents of the clipboard. Thus, if your initial table 2 contained no data, and you tried to paste two cells, they would end up at the top-left corner, not in rows 4 and 5. Even if there were data already present (or just blank cells, which would be empty strings), the paste would not overwrite the contents - it would insert rows/columns.
    This means you need to override the way the paste works. The easiest way to do this is with an event structure, and you handle the target table control's "Shortcut Menu Selection (App)" event. Here you can use the Point to Row Column method to get the row/column where the cursor was located. Then, you can determine whether to use Replace Array Subset or Insert Into Array to replace the cell contents, or add new ones if the user is pasting beyond the 2D array contents.

  • First tab not getting "TabPanelTabSelected" class when tabs created from dataset

    Greetings all. I've got a tabbedpanel widget whose tabs are
    created with a spry repeat region. works great, except none of the
    tabs get the "TabPanelTabSelected" class on initial load. I tried
    setting the defaultPanel in the constructor, but to no avail.
    here's the div that creates the tabs:
    <div class="statustabs_TabbedPanels SpryHiddenRegion"
    id="statustabs" spry:region="dsRequestCounts">
    <ul class="statustabs_TabbedPanelsTabGroup"
    spry:repeatchildren="dsRequestCounts">
    <li
    class="statustabs_TabbedPanelTab"
    spry:hover="statustabs_TabbedPanelTabHover"
    spry:select="statustabs_TabbedPanelTabSelected"
    tabindex="{dsRequestCounts::@StatusID}"
    onclick="updateRequests({dsRequestCounts::ds_RowID})"
    >{dsRequestCounts::@StatusName} (<span
    id="statustabcount_{dsRequestCounts::ds_RowID}">{dsRequestCounts::@RequestCount}</span>)< /li>
    </ul>
    </div>
    and here's the constructor, which is done after the tab divs
    are created:
    <script type="text/javascript">
    var statustabs = new Spry.Widget.TabbedPanels("statustabs",
    tabHoverClass:"statustabs_TabbedPanelTabHover",
    tabSelectedClass:"statustabs_TabbedPanelTabSelected",
    tabFocusedClass:"statustabs_TabbedPanelTabFocused",
    panelVisibleClass:"statustabs_TabbedPanelContentVisible"
    </script>
    So, the question is: how can i get that first tab, on load,
    to take on the appropriate class so that it's styled appropriately?
    thanks so much.
    Marc

    Thanks a lot Kin. I now have it working, mostly. I changed
    the contentgroup div so that it repeated over the RequestCounts to
    create the table. However, when I did that, obviously it drew the
    table each time through the loop. So I changed the table's spry:if
    to also look at the current status names for equality. only then
    does it actually draw the table for the status that's been clicked.
    the final version appears below.
    Now, I do have two problems though.
    1) I can no longer use the spry:loading state. If I have
    this: <div spry:state="loading">loading...</div> right
    under the "TabbedPanelscontentGroup" div, I get an error that
    tpIndex is not defined. So...do you know how i can get this
    functionality back?
    2) One thing I needed to implement was "persistent" tab on
    data refresh. I added a loadInterval on the RequestCounts dataset,
    and thus everytime that interval was up the tab went back to the
    first one. So in the updateRequests() function, i set a variable
    named 'selectedTab' to the clicked rowid. Then, in the
    tabObserver.onPostUPdate function, i have the dsRequestCounts
    current row being set to that variable.
    The only problem with this is that the "requests" dataset
    then gets loaded twice when the interval causes the data to reload:
    once for the first row, and then once for my 'persisted' row. This
    makes sense, but i just don't know how to fix it. i'm pasting the
    code into this post...maybe someone can see some way to get around
    this?
    Basically, the behavior I want is this:
    a) on initial page load, load the requestCounts dataset and
    use the first row of that dataset to load the requests dataset
    (this works)
    b) when a user clicks a tab, load the requests dataset with
    the rowid of the clicked tab (this works)
    c) when the loadInterval causes the RequestCounts dataset to
    be refreshed, use the 'selectedTab' variable as the CurrentRow of
    the RequestCounts data such that the Requests dataset is loaded
    with the correct row and the selected tab is correct
    So the only rpoblem i have is with c, and the only problem
    there is that essentially what happens is the requests dataset is
    loaded twice.
    Thanks to any and all for advice getting the "loading" state
    working and the refresh behavior correct!
    --------------- here's the current code -----------------
    <!--- ---><cfset request.cfcore = "/argus/dope/">
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xmlns:spry="
    http://ns.adobe.com/spry">
    <HEAD>
    <TITLE>Spry widgets Samples One</TITLE>
    <link href="/argus/dope/style/style.css" rel="stylesheet"
    type="text/css" />
    <link href="/argus/dope/style/widgets.css"
    rel="stylesheet" type="text/css" />
    <SCRIPT
    SRC="/argus/spry/includes/xpath.js"></SCRIPT>
    <SCRIPT
    SRC="/argus/spry/includes/SpryData.js"></SCRIPT>
    <SCRIPT
    SRC="/argus/spry/includes/SpryXML.js"></SCRIPT>
    <SCRIPT
    SRC="/argus/spry/widgets/tabbedpanels/SpryTabbedPanels.js"></SCRIPT>
    </HEAD>
    <body>
    <cfoutput>
    <script type="text/javascript">
    var selectedTab=0;
    var loaded = 0;
    var statustabs = new Object;
    //datasets for the tabbed panel of requests.
    dsRequestCounts = new
    Spry.Data.XMLDataSet("#request.cfcore#ajax/act/act_RequestCountsXML.cfm?StatusesFromLast= 100&ServerGroupID=14",
    "statuses/status",{useCache:false,loadInterval:20000});
    dsRequests = new
    Spry.Data.XMLDataSet("#request.cfcore#ajax/act/act_RequestsXML.cfm?StatusesFromLast=100&S erverGroupID=14&StatusID={dsRequestCounts::@StatusID}",
    "requests/request",{useCache:false});
    //for the tabbed panels
    tabObserver = new Object;
    tabObserver.onPostUpdate = function(notifier,data){
    dsRequestCounts.setCurrentRow(selectedTab);
    //alert("onpostupdate: " +
    dsRequestCounts.getCurrentRowNumber());
    statustabs = new Spry.Widget.TabbedPanels("statustabs",
    {defaultTab:dsRequestCounts.getCurrentRowNumber(),
    tabHoverClass:"statustabs_TabbedPanelTabHover",
    tabSelectedClass:"statustabs_TabbedPanelTabSelected",
    tabFocusedClass:"statustabs_TabbedPanelTabFocused",
    panelVisibleClass:"statustabs_TabbedPanelContentVisible"
    Spry.Data.Region.addObserver("statustabs",tabObserver);
    function updateRequests(rowid){
    dsRequestCounts.setCurrentRow(rowid);
    selectedTab=rowid;
    //alert("updaterequests: " +
    dsRequestCounts.getCurrentRowNumber());
    //statustabs.showPanel(rowid);
    </script>
    </cfoutput>
    <!--- tab div --->
    <div id="statustabs" class="statustabs_TabbedPanels
    SpryHiddenRegion" spry:region="dsRequests dsRequestCounts">
    <ul class="statustabs_TabbedPanelsTabGroup">
    <li spry:repeat="dsRequestCounts"
    class="statustabs_TabbedPanelTab"
    tabindex="0"
    onclick="updateRequests({dsRequestCounts::ds_RowID})"
    >{dsRequestCounts::@StatusName} (<span
    id="statustabcount_{dsRequestCounts::ds_RowID}">{dsRequestCounts::@RequestCount}</span>)< /li>
    </ul>
    <!--- tab content group div --->
    <div class="statustabs_TabbedPanelsContentGroup">
    <div spry:state="loading">loading...</div>
    <div class="statustabs_TabbedPanelContent"
    spry:state="ready" spry:repeat="dsRequestCounts">
    <table class="requeststable" width="100%"
    spry:if="{dsRequests::ds_RowCount}!=0 &&
    '{dsRequestCounts::@StatusName}'=='{dsRequests::@StatusName}'">
    <tr>
    <th
    onclick="dsRequests.sort('@RequestID','toggle')">ID</th>
    </tr>
    <tr spry:repeat="dsRequests"
    spry:even="requeststable_even" spry:odd="requeststable_odd">
    <td>{dsRequests::@RequestID}</td>
    </tr>
    </table>
    <div spry:if="{dsRequests::ds_RowCount}==0">
    Move along...nothing to see here
    </div>
    </div>
    </div>
    </div>
    </body>
    </html>

  • How export to csv work in safari browser? In my application export to csv open like a raw data in new tab. But other browsers working great!. Need to open in a csv file or save it as a csv file.

    How export to csv work in safari browser?
    In my application export to csv open like a raw data in new tab.
    But other browsers working great!.
    Need to open in a csv file or save it as a csv file.
    Please suggest me. Thank you in advance!.

    Hi Adrian,
    Why don't you try any another software for opening CSV files then Notepad ? According to my experience, you can use these softwares to open an CSV files and they are:-
    Microsoft Excel
    Open Office Calc
    Google Docs
    Also there is an additional tool available known as CSV viewer. You may try this, download it from here http://www.csvviewer.com/
    I've never used Notepad for opening CSV files, because sometimes it contains some symbols which are not not at all compatibile with Notepad.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Firefox closes when i close the first tab of the browser using latest version 10.0 release.

    I open many tabs on firefox, many times when I close the first tab, the entire window closes, and I have to reopen the browser. When I try that many times I get a message saying something like "Firefox is running Cannot open another window". When I checked the Task Manager I see firefox.exe and plugin-container.exe running. but the firefox is nowhere to be seen. Once I "End Task" these two, I can start firefox. This thing happens many times

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    See also:
    *http://kb.mozillazine.org/Firefox_crashes
    *https://support.mozilla.org/kb/Firefox+crashes

Maybe you are looking for

  • Problems with headset + iPad 1

    Hi! I recently bought this item: http://dx.com/p/3-5mm-audio-adapter-for-ipad-2-ipad-iphone-4-3gs-3g-81683 , so that all my headsets finally could be coupled to the iPad. I have the following problems: - I can't manage sound through headset by using

  • Execute a function c in pl-sql

    hi, i would like execute a c function in pl-sql int iCalculate ( int op1, int op2 ) return op1+op2; i would like compile a the function with gcc and creat .o file and after use this file in pl-sql. it's possible? The performance of this system?

  • 6681 not getting detected by update software

    the 6681 is detected by PC suite but not by the update software..plz help me on this

  • Nokia express music 5800 contact number problem

    I can't get my phone numbers from my phone. when i try to open the phonebook it says no contact is there. though there is contacts saved in phonebook. Even if any person call me it displays there name in Dialed,missed,recieved number list. IIf i try

  • Configuration of Network Printer in Windows

    Hi All, I have a Sun Solaris 10 installed in HP PC (X86), I have successfully configured the network and is working fine. I have HP printer connected to a PC (say) Tim's PC running Windows 2000 Prof. OS. Tim's PC is also in the same network and is wo