A very tough question ... can someone answer?

I need to display a portlet (or remote code, I don't care) in a plumtree top nav view. I know how to get the HTML for the portlet and have that display, but it does me no good because the c# codebehind (ASP.NET) never gets processed. All I get is the HTML. This is how I am getting the HTML (code below), but I have to have full functionality of this code, which I'm not getting. Can anybody at Plumtree (or in the user community) assist with this problem?
IPTSession ptSession = (IPTSession) m_asOwner.GetUserSession();IPTState appState = ptSession.GetStates().Get(1);IPTGadget myNavPortlet = (IPTGadget)ptSession.GetGadgets().Open(597,false);object[][] myObject = myNavPortlet.GetHTMLText(appState);string myString = "";for(int i = 0; i<myObject[PT_MARKUP_ARRAY_COLS.PT_MARKUP_ARRAY_COLS_FRAGMENT].Length; i++){ if(myObject[PT_MARKUP_ARRAY_COLS.PT_MARKUP_ARRAY_COLS_FRAGMENT] != null) {  myString += myObject[PT_MARKUP_ARRAY_COLS.PT_MARKUP_ARRAY_COLS_FRAGMENT][i].ToString(); }}mySpan.AddInnerHTMLString(myString);

Jason,
I have written some navigation schemes that place portlet content into a nav area. It isn't a simple task but I will share with you how I have accomplished it.One tricky thing is that using GetGadgets() from the PTSession could negatively affect the performance of your navigation scheme if it is called on every page draw for every user. To work around the performance implications I created two pages in my portlet project. One page has any scripts that are used in the portlet, and another page is the 'dynamic' portlet content that would potentially be different for each user. The 'scripts' file can be shared for all users and in the scripts file there is a transformer tag that represents the URL to the 'dynamic' page. When the navigation scheme is being drawn it uses the included function GetPortletHTML to retrieve the portlet content from PTSession. The HTML returned from this function is cached on the application and shared for all users. When the navigation scheme is output and the page is drawn the On Page Load event triggers a javascript function that grabs the URL for the 'dynamic' page and makes a client side HTTP request for the portlet content./*** Returns a string representing the HTML of a portlet based on the ID being passed in.* * @param asOwner - The activity space currently in use* @param className - the STR_MVC_CLASS_NAME of the view loading the portlet* @param portletID - The ObjectID of the portlet you wish to load* @param useCachedVersion - Whether it should use the version cached on the session or reload the portlet* * @return String - The Portlet HTML*/publicstaticString GetPortletHTML(AActivitySpace asOwner, String className, intportletID, booleanuseCachedVersion) {  // cache the HTML on the session.. you only need to get this once.  ISessionManager settings = asOwner.GetSubSession();  IApplication application = asOwner.GetApplication();  String sReturn = null;  if(useCachedVersion) {    sReturn = (String)settings.GetAttribute("portlet" + portletID);  } if(null!= sReturn) {    returnsReturn;  } else{    Object m_asOwner = null;    HTMLTableCell myCell = newHTMLTableCell();    IPTSession oSession = (IPTSession)asOwner.GetUserSession();    IPTGadget oGadget = (IPTGadget)oSession.GetGadgets().Open(portletID, false);    Object[][] HTMLText = null; finalString STR_PAGE_ID = "PageID"; intnPageID; INavigationModelRO navModel = (INavigationModelRO)asOwner.GetModel("NavigationModel"); try{      nPageID = navModel.GetCurPageID();    } catch(Exception ex){      nPageID = 0;    } ASURL myASURL = newASURL(asOwner); myASURL.SetLinkGetCachedSpace(asOwner); myASURL.SetControl(className); myASURL.AddControlArgument(STR_PAGE_ID, nPageID); String sHostPageURI = myASURL.GetURLAsString() + LinkConstants.AMPERSAND; try {       IPTState m_objAppDataState = AppDataObject.GetAppDataObject(0, nPageID, sHostPageURI, asOwner);         String[] sHeaders = (String[]) asOwner.GetCurrentFormData().GetElement (HttpUtils.HASHTABLE_CONTROL_KEY_HTTP_HEADERS); if((null!= sHeaders) && (sHeaders.length > 0)) {        m_objAppDataState.Add(AppDataObject.PT_HEADERS_KEY, sHeaders[0], 0, true); } HTMLText = (Object[][]) oGadget.GetHTMLText(m_objAppDataState); // invoke the "UI transformer" function -jas GatewayUtils.AddMarkupToElement(asOwner, oSession, HTMLText, myCell, asOwner.GetString(617, "ptmsgs_portalbrowsingmsgs"), asOwner.GetString(618, "ptmsgs_portalbrowsingmsgs"), 0); } catch(Exception e) {      // don't throw an exception.. just return error string.. it timed out. we'll get it next time       return"<p><b>Error displaying portlet</b></p>";    } sReturn = myCell.GetInnerHTML(); settings.SetAttribute("portlet" + portletID, sReturn ); returnsReturn; }} Here is a simple example of a Scripts file from a simple portlet where the portlet ID is 4123, and the dynamic page is "/favorites/favorites.jsp" (relative to the remote server used for this portlet's web service):
scripts.jsp:<% // first construct the URL. // For this sample use hardcoded values for portletID, and linkSummaryPage // this would likely come from a configuration file for the navigation scheme int portletID = 4123; String linkSummaryPage = "/favorites/favorites.jsp";%><pt:gatewayLinkname="portletSummaryURL<%= portletID%>"id="portletSummaryURL<%=portletID%>" xmlns:pt= 'http://www.plumtree.com/xmlschemas/ptui/'pt:objectID='<%= portletID%>'pt:href="<%=linkSummaryPage%>" ></pt:gatewayLink> <!-- Div tag to set the http in that has a response. --><div id="getSummaryResponse<%=portletID%>"></div><script> document.PCC.RegisterForWindowEvent("onload", loadPortlet<%=portletID%>); function loadPortlet<%=portletID%>() {    var pageIDElement = null;    var element = document.getElementById('portletSummaryURL<%=portletID%>');    if (element) {      doGet<%=portletID%>(element.href);    } } // Fires the http get request function doGet<%=portletID%>(sPortletURL) {    var getRequest = new PTHTTPGETRequest(sPortletURL, handleGetResponse<%=portletID%>);    getRequest.invoke();   } // handler receives a PTHTTPResponse object as its single argument function handleGetResponse<%=portletID%>(response) {    var element = document.getElementById('getSummaryResponse<%=portletID%>');    element.innerHTML = response.responseText;   } // Include any other scripts that might be used in favorites.jsp here</script> favorites.jsp:
<% // Here is where you would put code to read the users preferences for favorites // From the EDK%>
Hope this helps,
Mark

Similar Messages

  • Can someone answer these lovely question about the Zen Vision: M plz

    I know we don't know much yet, so from what what we know, can someone answer me?
    Or can a mod?
    . Will it have the same crap firmware in every Zen mp3 player (Sorry to call it that, but it's my personal opinion)? The main reason I changed to an Ipod was the firmware of the Zen Xtra :\. I loved it, loved the sound quality, but then... I have no need for file manipulation on the mp3 player itself, and it presented a problem. All that added crap made you click 6 times just to play one song!
    And then you had to add an album to your playlist to get it to play...
    After awhile, it drove me nuts... I wanted something simple, I just wanted to play my music, not shuffle thru a bunch of crap to get there!, and went for an Ipod.
    I dunno... one of the reasons I'm liking the look of this is that it copies the Ipod firmware. It seems Creative now knows what it's doing... Or does it's Is the copied part only the front, and I would have to click 6 times to play one song? I must know.
    2. Will it have all the extras of an Ipod, games, contacts, calender, notes, etc? FM radio is a plus.
    3. What is the sound quality on this one?
    4. Will this one... have a headphone jack problem while I own it's Don't take this last question seriously... Or do :X

    Newsboys2004 wrote:. Will it have the same crap firmware in every Zen mp3 player (Sorry to call it that, but it's my personal opinion)? The main reason I changed to an Ipod was the firmware of the Zen Xtra :\. I loved it, loved the sound quality, but then... I have no need for file manipulation on the mp3 player itself, and it presented a problem. All that added crap made you click 6 times just to play one song!And then you had to add an album to your playlist to get it to play...After awhile, it drove me nuts... I wanted something simple, I just wanted to play my music, not shuffle thru a bunch of crap to get there!, and went for an Ipod. I dunno... one of the reasons I'm liking the look of this is that it copies the Ipod firmware. It seems Creative now knows what it's doing... Or does it's Is the copied part only the front, and I would have to click 6 times to play one song? I must know.
    Actually seeing as Creative's firmware came first it would seem Apple copied Creative. The iPod firmware and library manipulation is very similar to the Creative players, having played briefly with an iPod.
    Also you talked before about the difficulty with queuing a track, but couldn't describe a better system. Can you explain how the iPod makes it easier? I don't see any way Creative can make it quicker. You need to access the album/artist, then press the play button. Job done.
    2. Will it have all the extras of an Ipod, games, contacts, calender, notes, etc? FM radio is a plus.
    I doubt games and notes, we've never had anything like this to-date.
    A Mod or owner can tell you for sure of course.
    3. What is the sound quality on this one?
    SnR is allegedly 97dB. Of course the subjecti've sound quality is one for the users to debate when there are shipping and several folks here at least have one. I doubt a Mod can tell you anything different.
    4. Will this one... have a headphone jack problem while I own it's Don't take this last question seriously... Or do :X
    If Creative haven't learned their lesson from the Micro and Xtra, well...

  • I was at the apple store in the Walt Whitman Mall, and there is a guy that works there, he is a genius, and his name is Jon. He is very cute! can someone help me find him?

    I was at the apple store in the Walt Whitman Mall, and there is a guy that works there, he is a genius, and his name is Jon. He is very cute! can someone help me find him? I just want to know who he is cause he was very helpful and very cute and I want to thank him

    aschn1 wrote:
    I mean i'd also like to ask him on a date
    Then ask him. You already know where to find him.
    Please note: this advice only applies if you are of legal dating age. And not a crazy stalker.

  • My iphone 4S Black 16 GB with IOS 7.0.4 turns off randomly in low battery less than 15% and also when I am taking pictures from my front camera in low battery of 30%. This is happening very often. Can someone help here with advise?

    My iphone 4S Black 16 GB with IOS 7.0.4 turns off randomly in low battery less than 15% and also when I am taking pictures from my front camera in low battery of 30%. This is happening very often. Can someone help here with advise? The phone is slightly more than 2 years bought from singapore I live in India

    Either your battery is failing or your battery gauge needs to be recalibrated. Start by recalibrating:
    When it shuts off charge for just a minute or two, then restart (hold HOME and SLEEP until an Apple logo appears). Deliberately run the battery down until the phone shuts off at 1%. If it shuts off above 1% repeat the above until you get to 1%. Then charge for 4 hours with the wall charger without using the phone. This process will recalibrate the battery gauge.
    To prevent this from happening again about once a month run the battery all the way down to 1%, then continue until the phone shuts off. Apple recommends this in their battery help article, but they don't say why you should do it. The have some hokum about "keeping the electrons moving." Honestly! The iPad battery tip gives the correct reason.
    If this does not resolve the problem you most likely need a new battery. If you are near an Apple store take the phone in and they can test the battery for you.

  • Hi there!! i am newbie,can someone answer my question about the legal of photoshop CS2,

    i'm already download a photoshop CS 2 from this site https://helpx.adobe.com/creative-suite/kb/cs2-product-downloads.html and i'm alreadey installed it.
    my question it's, is it true the Serial number for photoshop CS2 can use as legal key,when someday an inspection to my office.
    thanks for someone answer my question.

    If you purchased CS2 Yes its a replacement for you old CD.  You just need to read that page to know the answer. If you check the box and downloaded it and installed the product Adobe new activation servers have recorded that you did download and install. in their activation database.
    Read before you download a CS2 product
    Adobe has disabled the activation server for CS2 products, including Acrobat 7, because of a technical issue. These products were released more than seven years ago, do not run on many modern operating systems, and are no longer supported. 
    Adobe strongly advises against running unsupported and outdated software. The serial numbers provided as a part of the download may only be used by customers who legitimately purchased CS2 or Acrobat 7 and need to maintain their current use of these products.
    I Accept
    If you purchased a CS2 product, and you no longer have the installation media, you can download replacement installers from this page.

  • Very fustrating. Can someone please help?

    I am unable to open Itunes or quicktime on my computer. When I click on it the little hour glass shows (Itunes does not show up in the task manager though when I am trying to open the program) and then I get an error message "Itunes has encountered a problem and needs to close. We are sorry for any inconvenience" I have tryed uninstalling and reinstalling several times. Can someone please tell me what I'm doing wrong?

    Okay so I would like to thank all the people who viewed my post but couldn't offer any help. I fixed the problem on my own. For those of you who have the same problem I did. Here is how I did it.
    1) Go into Add/Remove programs and remove the apple programs. There should be two of them. Then remove Bonjour. Then remove quicktime. Then remove Itunes.
    2) Go into Program files and delete the above mentioned files.
    3) Go to the start menu and hit search and search for quicktime and itunes. Delete whatever files come up in the search window.
    4) Download quicktime separately from itunes
    5) Then download itunes.
    And it works now. Or it should. Mine did.

  • Ok can someone answer the myth?

    My ipod nano screen recently cracked i read on the internet not on this site tho that apple is replacing ipod nano screens but my friends are saying they dont and someone told me they do can someone plz tell me if apple is replacing cracked ipod nano screens and plz be sure if ur gonna respond
    thank you

    Hi Brown Sugar,
    Welcome to Apple Discussions
    You might want to look at iPod - Service FAQ. The iPod Service Request Forum say,
    "If your iPod's LCD display is cracked due to accidental damage, do not send your iPod in for service. Coverage for this type of damage is excluded under Apple's Limited Warranty for iPod and AppleCare Protection Plan for iPod, and service is not available under the terms of Apple's Repair Terms and Conditions."
    Your best bet is to bring it to your local Apple Store/Reseller and see what they say. Who knows, your LCD might might be covered.
    Jon

  • Can someone answer a few questions ? I really need help .

    My 30 Gig ipod Video has been working fine and today I pluged in my ipod to upload some more songs and this poped up
    and It deleted everything on my ipod i don't know what this means or why it even poped up . Songs on the iPod"Kevin W Mills's iPod" Cannot be synced because all of the playlists selected for syncing no longer exist.
    and I have another question if I restore my ipod to its factory settings it says it will erase everything does it mean just erase everything on the ipod itself or ipod and the itunes library or just the itunes library ?
    if you someone could help me with this I would greatly appreciate it thanks.
      Windows XP  

    Th eplaylis tyou hae schosen to ut onto the iPod has been deleted.
    Select the iPod in iTunes.
    Click on the Music tab and select a new playlist or change the drop down to sync all.
    Restoring will format (erase) the iPod and reinstall the iPod OS.

  • My whole iPad screen is pink and blue I don't know what happened can someone answer my question and how can I help my iPad from the pink and blue screen

    Thank u very much if you helped me and in the message can u also include how I can fix my ipad thank u very much 

    You may very well have to restore the iPad eventually, but start by rebooting the iPad and see if that helps, before you start doing anything too drastic.
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.

  • HT1476 Can someone answer a battery question for me please?

    will the iPod 4th generation battery work in my iPhone 3GS?

    The batteries in the iPods and iPhones are NOT user serviceable.  We cannot give you support on that here.  You can try looking at a site like ifixit.com.
    Keep in mind that replacing a battery on any iDevice, other than by Apple voids any support on that device forever.  In addition, Apple does not sell parts, and you have no assurance as to the quality of the battery you will be receiving.
    Best,
    GDG

  • 11G upgrade exam - can someone answer this question

    The study guide I have says the answer is "C"... isnt the answer "D". How does this guy get the resolve privilege? confused???
    Evaluate the following block of code:
    BEGIN
    DBMS_NETWORK_ACL_ADMIN.CREATE_ACL (
    acl => 'mycompany-com-permissions.xml',
    principal => 'ACCT_MGR',
    is_grant => TRUE,
    privilege => 'connect');
    DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL (
    acl => 'mycompany-com-permissions.xml',
    host => '*.mycompany.com');
    END;
    What is the outcome of the above code?
    A. It produces an error because a fully qualified host name needs to be specified.
    B. It produces an error because the range of ports associated with the hosts has not been
    specified.
    C. It creates an access control list (ACL) with the user ACCT_MGR who gets the CONNECT and
    RESOLVE privileges.
    D. It creates an access control list (ACL) with the user ACCT_MGR who gets the CONNECT
    privilege but not the RESOLVE privilege.
    Answer: C

    With 11.2 book code fails with:
    SQL> BEGIN
      2  DBMS_NETWORK_ACL_ADMIN.CREATE_ACL (
      3  acl => 'mycompany-com-permissions.xml',
      4  principal => 'ACCT_MGR',
      5  is_grant => TRUE,
      6  privilege => 'connect');
      7  DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL (
      8  acl => 'mycompany-com-permissions.xml',
      9  host => '*.mycompany.com');
    10  END;
    11  /
    DBMS_NETWORK_ACL_ADMIN.CREATE_ACL (
    ERROR at line 2:
    ORA-06550: line 2, column 1:
    PLS-00306: wrong number or types of arguments in call to 'CREATE_ACL'
    ORA-06550: line 2, column 1:
    PL/SQL: Statement ignoredIf you fix the code, you get:
    SQL> drop user acct_mgr;
    User dropped.
    SQL> create user acct_mgr identified by 123;
    User created.
    SQL> BEGIN
      2  DBMS_NETWORK_ACL_ADMIN.CREATE_ACL (
      3  acl => 'mycompany-com-permissions.xml',
      4  description => 'test',
      5  principal => 'ACCT_MGR',
      6  is_grant => TRUE,
      7  privilege => 'connect');
      8  DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL (
      9  acl => 'mycompany-com-permissions.xml',
    10  host => '*.mycompany.com');
    11  END;
    12  /
    PL/SQL procedure successfully completed.
    SQL> show errors
    No errors.
    SQL> SELECT DECODE(
      2    DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(
      3         'mycompany-com-permissions.xml', 'ACCT_MGR', 'resolve'),
      4    1, 'GRANTED', 0, 'DENIED', NULL) PRIVILEGE
      5  FROM DUAL;
    PRIVILE
    DENIEDIf your book is supposed to deal with 11G release 2 I think you can buy another one.

  • HT201303 I need to change my security question because I do not know the answer to the car question can someone help me please.

    the security question about which was your favorite car and least fav I cannot remmeber my answer how do i go about changing this or getting a new set up question ?

    Alternatives for Help Resetting Security Questions and Rescue Mail
         1. Apple ID- All about Apple ID security questions.
         2. Rescue email address and how to reset Apple ID security questions
         3. Apple ID- Contacting Apple for help with Apple ID account security.
         4. Fill out and submit this form. Select the topic, Account Security.
         5.  Call Apple Customer Service: Contacting Apple for support in your
              country and ask to speak to Account Security.
    How to Manage your Apple ID: Manage My Apple ID

  • Very important question need immediate answer please very serious, is there any way possible i can get recent text messages from the last 2 days and print them off after they have been deleted from my phone?

    is there anyway i can retrieve recent text messages from the last 2 days and have them printed off after they have been deleted from my phone?  this is seriously important i need this for an attourney!

    click here:
    Re: Can I request to get the content of old text messages

  • These Reps are CLUELESS, can someone answer my quick question

    UGH these reps are seriously rediculous it isint even a joke. How is it possible that every rep is just {please keep your posts courteous} as the one before it. This one tells me I dont have an annual upgrade WHEN I CLEARLY DO!! Then i ask for the supervisor, I cant get one and some other lady picks up and says the annual upgrade does not make you iphone eligible!!!{word filter avoidance}
    but anyway what i was trying to simple ask them was do they have the $20 annual upgrade fee?

    VZWSWAG wrote:
    UGH these reps are seriously rediculous it isint even a joke. How is it possible that every rep is just {please keep your posts courteous} as the one before it. This one tells me I dont have an annual upgrade WHEN I CLEARLY DO!! Then i ask for the supervisor, I cant get one and some other lady picks up and says the annual upgrade does not make you iphone eligible!!!{word filter avoidance}
    but anyway what i was trying to simple ask them was do they have the $20 annual upgrade fee?
    Dude why are you trying to avoid the world filter? So discourteous. 

  • Can someone answer a password question

    i know my apple id and password, but when i try to load something downloaded from the internet, it shows my actual name and asks for apassword which i dont know

    That's your OSX login password, the password you set up for your user account on that particular MacBook. If you left it blank, just hit ok at the prompt.
    OSX asks for the password everytime it detects an app trying to install itself or make changes to the system. This allows you to distinguish between legitimate apps and trojans sneaking on you.

Maybe you are looking for

  • What exactly are the "Share to YouTube" Settings?

    Hi- I'm just curious as to what the settings are in FCS 3 (or QT X) for Sharing to YouTube. What I mean by this is, what are the equivalent Compressor or QuickTime Export settings that this feature uses? In QT 7, I would normally export as an H.264 w

  • BUG in handling of null-value="exception" with optimistic locking

    When commit failed due to value of a field with null-value="exception" being null JDO_LOCK get incremented and subsequent commits (after supplying valid not null value for the field) will fail with concurrent modification exception. This JDO_LOCK inc

  • VKMI Table - OSS Note 1042857

    I'm looking to talk with someone who is currently using VKMI Table/ SD_VKMLOG_SHOW Report.   This report logs entries that have updated S066(Open Orders) and S067(Open Deliveries)  tables used in Credit Management.   I am interested in system perform

  • Can I use my subscription on a desktop and a laptop?

    I want to know whethyer I can use my subscription on a desktop & a laptop.

  • Clean install Mavericks on new hard drive

    Hello, I have a Early 2009 Mac Pro that is currently running Mavericks (10.9.1). There are currently three hard drives in it: 2-1 TB Hitachi HDE721010SLA330 (1 as Boot drive & 1 as secondary storage, both from factory) 1-3 TB Seagate ST3000DM001-1CH1