• Dynamic Content Control Problems

    By Thomas Adrian 1 decade ago

    Hello, I have two problems with the dýnamic content control in extlib

     

    Problem1. 
    my application sometimes produce an error because I have done something wrong :-)

    If this hapen I use a custom error page for displaying a nice error message to the user.

    the problem is that when an error occur, or if you just change the hash utl to something that do not exist the error page comes up but any actions added to the error page is not working (probably because the dynamic content control generates js errors)

    I will attach an example database as a comment to this post

     

    Problem 2.

    I have several xpages in my application and most of them use the dynamic content control. Sometimes I want the user to be on one xpage and when click on a link redirect them to another xpage.

    So my request here is if it is possible to add which xpage to open in the client and serverside javascript methods

    like 

    d.show("home.xsp","news",{action:'openDocument',documentId:unid})

    or

     

    XSP.showContent("home.xsp","#{id:dynp}","news",{action:'openDocument',documentId:unid})
    
     
    

    I did try to redirect using different methods like

     

    context.redirectToPage("/home.xsp#content=news")  // this one actually appends .xsp to the end so it is useless
    

    facesContext.getExternalContext().redirect("/home.xsp#content=news")  // this one stays on the same page without reload

     

    I hope you understand my questions/problems

    Thomas

     

    • Example database

      By Thomas Adrian 1 decade ago

      Here is the example database for problem 1

    • Thanks for the DB

      By Philippe Riand 1 decade ago

      You first problem happens because when you display an error page, then for the browser, you're still on the same page. To vercome this problem, just have your link being a real link, without a server side action. That works.

      And I don't fully understood #2. Do you have an example?