Tabbed Panel using UpdateContent doesn't properly display spry .html page

Quick question. I have a tabbed panel widget with 12 tabs.
I'm using the UpdateContent snippet to pull in .html pages per tab.
when I have straight .html on the pages the content displays
without a problem.
What I need is for each tab to pull in an .html page that
contains a spry table that has an XML data set (think product page
with "next" and "prev" buttons to cycle through the content).
The .html page with the spry table works like a charm...on
it's own. however when I use it in conjunction with the tabbed
panel all I see is the bracketed code (i.e. {imgURL} {productName}
{SKU}) rather than [photo] large T-shirt SKU:1111.
A while ago I did an accordion that had dynamic content per
generated panel -- this utilized the Spry.Data.NestedXMLDataSet
function. A bit of a similar idea although I'm not sure if this
would also work with the tabbed panel.
Any suggestions would be helpful and I can drop the code if
that would also help. Thanks!

well, what I have is:
index page with tabbed panel
|
V
click tab
|
V
content from first option .html page loads. this content has
a dataset repeating table.
The main page already had the SpryData.js and also
UpdateContent, as follows:
<div id="TabbedPanels1" class="VTabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('one','siracusa.html');">Siracusa
Micro Crepe</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('two','peony_georgette.html');">Peony
Printed Silk Georgette</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('three','wool_pucker.html');">Wool
Pucker</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('four','textured_dot.html');">Textured
Dot</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('five','textured_cotton.html');">Textured
Cotton</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('six','crane.html');">Crane
Printed Four Ply Silk</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('seven','tencel_jersey.html');">Tencel
Jersey</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('eight','circular_wool.html');">Circular
Stitch Wool</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('nine','silk_burnout.html');">Silk
Burnout</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('ten','organza.html');">Floral
Silk Organza</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('eleven','micro_crepe.html');">Micro
Crepe</li>
</ul>
<div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent"
id="one">Siracusa</div>
<div class="TabbedPanelsContent" id="two">Peony
Printed</div>
<div class="TabbedPanelsContent" id="three">Wool
Pucker</div>
<div class="TabbedPanelsContent" id="four">Textured
Dot</div>
<div class="TabbedPanelsContent" id="five">Textured
Cotton</div>
<div class="TabbedPanelsContent" id="six">Crane
Printed Four Ply Silk</div>
<div class="TabbedPanelsContent" id="seven">Tencel
Jersey</div>
<div class="TabbedPanelsContent" id="eight">Circular
Stitch Wool</div>
<div class="TabbedPanelsContent" id="nine">Silk
Burnout</div>
<div class="TabbedPanelsContent" id="ten">Floral Silk
Organza</div>
<div class="TabbedPanelsContent" id="eleven">Micro
Crepe</div>
</div>
</div>
<script type="text/javascript">
<!--
var TabbedPanels1 = new
Spry.Widget.TabbedPanels("TabbedPanels1");
//-->
</script>
Let's say you clicked on the Siracusa tab. This would call up
siracusa.html, which has
<script src="SpryAssets/xpath.js"
type="text/javascript"></script>
<script src="SpryAssets/SpryData.js"
type="text/javascript"></script>
<link href="../../ed_style.css" rel="stylesheet"
type="text/css" />
<script type="text/javascript">
<!--
var fall08 = new Spry.Data.XMLDataSet("fall_collection.xml",
"collection/outfits", { filterFunc: MyPagingFunc });
fall08.setColumnType("photoURL", "image");
fall08.setColumnType("lrgphoto", "image");
var pageOffset = 0;
var pageSize = 1;
var pageStop = pageOffset + pageSize;
//var dsfall08 = new
Spry.Data.XMLDataSet("fall_collection.xml", "collection/outfits", {
filterFunc: MyPagingFunc });
function MyPagingFunc(ds, row, rowNumber)
if (rowNumber < pageOffset || rowNumber >= pageStop)
return null;
return row;
function UpdatePage(offset)
var numRows = fall08.getUnfilteredData().length;
if (offset > (numRows - pageSize))
offset = numRows - pageSize;
if (offset < 0)
offset = 0;
pageOffset = offset;
pageStop = offset + pageSize;
// Re-apply our non-destructive filter on dsStates1:
fall08.filter(MyPagingFunc);
-->
</script>
Sircusa Micro Crepe
<div spry:region="fall08">
<table>
<tr spry:repeatchildren="fall08">
<td colspan="5 "><img
src="imx/{photoURL}"/></td>
</tr>
<tr spry:repeatchildren="fall08">
<td><a href="imx/{lrgphoto}"
target="_blank">enlarge</a></td>
<td>{SKU1}</td>
<td>{SKU2}</td>
<td>{SKU3}</td>
<td>{name}</td>
<td>{desc}</td>
</tr>
</table>
<input type="button" value="Prev"
onclick="UpdatePage(pageOffset - pageSize);" />
<input type="button" value="Next"
onclick="UpdatePage(pageOffset + pageSize);" />
</div>
siracusa.html works more than fine. pulls in the photo, link,
SKU and info without any problem.
When you're on the base page with the tabbed panel the only
thing that comes up are the bracketed info, i.e. {SKU} {SKU1}
{SKU2}.
What I need help with is actually having the pulled in data
table (in the various tabbed panel content areas) actually then
populate the repeat regions rather than just showing the
code...

Similar Messages

  • Open Specific Tabbed Panel using Querystring

    I am using the Tabbed Panel on my About page. I have created
    3 tabs within the Spry Tabbed Panel: company, history,
    testimonials. Each displays its respective content.
    On the main menu of my page I have 6 buttons. 3 of them
    (company, history and testimonials) link to this about page, but
    regardless of the menu item selected - only the first tab is
    displayed.
    I would like to use a querystring to pass a variable for the
    respective panel. Example: Company link = about.shtml?tab=0,
    Testimonials = about.shtml?tab=2
    I found this code, but am too much of a javascript newbie to
    know how to use it with a querystring:
    <script>
    var tp1 = new Spry.Widget.TabbedPanels("tp1", { defaultTab:
    2 });
    </script>
    Any help is greatly appreciated. Thank you ;-)
    -Scott

    Hi Scott,
    We just made a utility to make this easy for you:
    http://labs.adobe.com/technologies/spry/preview/samples/utils/URLUtilsSample.html
    The file is:
    http://labs.adobe.com/technologies/spry/includes/SpryURLUtils.js
    I made a working sample here:
    http://dbooth.net/spry/tp.htm
    You can see the code in the constructor:
    (params.panel ? params.panel : 0)
    That just says: if there is a querystring value, use that,
    otherwise, set the first panel as open.
    Note that Spry uses a zero based counting system, so the
    first Tab is '0', the second is '1'.
    Hope this helps,
    Don

  • How can I create tabbed panels using Dreamwaever CC, similar to Spry version available in CS6?

    I used Spry tabbed panels in a site. Need to recreate that page on another site using Dreamweaver CC. CC has no Spry components anymore. Can anyone suggest a 3rd party product or alternative method to make similar panels in a page without having to hand code html-css-java?

    Haven’t begun to try it yet. Looking at some tutorials.
    But I appreciate the heads up.
    Bill Liedlich
    TerraGroup Corporation
    Tactical Water Purification Systems
    Po Box 8839
    Allentown, PA 18105 USA
    p  610-821-7003
    f   610-821-7025
    [email protected]
    [email protected]<mailto:[email protected]>
    www.tacticalwater.com<http://www.tacticalwater.com/>
    CONFIDENTIALITY NOTICE: This electronic mail transmission, its contents and any attachments to it, are privileged and confidential, and/or may contain legally privileged and confidential information and is intended only for the review of the party or parties to whom it is addressed.  Any dissemination, distribution, copying or forwarding of this message, its contents or attachments to other than the intended recipient(s) is strictly prohibited.  If you are not one of the intended recipients, or have received this transmission and its contents in error, please immediately return it to the sender.  Unintended transmission shall not constitute a waiver of any "Confidentiality Notice" privilege.

  • To display an html page that contains frames, using servelt

    Hi all
    i am using a servlet which has to display a html page that contains frames.
    I would like to know whether it is possible to display a frame using servlets.
    If yes please tell me the how to do it?
    Thanks,
    Sudheer.

    Thanks Seth.
    I just tried that, but when I run it in preview mode (by simply hitting F12), it gives me an error because it can't  find the file in the temporary preview folder it creates (ie:
    C:\Users\Tom\AppData\Local\Temp\CP2840464090993Session\CPTrustFolder2840464091009\Captivat ePreviewLoader\
    I'm hoping to find a place to put it so that it works when running F12 and when running in regular 'published' mode
    I was thinking I could put it in the 'C:\Program Files\Adobe\Adobe Captivate 6 (32 Bit)\Templates\Publish' folder, but when I do that, it doesn't seem to gete copied to the .\CaptivatePreviewLoader folder when running F12

  • How to display the HTML pages in RRC/RQM dashboard using OpenSocial gadget

    Hi,
    I have a requirement as below:
    1. I have couple of HTML pages which are hosted in the sharepoint site and I would like to display the HTML pages
    2. I would like to have an OpenSocial gadget in the RRC/RQM dashboard that will display the HTML pages  which are hosted in my sharepoint site.
    Could you please suggest the best approach to create an OpenSocial gadget in the IBM's RRC/RQM dashboard whcih will display html contents of another URL ?
    Thanks.
    Knowledge is power.

    Hi Manoj,
    As I understand, you would like to display SharePoint page in another platform.
    Since the you are involving third party platform, you might still need to contact their support engineer about how to render other pages.
    From SharePoint side, by default, SharePoint won't let end user to display site page to other platform, you could add "<WebPartPages:AllowFraming runat="server"/>" in master page or single page layout. So that SharePoint ASP.Net
    page could be displayed on other platform.
    Here I'm talking about ASP.Net page, since HTML page in SharePoint cannot be displayed in browser as I tested, it will be downloaded directly. So I'd suggest you use ASP.Net page as workaround.
    https://social.msdn.microsoft.com/Forums/office/en-US/c8755a6b-f33a-43ed-97d9-8f03c336aa1d/how-to-display-sharepoint-url-in-iframe-in-aspnet-page?forum=sharepointdevelopment
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • Display external html page in (Collapsible Panel widget)

    i everybody
    is there a way to display external html page in (Collapsible Panel widget)
    All the example a seen is with raw text in it
    is the panel can display different object instead of simple text
    At least a internal designed html page
    Thanks

    Thanks... surely a easy one for you
    But its a great tool and its exatly what i want
    even my js button works trough it
    Thanks again

  • How can I display the HTML page from servlet which is called by an applet

    How can I display the HTML page from servlet which is called by an
    applet using the doPost method. If I print the response i can able to see the html document. How I can display it in the browser.
    I am calling my struts action class from the applet. I want to show the response in the same browser.
    Code samples will be appreciated.

    hi
    I got one way for this .
    call a javascript in showDocument() to submit the form

  • Displaying an html page from a byte array

    I'm trying to display an html page that i receive from a byte[ ] but the navigator asks me to download it instead of displaying it.

    exactly a better option here would be display that HTML content using a dedicated servlet/jsp.
    checkout below example code snippet hope that might help
    public void doPost(request,response)throws ServletException,IOException{
      //fetch HTML bytes.
      Byte buffer[] = Delegate.getBufferData(); 
      ByteArrayInputStream in = new ByteArrayInputStream(buffer);
      int contentSize = in.available();
      response.setContentType("text/html");
      response.setContentLength(contentSize);
      BufferedOutputStream out = null;
       try{
            out = new BufferedOutputStream(response.getOutputStream());
            while( contentSize-- >  0 )
                out.write(in.read());
             out.flush();
       }catch(Exception exp){
             exp.printStackTrace();
              throw new Exception(exp.getMessage());
       }finally{
              try{
                    if(out != null)
                       out.close();
                    if(in != null)
                        in.close();
              }catch(Exception ep){
                              ep.printStackTrace();
                              throw new Exception(ep.getMessage());
              }finally{
                    out = null;
                    in = null;
    }and respectively call the servlet.
    Hope this might help :)
    REGARDS,
    RaHuL

  • Display external html page in a view

    Hi,
    following Problem,
    I have a Viewcontainer with 2 columns ans one row. In the left cell I display a tree. OnSelect Event I'd like to display a html page in the right cell.
    Example:
    Searchengine
      -> Google
      -> Yahoo
      -> ...
    On Klick at google in the treeview I'd like to show http://www.google.de in tghe right cell - this means the tree should still display.
    Is this possible - and has anyone an idea to do this?
    thanks in advance
    Gregor

    Hi
    We strongly donot recommend usage of Iframe, because its support is depcrecated and will not be available for future versions.
    For a short duration or for current version, use can Iframe only for static html links. Try using link to URl and display the htmls in external windows.
    Check out this link
    http://help.sap.com/saphelp_erp2005/helpdata/en/e9/7652a84fada444bd11ca73670ce7dc/frameset.htm
    My advice is to change your functionality accordingly
    If you have any specific requirements do let us know
    Thanks
    sathyanarayanan

  • How to display static HTML pages in Oracle Forms 6i

    I want to display static HTML page in oracle Forms ? Can any body help please ? Its very urgent. Many thanks in advance.

    Suresh,
    there exist a Java Bean in teh Forms 6i demos that shows a static HTMl example. Note that the HTML that could be shown is somewhat basic, but it will give you an impression how it can work. The demos are at otn.oracle.com/products/forms --> samples --> 6i demos
    Frank

  • How to extract image from oracle database and display at html page

    Could you help me how to make the image to display. i manage to extract the data but the data is in Blob so i need to convert it so make it display at html page.

    Thanks for ur reply Mr.Rajasekhar
    I tried as u said,
    i tried without converting to sql date ,but still i din't get any results
    java.text.SimpleDateFormat dateFormat=new java.text.SimpleDateFormat("dd/MM/yyyy");
             java.util.Date fromDate=dateFormat.parse(startDate);
            java.util.Date tillDate=dateFormat.parse(endDate);          
              String query1="select MTName,Date,MTLineCount from linecountdetails where mtname='"+MTName+"'  and Date >='"+fromDate+"' and Date <='"+tillDate+"' " ;
            System.out.println(query1);
    //From main method
    databaseConnection("prasu","1/12/2005","31/12/2005");I got the output as
    ---------- java ----------
    select MTName,Date,MTLineCount from linecountdetails where mtname='prasu'  and Date >='Thu Dec 01 00:00:00 GMT+05:30 2005' and Date <='Sat Dec 31 00:00:00 GMT+05:30 2005'
    java.lang.NullPointerException
    null
    null
    java.lang.NullPointerException
    Output completed (4 sec consumed) - Normal TerminationThanks
    Prasanna.B

  • How to use getContent() method in custom JSP Provider to display a HTML Pag

    Hi,
    If anybody knows how to use getContent() method to use in custom jsp providers (developed by ourselves) so that it can be used to retrieve a jsp page (a simple html page) ..
    I want the code in the provider java file to for the getContent method...
    Pls. get back to me asap....if any body has implemented a custom jsp provider...as it's urgent...
    I have alreday placed the JSP file in the directory structure /etc/opt/SUNWps/desktop/default/channel_dir..But still the jsp is not being displayed..
    Pls get me the getContent() method code to retrive the JSP file..
    satyabrata

    Hi,
    You don't have to do anything in the custom JSPProvider's getContent method except the call {  return super.getContent(request,response); } . If all you want is just to show your jsp, then create a channel from the default JSPProvider, and edit the property contentPage of that channel from samplecontent.jsp to your jsp name, save the changes and login again. You should see your JSP.
    Sanjeev.

  • Display an HTML page within a a panel

    I want to create an applet with multiple panels, and have the ability to display HTML pages within these panels. These will be HTML pages with formatting complex enough that the JEditor display won't be able to handle them. I experimented with showDocument() but that seems to only work in the main applet frame, and attempts to put a frame inside a panel did not work. I came across some postings that talked about JSObject, but got the impression that does not always work and is very browser dependant.
    Any suggestions?

    Yes JLabel supports HTML, e.g.
    public static void showHelp()
       JFrame frame = new JFrame();
       JLabel helpLabel = new JLabel();
       JLabel.setText("<HTML>This is a <b>help</b> file.</HTML>");
       frame.getContentPane().add(helpLabel);
       frame.setBounds(0,0,200,200);
       frame.setVisible(true);
    }

  • How to display a HTML page using ABAP program.

    Hi all,
    I know that this is easy and possible too but I haven't worked on this kind yet. I need to display a screen/ABAP program like TCODE PPMDT, where an HTML page is to be displayed and on the click of the HTML links provided, I need to navigate to someother transaction codes.
    Cheers,
    Sam

    Hi,
    See this sample code
    REPORT ZTESTHTML .
    DATA: ok_code LIKE sy-ucomm,
          myurl(132).
    data: custom_container type ref to cl_gui_custom_container,
          myhtml type ref to CL_GUI_HTML_VIEWER,
          repid like sy-repid.
    DATA events TYPE cntl_simple_events.
    DATA wa_events TYPE  cntl_simple_event.
          CLASS lcl_event_receiver DEFINITION
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS NC_Handler
                FOR EVENT NAVIGATE_COMPLETE OF CL_GUI_HTML_VIEWER
                IMPORTING URL.
    ENDCLASS.
          CLASS lcl_event_receiver IMPLEMENTATION
    CLASS lcl_event_receiver IMPLEMENTATION.
      METHOD NC_Handler.
        myurl = URL.
      ENDMETHOD.
    ENDCLASS.
    start-of-selection.
      set screen 100.
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
      CASE OK_CODE.
        WHEN 'BACK'.
          CALL METHOD myhtml->go_back
               EXCEPTIONS cntl_error = 1.
          if sy-subrc ne 0.
          endif.
        WHEN 'FORW'.
          CALL METHOD myhtml->go_forward
               EXCEPTIONS cntl_error = 1.
          if sy-subrc ne 0.
          endif.
        WHEN 'STOP'.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'REFR'.
          CALL METHOD myhtml->SHOW_URL
               EXPORTING
                  URL = myurl
                  IN_PLACE = 'X'
                  FRAME = ''
               EXCEPTIONS
                  CNTL_ERROR = 1
                  CNHT_ERROR_NOT_ALLOWED = 2
                  CNHT_ERROR_PARAMETER = 3
                  DP_ERROR_GENERAL = 4.
        WHEN 'OTHERS'.
          CALL METHOD CL_GUI_CFW=>DISPATCH.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'MENU'.
      if myhtml is initial.
        CREATE OBJECT custom_container
           EXPORTING
              CONTAINER_NAME = 'CONTAINER1'
           EXCEPTIONS
              CNTL_ERROR = 1
              CNTL_SYSTEM_ERROR = 2
              CREATE_ERROR = 3
              LIFETIME_ERROR = 4
              LIFETIME_DYNPRO_DYNPRO_LINK = 5.
        CREATE OBJECT myhtml
           EXPORTING
              PARENT = custom_container
           EXCEPTIONS
              CNTL_ERROR = 1
              CNTL_INSTALL_ERROR = 2
              DP_INSTALL_ERROR = 3
              DP_ERROR = 4.
        wa_events-eventid = CL_GUI_HTML_VIEWER=>M_ID_NAVIGATE_COMPLETE .
        wa_events-appl_event = 'X'.
        APPEND wa_events TO events.
        CALL METHOD myhtml->set_registered_events( events = events ).
        SET HANDLER lcl_event_receiver=>NC_Handler FOR myhtml.
        CALL METHOD cl_gui_cfw=>flush
             EXCEPTIONS cntl_system_error = 1
                        cntl_error        = 2.
      endif.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    Svetlin

  • Displaying clickable html page in a JFrame

    Hello again programmers,
    i'm wondering how can i display a clickable html page in a JFrame using any Panel (JEditorPane,.....) can you show me the way plz?
    Bernard

    Makes a pretty crappy browser, but its OK for help-type functions.
    HtmlViewFrame.java
    import java.net.URL;
    import java.io.File;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    *Primitive HTML browser window based on a HtmlViewPane.
    public class HtmlViewFrame extends JFrame
    private HtmlViewPane pane;
    private JFrame frame;
    *Creates a frame based on a file.
    public HtmlViewFrame(File file) throws Exception
         this(file.toURL());
    *Creates a frame based on a URL.
    public HtmlViewFrame(URL url) throws Exception
         frame = this;
         getContentPane().setLayout(new BorderLayout());
         JPanel but_panel = new JPanel();
         but_panel.setLayout(new FlowLayout(FlowLayout.LEFT));
         JButton but_home = new JButton("home");
         but_home.addActionListener(new ActionListener()
                    public void actionPerformed(ActionEvent ae)
                   try
                        pane.home();
                   catch(Exception e)
                        JOptionPane.showMessageDialog(frame, "Error: " + e);
         but_panel.add(but_home);
         JButton but_back = new JButton("back");
         but_back.addActionListener(new ActionListener()
                    public void actionPerformed(ActionEvent ae)
                   try
                        pane.back();
                   catch(Exception e)
                        JOptionPane.showMessageDialog(frame, "Error: " + e);
         but_panel.add(but_back);
         getContentPane().add(but_panel, BorderLayout.NORTH);
         pane = new HtmlViewPane(url);
         JScrollPane jsp = new JScrollPane(pane);
         getContentPane().add(jsp, BorderLayout.CENTER);
         getContentPane().add(pane.getActionField(), BorderLayout.SOUTH);
    *HTML viewer application.
    *Uses java.lang.System.exit(int), so method should not be called from within a Java application.
    *@param     args     String array; provide a URL or file path as args[0]
    public static void main(String[] args)
         if(args.length==0)
              System.out.println("must provide File path or URL as argument");
              System.exit(1);
         Exception err = null;
         try
              File file = null;
              try
                   file = new File(args[0]);
                   if(!file.exists()) file = null;
              catch(Exception ex)
                   file = null;
                   err = ex;
              URL url = null;
              try
                   url = new URL(args[0]);
              catch(Exception ex)
                   url = null;
                   err = ex;
              HtmlViewFrame frame = null;
              if(file!=null) frame = new HtmlViewFrame(file);
              else if(url!=null) frame = new HtmlViewFrame(url);
              else throw err;
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setSize(600,400);
              frame.show();
         catch(Exception e)
              err = e;
         if(err!=null) System.out.println("ERROR: " + err);
    HtmlViewPane.java
    import java.net.*;
    import java.io.*;
    import java.util.Vector;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.text.html.*;
    *A HTML panel based on JEditorPane.
    *Suitable for rendering primitive HTML files such as help documentation.
    public class HtmlViewPane extends JEditorPane
    /**The maximum number of elements the object can hold in its history.*/
    public static int MAX_HISTORY_SIZE = 100;
    private Vector history = new Vector();
    private URL home;
    private JTextField lab_lastact = new JTextField("loaded document");
    *Creates a panel based on a file.
    public HtmlViewPane(File file) throws Exception
         this(file.toURL());
    *Creates a panel based on a URL.
    public HtmlViewPane(URL url) throws Exception
         home = url;
         setEditable(false);
         addHyperlinkListener(new HtmlViewPaneListener(this));
         setPage(url);
         lab_lastact.setEditable(false);
    void addToHistory(HyperlinkEvent e)
         lab_lastact.setText("ACTION: go here: " + e.getURL().toExternalForm());
         if(history.size()>=MAX_HISTORY_SIZE) history.removeElementAt(0);
         history.add(e);
    *Causes the pane to move back to the last item in the history.
    public void back() throws Exception
         if(history.size()==0)
              lab_lastact.setText("ACTION: exhausted history list (max size=" + MAX_HISTORY_SIZE + ")");
              return;
         HyperlinkEvent e = (HyperlinkEvent) history.lastElement();
         history.removeElement(e);
         processEvent(e, false);
         lab_lastact.setText("ACTION: back to here: " + e.getURL().toExternalForm());
    *Returns a JTextField that reports hyperlink, back and home actions to the user.
    public JTextField getActionField()
         return      lab_lastact;
    *Causes the browser pane to return to the initial page.
    public void home() throws Exception
         setPage(home);
         lab_lastact.setText("ACTION: home to here: " + home.toExternalForm());
    void processEvent(HyperlinkEvent e, boolean addtohistory)
         if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
              if (e instanceof HTMLFrameHyperlinkEvent)
                   HTMLFrameHyperlinkEvent  evt = (HTMLFrameHyperlinkEvent) e;
                   HTMLDocument doc = (HTMLDocument) getDocument();
                   doc.processHTMLFrameHyperlinkEvent(evt);
              else
                   try
                        setPage(e.getURL());
                        if(addtohistory) addToHistory(e);
                   catch (Throwable t)
                        t.printStackTrace();
    class HtmlViewPaneListener implements HyperlinkListener
    private HtmlViewPane pane;
    HtmlViewPaneListener(HtmlViewPane pane)
         this.pane = pane;
    public void hyperlinkUpdate(HyperlinkEvent e)
         pane.processEvent(e, true);
    }

Maybe you are looking for

  • Another 5th Generation Ipod not charging/sync problem.

    I have two 5th generation (aka video) iPods. One works fine but the other does not charge either by using a mains charger or through USB through the PC.. Also it is not being seen by the iTunes or Windows Explorer. The fact that one iPod is ok should

  • Createing flat file in cold fusion.

    i got a wddx packet and i have to create a flat file out of that. i can deserialize and write into a file but how can i make it fixed length even though the length of the contents varies in the wddx packet

  • Wrongly posted to asset instead of GL

    Hi All I have a asset which was wrongly  posted as an asset in the last year and now users want to transfer that to a Balance sheet GL account .Depreciation has been run on the same for the last year and the current year  .Any ideas? Can I scrap the

  • Unexpected socket read timeout

    Hi everybody. I am having problems with socket communication. I have a client application which connects to a server, sends a request over a socket and waits for a response. This procedure actually works unless the server doesn?t reply fast enough. I

  • I am unable to import a SWF file in Premiere Pro

    Please indicate how to import an SWF file into Premiere Pro. I tried to import as an movie, but it would not work.