Get current page title sandbox solution

Hi
What is the best way to get current page title in sandbox visual web part code behind?
I observed SPContext.Current.Item is not defined so I cannot use SPContext.Current.Item["Title"].
I get title and sate creation page...
Thanks

Hi,
I suggest you follow this blog to build a new sandboxed solution for a test to see if it will work in your environment:
http://social.technet.microsoft.com/Forums/en-US/988c573f-1caa-42ea-b55a-740627bc351f/get-current-page-title-sandbox-solution?forum=sharepointdevelopm
Feel free to reply with the test result.
Best regards
Patrick Liang
TechNet Community Support

Similar Messages

  • Get the page title from definition

    Hi, If I have the page definition label, how can I get the page title from jsp page or java class? Thanks

    If the jsp is on a portlet on that page then use
    http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/javadoc/com/bea/netuix/servlets/controls/page/PagePresentationContext.html
    If you want to find out for some other page (i.e. the current page is different from the page you want the title of) then use
    http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/javadoc/com/bea/netuix/servlets/controls/application/DesktopPresentationContext.html
    getPagePresentationContextRecursive...

  • Retrieve current page title?

    Without having to use CFHTTP.Filecontent, is there a way to
    retrieve the current page's title? I'm trying to pass in a
    parameter to a widget that asks for the current page title, but
    haven't seen a way to do it without using CFHTTP to call
    itself...

    Azadi wrote:
    > you could probably use onRequest() method of
    Application.cfc to parse
    > the page content and get the title with some regexp...
    be aware though
    > that just having onRequest() in your Application.cfc may
    break
    > functionality of other parts of your application if you
    are using, for
    > example, flash remoting or remote calls to cfc's...
    >
    > Azadi Saryev
    > Sabai-dee.com
    >
    http://www.sabai-dee.com/
    I'm not sure, but I wonder is something like this could be
    done in the
    onRequestEnd() method as well?

  • Getting a page title from a page label

    I need to get a localized title of a page using a page definition label. The page is not in the current presentation context, but is on a different page and inside a book. I've tried using the recursive calls in the Desktop Backing Context and the Desktop Presentation Context, but since the page is not currently displayed, I can't get the context by using the recursive calls.
    Is there a way to get the page's title without iterating through all of the children on the desktop?

    I have the following code:
    CustomizationContext customizationContext = new CustomizationContext(Locale.ENGLISH);
    InitialContext ic = new InitialContext();
    DesktopDefinitionManagerHome ddHome = (DesktopDefinitionManagerHome)PortableRemoteObject.narrow(ic.lookup("java:comp/env/ejb/DesktopDefinitionManager"),DesktopDefinitionManagerHome.class);
    DesktopDefinitionManager deskMgr = ddHome.create();
    DesktopDefinition[] defns = deskMgr.getDesktopDefinitions(customizationContext,"EnterprisePortalWeb");
    If I use a webapp name that doesn't exist, defns comes back without error but empty. If I use an existing webapp name, I have the following error:
    <May 20, 2008 1:19:01 PM CDT> <Error> <org.apache.beehive.netui.pageflow.PageFlo
    wPageFilter> <BEA-000000> <Exception occurred while handling exception java.rmi.
    RemoteException. The original exception will be thrown. Cause: java.lang.Asser
    tionError: org.apache.beehive.netui.pageflow.scoping.internal.ScopedRequestImpl
    Throwable: java.lang.AssertionError: org.apache.beehive.netui.pageflow.scoping.i
    nternal.ScopedRequestImpl
    Stack Trace:
    java.lang.AssertionError: org.apache.beehive.netui.pageflow.scoping.internal.Sco
    pedRequestImpl
    <May 20, 2008 1:19:01 PM CDT> <Error> <netuix> <BEA-423405> <An exception [EJB E
    xception: ; nested exception is:
            java.lang.NullPointerException] was thrown while rendering the content a
    t [portlets/overviews/accountManagement/AccountManagementController.jsp].
    java.rmi.RemoteException: EJB Exception: ; nested exception is:
    java.lang.NullPointerException
    at weblogic.ejb.container.internal.EJBRuntimeUtils.throwRemoteException(
    EJBRuntimeUtils.java:101)
    Edited by btiminey at 05/20/2008 11:22 AM

  • IS-U print workbench - User exit - to get current page number

    Hi,
    I have a doubt in IS-U print workbench where in I need to get the current page number which is being processed inside the user exit of the application form.
    I have a user exit called Z_EXIT_150 and here I have a subroutine which is inside the LOOP DOC_ITEM …ENDLOOP.
    Inside the subroutine, I need to get the current script page number.
    There is an option of getting the current page as &PAGE& inside the Script but I need to know the page number inside the exit.
    Do you have any idea of getting the current page number?
    Thanks and Regards,
    Sakthi.

    Hi Sakthi,
    I have also had this problem while working in IS-U Print Workbench but was also unable to solve.  I tried looking into the output_text that is called when reaching an object that references SAPSCRIPT-FORMPAGES but I too could not find a way to save PAGE to a variable for later use.
    The only idea I can think of, although I have not tried, would be to place some sort of counter variable in the BUILD_DOCUMENTS and increment the counter each time there is a successful printout of a header logo or some other object that you expect to see printed on each new page - that way maybe you can determine later in the exit processing what page # you are currently in. 
    I hope this has helped some.  I would be really interested to hear if someone else has a solution of how to access items in the SAPSCRIPT structure from outside of the SAPscript code.
    Regards,
    Geoff

  • To get Current Page No. at Report 6i Runtime

    Hi to everybody,
    I wish to know how can i get the current pageno at runtime in report 6i ,
    i want to display data at end page of the report on a condition that it is the last page of the report. i can get the last page but not the current page no at runtime.

    You should probably ask this in the Reports forum at Reports

  • How to get Current Page(region)  Name/ID   in OA 11i

    We need to get the name or id of the current page, and based on the pagename, we retrieve configuration to launch specific web service.
    pageContext.getPageLayoutBean().getPageFunctionName() is no sufficient. Since one page function sometimes contain multiple pages (eg, each individual page maps to one train node, all the train nods maps to one page function).
    are there OA apis that I can use to get the Current Page name in controller?
    I tried pageContext.getParameter("CurrrentPage") , it works great for iExpense application. However, in iRrecuiment, the parameter "CurrentPage" was not set at all.
    Please advise.

    First let me explain what I want to achieve:
    I am writing one region (choice list displays the webservices based on the container region) along with the controller, and that region will be embed inside any OA application pages via OA personalization. On the runtime, I need to detect the current page (container region) name. Then, based on the configuration stored in my table, I need to query out the web services endpoint to call.
    Now let me answer your question:
    For example, OIEMAINPAGE.xml (OIEMainPageContainer) contains OIEReview, OIEDetail, OIEGeneral, etc, each inner region will be rendered as a page when you click the train node or link of other page. (from end user perspective)
    If I call pageContext.getPageLayoutBean().getPageFunctionName() on those inner regions, it will return OIEMAINPAGE, so I can not figure out which region are rendered (displayed) on runtime. (My region are embed inside OIEMAINPAGE pagelayout region )
    If I call pageContext.getParameter("CurrrentPage"), it will return (OIERview, OIEDetail etc), which are exactly what I want.
    However, I have to make sure my code works for other OA application, and I already noticed that some application does not set parameter CurrentPage, instead they may set parameter Page. So, I want to know if there is API provided by OA or fnd team to return current container region (page), very similar to Form Block name.
    In form, One Form function could have multiple Blocks, and they are not displayed at same time.
    In OA, one function could have multiple inner container region, and they are not displayed at same time.
    In form, One Form function could have mutlple Blocks, and they are not displayed at same time.
    In OA, one funciton could have mulple container region, and they are not displayed at same time.

  • Get current page or page of selected item

    Hello,
    I' d like get the current page in Indesign or (if this is not possible) the page of a selected object.
    How could I implement this?
    var page = app.selection[0].page;
    does not work.
    Thanks and kind regards,
    mannyk

    Another way getting that done is based upon what is your current
    selection.
                    var myPg=getPage(app.selection[0]);
                    alert (myPg.name);
    function getPage(theObj)
    if (theObj.constructor.name == "Page") return theObj;
    if (theObj.constructor.name == "Character" || theObj.constructor.name ==
    "Paragraph")
    return getPage(theObj.parentTextFrames[0]);
    if (theObj.constructor.name == "Application")
    // Frame is on an unexpected place...
    alert ("Can't able to find the page");
    exit(0);
    return getPage(theObj.parent);

  • Get current page details from within dynamic page

    Is there any API or any other way of getting the current page id that the dynamic page portlet is being called from?
    Thanks in advance.

    I've tried the following:
    theLink varchar2(1000) := 'http://'||owa_util.get_cgi_env('HTTP_HOST')||owa_util.get_cgi_env('SCRIPT_NAME')||owa_util.get_cgi_env('PATH_INFO')||'?'||OWA_UTIL.GET_CGI_ENV('QUERY_STRING');
    But that gets me the URL of the dynamic page portlet not the page the portlet is on?

  • Open popup window and redirect user to home page in sandboxed solution

    i've created a sandboxed solution visual webpart and it has submit button so when user fills the information in the text boxes availble in webpart and clicks submit button so I want to open popup button containg success message and ok button so when user
    clicks ok button in popup window i want user to be redirected to the home page of the site.
    i tried to open popup and showed success message by below code
     string gotohomepage = "http://sp2013:1111/Pages/home.aspx";
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('Your Record has been submitted successfully,you will be redirected to home Page shortly');location.href =
    '" + gotohomepage + "';", true);
    but it's not opening popup window can anyone help how do i open popup window and redirect user to home page in sandboxed solution

    Page class and script manager are not supported in sandbox solution
    You can create model popup to achieve this
    below are the reference links
    http://blogs.msdn.com/b/chaks/archive/2011/09/14/modal-dialog-box-in-sharepoint-sandbox.aspx
    http://social.msdn.microsoft.com/Forums/en-US/9427db4d-60f2-4b2a-8db6-b50d01ac4f23/how-to-create-modal-popup-using-sandboxed-solution

  • Get current page url

    I need to grab the current page url. What is the pl/sql api to do this?

    You find it in the page_url field of the portlet_runtime record in the wwpro_api_provider package.

  • Get Current page number of PDF file

    Hi,,
    I am using acrobat plugin(SDK) in VB.Net while am nevigating in the
    PDF file i want get the current viewing page number of that
    PDF file and Display in Lable/Text....
    In abouve screenshot am marked the SDK display page number that i want read by VB.NET and display in my application..

    ..... perhabs in connection with this;
    http://forums.adobe.com/message/4587057#4587057
    However, full Adobe Acrobat is needed for both (not Reader only).
    HTH, Reinhard

  • Get current page of crossReferences in index

    How to get the cu
    rrent page or insertionPoint of crossReferences in index

    In case of
    pageReferences there is property called 'sourceText' to get the insertionPoint but in case of crossReferences there is no such property. Is there any other way to get insertionPoints for crossReferences?

  • Get current page address and query string into Flex

    Hello!
    How can I get the current address in the address bar into
    Flex please? (As $_SERVER would in PHP for example)
    Thank you!

    "M*A*S*H 4077" <[email protected]> wrote in
    message
    news:gob8lp$ke1$[email protected]..
    > Aha, so there is no predefined Class in Flex for this?
    >
    > Thank you, Amy!
    That is the class. You might want to look at FABridge,
    though, because I
    think it is designed to help ease these things.

  • Getting current page/community

    Hi all,
    is there a way to query for the current community page the user is in, using Plumtree core APIs?
    thank a lot
    Mauro

    Hi Randy,
    I can explain that. The actual page ID is -239, but creating the navigation links would be less performant if we queried for the community home page id. Instead of doing that we just use pageid=0, the server knows to always return the home page of the community when pageid = 0.

Maybe you are looking for

  • How to  create i view  in visual composer give details screenshots

    how to  create i view  in visual composer give details screenshots

  • Two If statments

    Hi Gurus, Please check below conditon here two if statements are there if a>b then Result = c - d if c<=d then Result = 0 How to write if statement in Query designer Regards, Ram

  • Ipod (3rd gen.) does not mount to iTunes

    My ipod (3rd gen.) does not mount on iTunes (using a Mac).  When plugged in, it appears on my desktop as if it were a jump drive. I was planning on re-formatting it with Disk Utility but I'm not sure if this is a good idea.  I also realised that the

  • 2007 Mac Pro will not boot, even in safe mode

    Hello, I have a Mac Pro purchased in 2007 that had been working well up until a few months ago.  I had trouble with Microsoft Word 2008 repeatedly crashing; I repaired the hard disk and moved up to Word 2011, and the problem seemed to resolve.  Yeste

  • Segment field IDOC_INPUT_DELVRY

    what is the segment update the picking quantity and PGI in Inbound function module IDOC_INPUT_DELVRY. I'm using message type SHPCON and Basic Type DELVRY03. Thanks