All entries tagged with attachments
|
It came down to the wire but I managed to complete my first xpages project in the week I had allocated myself. The project was to take an application that include the use of the Java view applet and replace it with a more user friendly XPage view control. The complication was not how to display a view on an XPage, that took minutes (yes even for me!!!). The challenge was that when documents were selected in the view I needed to launch the first attachment into a frame to the right of the view.
I am sure someone will correct me, but I could not find any way of forcing an XPage to launch a designated URL into a specific area of the XPage (e.g. a panel). The only command I could find to launch a URL was facesContext.getExternalContext().redirect(url). No matter where I placed this command it seemed to replace the entire contents of the XPage with the URL. If the XPage was inserted inside another Xpage it would replace the outer most Xpage. All other redirects seem to launch Xpages only. I also tried using AJAX to retrieve the URL and then place this inside the innerHTML of the panel via JavaScript, but this also failed when the amount of HTML got large.
My gotcha moment came when I decided to try launching the XPage inside a frameset. The application was originally designed using a frameset and I found I could simply replace the frame that had a form with an embeded Java view applet with a URL that pointed to my XPage (Designer does not yet support XPages as a named element). I had to redesign the view in my Xpage view control so that the linked column was now generated with html that provided the link to the first attachment in each document (column formulae) and hey presto it worked. It vseems that by using framesets you can essentially combine older legacy components with the newer XPage components.
My challenge for another day will be to figure out how to get twoxpage controls to talk to each other across the frames....
|
Ratings
0
|