ALI Scripting Framework question: PTPortalPage() - I can't find any example

I can't successfully create an array or portlet objects using the getPortlets() method of the PTPortalPage object in a portlet using the ALI scripting framework.
The .zip file containing scripting framework samples (https://codesamples.projects.dev2dev.bea.com/servlets/ScarabDownload/resultpos/-1/nbrresults/0/remcurreport/true/template/ViewAttachment.vm/attachid/5124/filename/ALI_Scripting_Framework_Samples.zip) doesn't have any examples.
var arrPortlets = new Array(PTPortalPage.getPortlets());
alert(arrPortlets.length);
This code says I only have one portlet on the page, but I have 3. Also, I'm unable to loop through the one in returned and turn it into PTPortlet object so that I can get the name and id of the portlet.
Does anyone have a code sample on how to loop through the portlets on a page using the ali scripting framework's PTPortalPage.getPortlets()?

Got it. I wouldn't particularly call the return value of the getPortlets() method an array of PTPortal objects - but rather it's just an array of ids.
var arrIDs = PTPortalPage.getPortlets();
for (var i in arrIDs)
var portlet = new PTPortlet.getPortletByID(i);
alert("pid: " + portlet.id + ", name: " + portlet.name);
}

Similar Messages

  • Custom report layout question...can't find any answers anywhere

    I am trying to build a report in Portal, using the custom report layout. The report displays like so, before I do any customization:
    COLUMN1 COLUMN2 COLUMN3
    COLUMN1 COLUMN2 COLUMN3
    COLUMN1 COLUMN2 COLUMN3
    COLUMN1 COLUMN2 COLUMN3
    where COLUMN1 is the same value, always per report; COLUMN2 and COLUMN3 vary.
    What I want is:
    COLUMN1
    COLUMN2 COLUMN3
    COLUMN2 COLUMN3
    COLUMN2 COLUMN3
    COLUMN2 COLUMN3
    In the report layout editor, Body section, this is what I see:
    <TD ALIGN="LEFT"><#COLUMN1.FIELD#></TD>
    <TD ALIGN="LEFT"><#COLUMN2.FIELD#></TD>
    <TD ALIGN="LEFT"><#COLUMN3.FIELD#></TD>
    so #COLUMN1.FIELD# must be some kind of array, but I am not finding any documentation anywhere on how to reference the individual values. All I need is the very first value of the COLUMN1 variable. Once I have that value, I can put it where I need it, but I can't get at that value, just the array.
    I have searched portal center, the app server documentation, html documentation. I have googled everything I could think of, but came up with nothing. I found a similar question on this forum, but no one responded with an answer. Any help would be greatly appreciated.

    Helen,
    The best way for your case is to use a content folder and customize it whichever way you like.
    however, your question is about reports. the problem in reports is this that you have to use just one single query and the layout of the results of this query are displayed in a peculiar way.
    anyway. something similar but not exactly the same as what you wanted do is the following.
    use a query like the following: (with a union in between)
    SELECT COLUMN1,NULL , NULL ,NULL ,NULL
    FROM my_source_table
    WHERE myCriteria LIKE 'SoAndSo%'
    UNION
    SELECT NULL,COLUMN2 , COLUMN3, COLUMN4, COLUMN5
    FROM my_source_table
    WHERE myCriteria LIKE 'SoAndSo%'
    ---------- Now, have the following codes in the layout segments:
    <!--- header --->
    <table border="0" cellpadding="1" cellspacing="1" width="20%" align="center">
    <!--- body --->
    <tr align="center">
    <td><table border="0" cellpadding="1" cellspacing="0" width="30%" align="center">
    <tr align="center">
    <TH><#COLUMN1.FIELD#></TH>
    </tr>
    </table>
    </td>
    <TD class="report_cell" ALIGN="LEFT"><#COLUMN2.FIELD#></TD>
    <TD class="report_cell" ALIGN="LEFT"><#COLUMN3.FIELD#></TD>
    <TD class="report_cell" ALIGN="LEFT"><#COLUMN4.FIELD#></TD>
    <TD class="report_cell" ALIGN="LEFT"><#COLUMN5.FIELD#></TD>
    </tr>
    <!--- footer --->
    <TR><TD></TD></TR>
    this should produce a report with a table structure (you may see the whole if you give BORDER="1" in the main table tag). Within this table, the first column of the first row should be showing top-leftmost column value once (COLUMN1 value) and then the next rows would show last four column values as a table block on the right-bottom part.
    with kind regards,
    naqvi

  • How can I use the ni-6024-e with the real time of matlab/simulink. Where can I find any example?

    I am doing the final project and I need to control the ni-6024-e with the RTW (real time) of matlab/simulink.
    Does anyone know or have any example?.
    Thanks

    Rafelmor,
    Have you contacted The MathWorks yet? They probably have the best information.
    However, I did a quick search and found some information on The MathWorks' site. For Data Acquisition Toolbox examples: http://www.mathworks.com/access/helpdesk/help/toolbox/daq/daq_example_index.shtml.
    For RTW information: http://www.mathworks.com/support/product/RT/.
    Good luck with your application.

  • Is it possiable to use "ALI SCRIPTING FRAMEWORK API " in JSR 168 Portlets?

    Hi,
    Is it possiable to use "ALI SCRIPTING FRAMEWORK API " in JSR 168 Portlets.
    With Regards
    Dheeraj Sai

    If you want to use (let say it's possible) "ALI SCRIPTING FRAMEWORK API" in JSR 168 then these porlets are not "JSR-168" compatible anymore. So you automatically lost the main benefit of JSR-168 portlet - works over different portal vendors.
    I guess if you have decided use JSR-168 you did this for reasons. Then stay this way and don't use any proprietary technologies.
    By the way, this topic may help:
    http://forums.bea.com/bea/message.jspa?messageID=500025455&tstart=0
    Edited by Bryazgin at 05/18/2007 6:36 AM

  • This is probably a dumb question, but I can't find an answer. How do I make the text on my calendar larger so I can actually read it when I print it out?

    This is probably a dumb question, but I can't find an answer. How do I make the text on my calendar larger so I can actually read it when I print it out? I am using a MacBook.

    Press "Command P" and when the Print dialogue box comes up, towards the bottom there is an option allowing you to choose the text size, i.e: small, med, large.
    Hope this helps,
    NEIL

  • I have stopped too many scripts in Firefox and I can't open any websites in Firefox anymore. I just get blank pages. What do I do now?

    3 websites gave me this message:- "A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete." I chose to stop the script each time. However I have stopped too many scripts in Firefox and I can't open any website in Firefox anymore. I just get blank pages. What do I do now?

    Certain Firefox problems can be solved by performing a ''Clean reinstall''. This means you remove Firefox and any leftover program files and then reinstall Firefox. Please follow these steps one by one:
    #Download the latest Desktop version of Firefox from http://www.mozilla.org and save the setup file to your computer.
    #After the download finishes, close all Firefox windows (click Exit from the Firefox or File menu) and confirm all upcoming messages.
    #Now, uninstall Firefox by following the steps mentioned in the [[Uninstall Firefox from your computer#w_uninstall-firefox|Uninstall Firefox]] article.
    '''IMPORTANT:''' On Windows, the uninstaller has the option to remove your personal data and settings. Make sure that you do '''not''' check this option; otherwise all of your bookmarks, passwords, extensions, user customizations and other Firefox [[Profiles|user profile data]] will be removed from your computer.
    After uninstalling Firefox on Windows, delete the "Mozilla Firefox" program folder, located by default in one of these locations:
    * '''(On 32-bit Windows)''' ''C:\Program Files\Mozilla Firefox''
    * '''(On 64-bit Windows)''' ''C:\Program Files (x86)\Mozilla Firefox''
    #Go to the Windows Start menu and click on "Computer".
    #In the Explorer window that opens, double click Local Disk (C:) to open the C:\ drive.
    #Find the "Program Files (x86)" folder or "Program Files" folder.
    #* On 32-bit Windows, double-click the '''Program Files''' folder to open it.
    #* On 64-bit Windows, you will see a "Program Files (x86)" folder AND a "Program Files" folder. Open the '''Program Files (x86)''' folder.
    #Look for a '''Mozilla Firefox''' folder. If you find one, right-click it and select ''Delete'' and confirm that you want to move the folder to the Recycle Bin.
    Now, go ahead and reinstall Firefox:
    #Double-click the downloaded installation file and go through the steps of the installation wizard.
    #Once the wizard is finished, choose to directly open Firefox after clicking the Finish button.
    Please report back to see if this helped you!

  • How do i reset my security questions? I can't find anything that will let me change them

    I need to reset my security questions but i can't find anything that says reset questions here.

    The reset link will only show if you have a rescue email address (which is not the same thing as an alternate email address) set up on your account. If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then you will need to contact iTunes Support / Apple in your country to get the questions reset - which will normally be by phone as they need to confirm your id and that it's your account.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset you can then use the steps half-way down the HT5312 page that you posted from to add a rescue email address for potential future use

  • My question is how can i find and redownload all my older apps ?

    HI,
    I have an Iphone 4, and bought mostly all of my Apps from my Iphone.
    I needed a certain App called Viber and tried to download it.
    I didn't work and it told me to download it from my computer (Macbook pro) Itunes,
    which i did, then i synched (my error) my iphone to my mac, then it erased all my apps from my iphone.
    My question is how can i find and redownload all my older apps ?
    Do i have to go find them manually and download them again?

    I'm guessing on the computer you connected to you were not logged into our account in iTunes and/or you never transferred your apps from your iPhone to your computer.
    Yes, you will need to download all of them again manually.

  • HT201303 I forgot all the answers to my questions, now i can't buy any apps from the apple store. What will i do... Please help....

    I forgot all the answers to my questions, now i can't buy any apps from the apple store. What will i do... Please help....

    Go to appleid.apple.com. From there, go to Manage Apple ID. Log in and go to Password and Security. When you get to the page about answering your security questions, click on the link for Forgot My Answers. That will send an email to the rescue email address on how to reset. If you did not provide a rescue email address then you will need to go to Express Lane Support https://expresslane.apple.com/GetproductgroupList.action for help.

  • HT5312 I can't buy any thing with money on my iTunes I fregot my security questions and I can do it any other way I now my password and every thing else

    I can't buy any thing with money on my iTunes I fregot my security questions and I can do it any other way I now my password and every thing else

    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then steps 1 to 5 on the page that you posted from should let you reset them.
    If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then you will need to contact iTunes Support / Apple to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down the page that you posted from to add a rescue email address for potential future use

  • One stupid question! I can't find how to put my alarm clock ringing tone

    One stupid question! I can't find how to put my alarm clock ringing tone - music (you have bad tunes out there.)
    I hope very much that I was mistaken
    <Edited by Host>

    Here is just one of the many articles explaining how to make your own ringtones.
    http://osxdaily.com/2010/09/04/make-free-iphone-ringtones-in-itunes-10/
    If that one doesn't help, just google it.
    Best of luck.

  • HT201363 i forgot my security questions and i can't find ( send an email to your rescue email address to reset your security questions and answers. ) i might not set up a rescue mail now i can't make any purchases

    i forgot my security questions and i can't find ( send an email to your rescue email address to reset your security questions and answers. ) i might not set up a rescue mail now i can't make any purchases

    You need to contact Apple. Click here, phone them, and ask for the Account Security team.
    (87765)

  • HT1491 I can't remember my security questions.  How can I find the answers in order to purchase my first app?

    I can't remember my security questions.  How can I find the answers in order to purchase my first app?

    Go to: expresslane.apple.com
    Under product categories choose iTunes
    Then iTunes store
    Then account management
    Press continue.
    Now choose iTunes store security and answer the bullet questions and click continue.
    Sign in with your appleid and press continue
    Under contact options fill out the information and advise iTunes that you would like your security/challenge questions reset. Click send.
    iTunes will respond to you within 24 hours by email.

  • Can't find my question history, where can I find it please?

    Can't find my question history, where can I find it please? Has it been moved, I had no trouble finding it recently. I want to check back on one of my questions.thanks for help!

    You may also find these links to your own content useful, the first three will highlight threads with new activity:
    Authored Discussions
    Participated Discussions
    Following Discussions
    Recently Viewed Discussions
    tt2

  • Hi there. A common question but I can not get any of our iphone/touch/pad to be recognised as a device on itunes on a PC with XP. ANy quick solutions?

    Hi there. A common question but I can not get any of our iphone/touch/pad to be recognised as a device on itunes on a PC with XP. ANy quick solutions?

    jrburrows wrote:
    Ok, fair enough.  But since Job's death - Apple's control on leaks has been terrible.  I got the new iPhone, and I like it - but it hasn't made nearly as big as an impression as previous ones.  Because of the vast ammount of leaks.  With the iPad mini leaks, it's 99% sure to come out next week.
    Apple uses many manufacturers and it's massive also websites prefer to report on Apple whether true or false because it brings more hits.
    Amd by "others" I meant other people on iPads - not other devices/manufacturers.  It's possible to do so, I just want to know how.  I honestly don't think we'll ever be in a Post-PC era until all tablets allow us to use USB in the way computers do.
    No, USB is not the future, you missed the memo about cloud and wireless computing?

Maybe you are looking for

  • Home Sharing w/ One Computer & Multiple iTunes Libraries

    I have a Mac Pro that I am using as a iTunes media server for my home entertainment network. This computer has two user accounts. Each user account has it's own iTunes Library. One is for my kid's movies and the other is for my wife and I's movies. I

  • Delivery Copy Control to sto BOM Header

    hi friends we have requirement to stop copying BOM header if there is any component is not copied from sales order to Delivery. we are trying to use the copied routine from existed standine routine FV50B101. please any one can give me the solution in

  • Named Anchors not working in Apple Mail

    Hi... we have an HTML Email Newsletter. About 2 months ago the named anchors (links) from the top to different parts of the email stopped working right. For years, named anchors would simply go to the section of the email that you desired. The locati

  • Fuzzy Logic for string comparison

    Hi All Thanks for taking the time to read the thread. I was wondering if any of you has come accross an algorithim to compare two different strings (or find patterns or degree of similarity) between these strings - Fuzzy type logic The reason I ask i

  • T420 Linux Multiple Monitors

    Running RHEL6.4 T420 4180-F66 I have the Dock series 3. I'm looking to have 2 23" LCD monitors with the laptop screen working at the same time. I can't get it to work i've tried 100 different ways and can't seem to find anything online except for thi