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>

Similar Messages

  • Why can i not get the class javax/swing/UImanager from installanywhere??

    I use Installanywhere to pack my program,but when i double-click the short-cut,it says no class found :javax/swing/UImanage.
    anybody can tell what happened?
    thanks.

    who can help me ? none want to help me.

  • Entitlements not getting displayed in Entitlements Tab - OIM11gR2

    Hi Experts,
    I am trying to provision entitlements to users by requesting entitlements. When i successfully provision entitlements, the entitlement is getting displayed in accounts tab, child form. But the same is not getting displayed in entitlements tab of the user.
    Please kindly guide me
    regards

    Verify below steps:
    1. Marking Entitlement Attributes on Child Process Forms
    http://docs.oracle.com/cd/E27559_01/admin.1112/e27149/appinstance.htm#CHDFFEEE
    If you have already marked it then fine. else create new version of form and add property Entitlement=true. activate this . make sure the parent form having the latest child form. goto parentform->child tab and verify the child form version.if not create new version for the parent form and activate this version.Automatically it will pick the latest child form
    2. Run Below scheduled task
    a. Entitlement List scheduled task.
    b. Entitlement Assignments scheduled task

  • Custom Tab not getting high-lighted

    Custom Tab not getting high-lighted
    Hi,
    I have added a new tab TabX in Item Master data form.
    When only my add-on is running, it is working properly:
    When I click on the TabX, all the controls belonging to the tab are displaying correctly.
    TabX control is getting highlighted.
    When my add-on runs with another add-on (DBS):
    When I click on the TabX, all the controls belonging to the tab are displaying correctly.
    But, TabX is not getting highlighted. Instead, some other tab(purchasing tab) is getting highlighted.
    1) I'm not sure what is done by the other add-on.
    2) I cannot debug my add-on when the other add-on is running. (Because we cannot get the other add-on installed in our office network. It is running only in client site.)
    So, I need to 'guess' what might solve this problem.
    Please help me if you know any work-arounds, so that I can highlight TabX (The normal effect of pressing a tab) in this situation.
    Thank you.
    Regards,
    Geetha

    Hi Geeta,
    on FormLoad event,add the panelevel and set the panelevel of the Items.(must ber unique on that form)
    OnLoadAfter(ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent)
                BubbleEvent = true;
                AddNew_IndirectCost_Tab()
    private void AddNew_IndirectCost_Tab()
                     oForm.DataSources.UserDataSources.Add("Folder", SAPbouiCOM.BoDataType.dt_LONG_TEXT, 100);
                    oItem = (SAPbouiCOM.Item)oForm.Items.Item("36");
                    oNewItem = oForm.Items.Add("oFldrCost", SAPbouiCOM.BoFormItemTypes.it_FOLDER);
                    // oNewItem.AffectsFormMode = true;
                    oNewItem.Top = oItem.Top;
                    oNewItem.Height = oItem.Height;
                    oNewItem.Width = oItem.Width;
                    oNewItem.Left = oItem.Left + oItem.Width + 50;
                    oFolder = (SAPbouiCOM.Folder)oNewItem.Specific;
                    oFolder.DataBind.SetBound(true, "", "Folder");
                    oNewItem.AffectsFormMode = false;
                    oFolder.Caption = "Indirect Cost";
                    oFolder.GroupWith("36");
                    oItem = (SAPbouiCOM.Item)oForm.Items.Item("60");
                    oNewItem = oForm.Items.Add("LblMacCost", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                    oNewItem.Top = oItem.Top;
                    oNewItem.Height = oItem.Height;
                    oNewItem.Width = oItem.Width + 20;
                    oNewItem.Left = oItem.Left;
                    *oNewItem.FromPane = 222;*      // set pane level
                    *oNewItem.ToPane = 222;*          //set panelevel
                    oStaticText = (SAPbouiCOM.StaticText)oNewItem.Specific;
                    oStaticText.Caption = "Actual Machine Cost";
    on click of the your pane set the panelevel, like;
    protected override void  etClickBeforeAction(ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent)
                BubbleEvent = true;
                 if (pVal.ItemUID == "oFldrCost")                    // oFldrCost-My pane,
                     oForm.PaneLevel = 222;
    The main thing is that you have to set the form's panelevel on click_before event and youe pane will be high lighted

  • Support messages not getting displayed in Messages Tab - Solar01/02

    Hi,
    I am having an issue in displaying the support messages under the message tab of Solar01 and Solar02. If I try to create a new message, the notification pops up and also gets saved. But the message does not get displayed under the tab.
    I can find that the message is properly created through transaction monitor.Even if I try to manually assign the support message number in Messages tab it gives an error saying the number does not exist.We are using SOLMAN 4.0 SP 11.
    Please help. Points will be awarded for useful answers.
    Regards,
    J.Prabananth

    Dear Prabanath,
           I am not too sure you will be able to assign numbers to support messages. Run the report CRM_DNO_MONITOR and get the full number from the report and insert the ticket number in issue messages tab and click on save and go back one screen, it will ask you if you want to save, select yes.
       That worked for me. Recently I have strugged to resolve this. We are on Solman 4.0 SP12. Check if you have all necessary permissions for you and do you have any thing in sm21 or st22 by any chance if the issue is related to support pack ?
         Let me know if there are any issues. I might be able to help you.
    N

  • I want to delete a few contacts, apps, pics etc from my iphone, but when I delete and connect to my laptop they sync and come back again. How can I delete those items and not get them back when I connect my iphone to my laptop?

    I want to delete a few contacts, apps, pics etc from my iphone, but when I delete and connect to my laptop they sync and come back again. How can I delete those items and not get them back when I connect my iphone to my laptop?
    Also where exactly on the laptop is teh data stored.
    Thank you!!

    go to 'Edit' in the menu bar. Then choose 'Preferences'.
    you'll see a pop-up and there's a tab called 'Devices' there. If you click that, you will be able to check a box that says 'prevent automatic syncing for iPods, iPads and iPhones' or something like that.
    Hope this helps
    NB: if you don't even see the menu bar that has options like 'File, Edit, View, etc', first click the black/white square button on the top left of your screen, and then click 'show menu bar'. It should pop right up.
    Good luck

  • Not getting planning Applications when Log on Work space

    Hi Dear Experts,
    when log on Workspace to access Planning:
    its show showing
    Navigate ->Administration->User management
    instead if Select Navigate > Applications > Planning
    and iam not getting planning Applications when Log on Work space
    I have Just Installed Essbase and Planning into my machine .. and i have opened work space area and
    and i tried to create first application by using the following URL
    http://localhost:8300/HyperionPlanning/AppWizard.jsp
    iam getting not able create first application..
    can you please guide me how can i work with planing applications..
    thanks in advance
    Kishore

    Hi Kishore.
    From config utility, did you create an instance before trying to access.
    I mean "product instance registration" and "data source configuration"
    You can find it in the installation doc
    Sandeep Reddy Enti
    HCC
    http://analytiks.blogspot.com

  • I am getting a error IO when trying to upload multiple images within wordpress using the flash uploader. I do not get the error when uploading using explorer. The error only appears if I try uploading using firefox....any ideas?

    I am getting a error IO when trying to upload multiple images within wordpress using the flash uploader. I do not get the error when uploading using explorer. The error only appears if I try uploading using firefox....any ideas?

    Logged the call with SAP who directed me to 'Define settings for attachments' in IMG and setting the 'Deactivate Java Applet' & 'Deactivate Attachment versioning' checkboxes - problem solved.

  • My iphone 4 does not register calls made to it. if i make a call from another phone, i can hear it ringing, but it does not register on the iphone. also, i do not get any messages when this happens. then after a day or two it decides to start working.

    My iphone 4 does not register calls made to it. if i make a call from another phone, i can hear it ringing, but it does not register on the iphone. also, i do not get any messages when this happens. then after a day or two it decides to start working.

    Clean iPhone charging port with clean dry toothbrush. See if better. If still problem clean charging port again with toothbrush and small amount of Isopropyl Alcohol.

  • HI. I have itunes 10.6.1.7. When I goto movies i am not able to add and when I click on add file to library and select the file and add its not getting added. When i goto Library it says  that movies I add are in library.Which I cant add

    HI. I have itunes 10.6.1.7. When I goto movies i am not able to add and when I click on add file to library and select the file and add its not getting added. When i goto Library it says "feature films and home movies you add to itunes appear in movies in your iTunes library. To play a movie, just double click it". And below are two options for Downloading movies from store and rent movies. Please help.

    I get the exactly the same problem with win 7, i rang apple support who suggested i try another machine/or create another account on my machine???? why should i, stupid ipad 3rd gen is now sitting here un syncable, apple support ....tut tut very poor support, its a shame im out of the 7 day period otherwise this ipad would be going straight back, older versions of itunes worked fine, some one must know a fix for this??

  • My ipad will no longer connect to the laptop. it comes up with usb not recognized. also when trying to connect to the power the first time i connect, nothing, but when i unplug from ipad and plug in a second time it charges

    my ipad will no longer connect to the laptop. it comes up with usb not recognized. also when trying to connect to the power the first time i connect, nothing, but when i unplug from ipad and plug in a second time it charges

    yeah tried all that. the only thing that i havent tried is to delete itunes completely and restart. its the same with the ipad. i havent done a master reset. i just think it has to be something rather simple as it acknowledges that i have plugged in the ipad as it makes the noise it just come up usb not recognized. it shows up as an unknown device that doestn have  any drivers
    its driving me round the bend at the minute

  • Same thing is happening to me. Adobe has not responded to anyone about this error. It appears that Abobe XI is not compatible with IE 11.  I do not get this error when I use Chrome or Firefox. Only IE 11 does this. I have tried clearing cache and cookies.

    Same thing is happening to me. Adobe has not responded to anyone about this error. It appears that Abobe XI is not compatible with IE 11.  I do not get this error when I use Chrome or Firefox. Only IE 11 does this. I have tried clearing cache and cookies. I even uninstalled and re-installed IE 11. It is still doing it.  I am surprized that a company like Adobe would just ignore our posts and leave us hanging this this.
    Error message is FAILED TO GET DISPATCH FROM IBRWSR2.  Then when you click on it the next error message says:  PHTML IS NULL. You have to click this error message twice and then the PDF finally loads. Happened every time
    Does anyone have a solution since Adobe will not respond?
    As a last resort I will try uninstalling the Adobe Reader XI and install Adobe Reader 10 instead. It seems to work ok. But when I try to install version 10 the Adobe site tries to install XI.  Any ideas?
    JimP08758

    It worked just fine for me.
    Many site issues can be caused by corrupt cookies or cache.
    * Clear the Cache and
    * Remove Cookies '''''Warning ! ! '' This will log you out of sites you're logged in to.'''
    Type '''about:preferences'''<Enter> in the address bar.
    * '''Cookies;''' Select '''Privacy.''' Under '''History,''' select Firefox will '''Use Custom Settings.''' Press the button on the right side called '''Show Cookies.''' Use the search bar to look for the site. Note; There may be more than one entry. Remove '''All''' of them.
    * '''Cache;''' Select '''Advanced > Network.''' Across from '''Cached Web Content,''' Press '''Clear Now.'''
    If there is still a problem,
    '''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Start Firefox in Safe Mode]''' {web link}
    While you are in safe mode;
    Type '''about:preferences#advanced'''<Enter> in the address bar.
    Under '''Advanced,''' Select '''General.'''
    Look for and turn off '''Use Hardware Acceleration'''.
    Poke around safe web sites. Are there any problems?
    Then restart.

  • Error "enter a numeric value"  I am not getting this error when i directly

    We are using BAPI "BAPI_ROUTING_CREATE". I am using an excel file for input. I am getting errors against Standard Values and Unit of measure of Standard Values while running the BAPI through an ABAP program.
    The errors are:
    1. enter a numeric value
    2. Enter a unit of dimension time for standard value
    I am not getting this error when i directly run BAPI_ROUTING_CREATE through SE37.
    Kindly help

    Hi, I had the same problem. Solution for me:
    OPERATION-ACTIVITY = <T>-ACTIVITY.   " activity for example "5"  ---> problem error "Enter a numeric value"
    OPERATION-ACTIVITY = <T>-ACTIVITY.   " activity for example "0005"  ---> no problem --> include leading 0
    so I chanded <t>-activity field type to N(4) and no problem...
    Bye, B.

  • I'm not getting any sound when i play a video; HP pavilion dv7 Windows 7

    I'm not getting any audio when I try to play a video, such as youtube; I have an HP pavilion dv7....op sys is Windows 7;  Funny thing is that when my brother signs in under his User ID, he gets audio, but I don't when I'm the user.  I've checked all of the on/off audio mute buttons that I know of.
    what can you suggest?

    Is it just sites like YouTube? Can you play music files-mp3/cd ,hear Windows system sounds,etc?
    ******Clicking the Thumbs-Up button is a way to say -Thanks!.******
    **Click Accept as Solution on a Reply that solves your issue to help others**

  • Im not getting any sound when i select a track and put it in the arrange area

    Im new to pro logic,, when i select a track and put it in the arrange area,, im not getting any sound when it plays.. I can hear it play in the list of samples, but not when its in the arrange area,,, help meeeeee

    Are you putting the file on an instrument channel rather than an audio channel? That's one possibility. The track could be muted is another.

Maybe you are looking for

  • Creating a gif Title for a Web Page

    http://www.coachinginroads.com/dev/public_html/index3.html I am trying to create a slide show where the image changes behind the title "Coaching Inroads." The title needs to stay stationary, which is why I thought a transparent gif would work. The em

  • Please cancel my subscription. I have tried everything.

    Will someone please cancel my subscription for me. Or at least send me the link where I can talk to someone. I have been going through constant loops and getting no where. The link to the contact page just brings me here.

  • HT204406 How do you remove music from Match Shuffle?

    There is music in my Itunes i no longer want to play when i shuffle my music... I've removed them from shuffle on iTunes but how do i remove them for itunes Match?

  • Problem updating master data

    Hi all, im having a problem updating master data for an infoobject. Im not able to upload the data from the data source and im not able either to update it manually. Im getting this error Field symbol has not yet been assigned can anybody hekp me?

  • Smartforms Global Data

    I am using the below Method to extract Resubmission data from a contract.  The data I need extracted is in parameter t_resubm_date.  The problem is I don't know what TYPE to use when defining the variable under Global Data which Smartforms requires.