Dynamic page based on directory content/structure

I'm trying to build a web page based the content of a directory. I'm going to try and explain this as briefly as possible, yet still make sense.
There are many more file than this, but an example of the directory of the index.html's looks like this:
e:\Inetpub\wwwroot\Courses\Dev\Environmental Management Systems\Content\Install\Templates\en\index.html
e:\Inetpub\wwwroot\Courses\Dev\Environmental Management Systems\Content\player\index.html
e:\Inetpub\wwwroot\Courses\Dev\Environmental Management Systems\Content\scp\index.html
e:\Inetpub\wwwroot\Courses\Dev\Environmental Management Systems\index.html
With this structure, the root path is: e:\Inetpub\wwwroot\Courses.
Dev would become a main section.
Environmental Management Systems would become a Course title, because it has an index.html.
I want to ignore the rest of the index.html's underneath.
A caveat to this, is I need it to possibly go one level deeper.
e:\Inetpub\wwwroot\Courses\Dev2\Manufacturing\Environmental Management Systems\Content\Install\Templates\en\index.html
e:\Inetpub\wwwroot\Courses\Dev2\Manufacturing\Environmental Management Systems\Content\player\index.html
e:\Inetpub\wwwroot\Courses\Dev2\Manufacturing\Environmental Management Systems\Content\scp\index.html
e:\Inetpub\wwwroot\Courses\Dev2\Manufacturing\Environmental Management Systems\index.html
Here, Dev2 becomes main section
Manufacturing becomes sub section
Environmental Management Systems would become a Course title, because it has an index.html.
Of course there are a lot more files, which is part of the problem I'm having. Right now it takes about 8 seconds to read all the files, which is too long for building a page. Once I get all the main, subs, and Courses determined, I would then build the page, using some kind of menu.
Below is the code I have that searches all files under a parent folder, I'm just not sure how to make it stop once it finds the correct index.html. I started to put in a recursive stop, but haven't quite figured out how to implement that either.
Any help is greatly appreciated. I'm open to any and all suggestions. Btw, the intention here, is that the person that manages these courses can just ftp a new course directory to the server, and it's then available.
Thanks,
James
<%@ page import="java.util.*,java.io.*,java.text.*,java.io.File,java.net.*" %>
<HTML>
<HEAD><TITLE>Skillsoft Courses</TITLE></HEAD>
<BODY BGCOLOR="white">
<H1><B><img src="logo.gif" width="120" height="49"><FONT COLOR=#004685>Courses</FONT></B></H1>
<HR>
<BR>
<%!
     public ArrayList listFiles(ArrayList files, String currentFile, int recurse)
               File fd = new File(currentFile);
               if ( fd.exists() && fd.isFile())
                    //grab filename - not quite working right as it still prints out the ones that should be excluded
                    if ((currentFile.endsWith("index.html")) && (!(currentFile.endsWith("Content\\scp\\index.html")) || !(currentFile.endsWith("Content\\player\\index.html"))))
                         files.add(currentFile);
               else if ( fd.exists() && fd.isDirectory())
                    File [] fileList = fd.listFiles();
                    // Loop through File array and display.
                    for (int i = 0; i < fileList.length; i++)
                         listFiles(files, fileList.getPath(), recurse);
                    } // for loop
          return files;
%>
<%
     ArrayList files = new ArrayList();
     String rootPath = "e:\\Inetpub\\wwwroot\\Courses\\";           
     //get file list of root path
     File dir = new File(rootPath);
     File[] children = dir.listFiles();
     //stick into array
     for (int i = 0; i < children.length; i++)
          int recurse = 0;
          String tmp = children[i].getPath();
          listFiles(files, tmp, recurse);
     for (int j = 0; j < files.size(); j++)
%>
          <%=(String)files.get(j)%><BR>
          <%;
%>
</BODY>
</HTML>

Architecturally, I would not put this code in a JSP, put it in a Plain Old Java Object that gets called by a Servlet, builds the tree, then passes the tree to the JSP for display. It will make things easier in the long run.
I would also look into caching the results. When you traverse the directory structure, hold the results in memory. Use a timestamp that records the last time the \Courses\ directory was traversed, and compare it to the \Courses\ last modified time. If \Courses\ was modified after the timestanp then re-load the content. This would reduce that 8 second load time to only occur when changes were made.
Similarly, you could further reduce loading time by
1) Compare a section with those sections already loaded. If it doesn't exist, then traverse it and add the directory structure
2) If the section does exist, use a timestamp and modified time to see if it the section has changed. If it has changed, traverse it and update the directory structure
3) If the section does exist and hasn't been modified, leave it alone.
You would then want to make classes to represent the entire tree of files - which would contain a timestamp and a list of sections (main sections). Each section would have a timestamp, a list of sub-sections, and a list of courses. A course would have a timestamp and a list of files for the course. And as was mentioned this tree structure would be held in memory and returned as needed.
For viewing files that are too deep in the structure, that will take more looking into than I have time for now. Sorry.

Similar Messages

  • Change Master Page based on Text Content

    Hello,
    I have found a few examples relating to changing Master pages based on Style.
    However, I would like to change all Pages that flag "True" with the query of the "2-1134" to to "Master-C" for example.
    I have 12 master Pages with different strings that I don't mind editing the script to make work.
    The document is close to 1,000 pages.
    I am having trouble merging so many different scripts into something that will work.
    Platform: Indesign CS4 6.0.5 - OS X (Intel)
    Thank you so much for your input, help and guidence.

    This is what layers are for. Open the Layers panel and make at least one more layer. Put the graphic on the lower layer and the footer on the upper layer.

  • Integrating Wordpress into Muse need dynamic height based on content with cross domain

    Since Muse doesn't currently support Blogs and Wordpress integration I have decided to use an iFrame.
    My goal is to have the height of the iframe dynamically change based on the content in my Wordpress blog. I understand this is a common issue with frames that are hosted on different domains.
    I am running into having to over compensate with a bunch of deadspace to allow enough room. Alternatively I get the horrible looking scroll bar.
    I have tried using cross site scripting, JQuery and postMessage but am having trouble figuring out how to put the proper code into Muse and Wordpress for them to communicate back and forth.
    Please, any help on this matter would be greatly appreciated.

    Abhishek,
    Thanks for your reply, however, it is not working with Muse. I added the Javascript to the head section and adjusted iframe and it displays as a small square in the upper left hand corner, unable to view the whole page.
    Inserted into head section --
    <script type="text/javascript">
       function resizeIframe(obj)
      obj.style.height = 0;
      obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
       </script>
    inserted as an html object --
    <iframe name="MycoSmooth" src="http://www.mycosmooth.com" frameborder="0" scrolling="no" id="iframe" onload='javascript:resizeIframe(this);' />
    Below is the result:
    The purpose is to have an independent website run the blogging capabilities, since muse doesn't directly support blogging as of yet.
    Since the site is on a different domain, I am running into cross domain issues and it won't get the height of the page. The methods that apparently work use php and I am unsure how that would work in muse, if at all.

  • Displaying data on a Dynamic page.

    Hi,
    I know i had asked a similar question before of creating a multiple record form. I was given an
    answer that i could create a dynamic page. I am trying to create a dynamic page based on a table
    but most of the fields that i will display on the form are non database fields like description
    and all. All the fields will be display only.
    On the Dynamic page content where we can write the pl/sql code and HTML Code i am under HTML code
    creating a table because i need to show the data in the form of grid and inside oracle tag i have
    open some cursors and all to get the value for my non database fields.
    The problem i am facing is how to pass those values to the HTML table and display on the form.
    Please Help.
    Thanks,
    Amit.

    Hi,
    You can refer to this answer. It is a similar one.
    Re: .NET application works OK on infrastructure, but has problems on midtie
    Thanks,
    Sharmila

  • How to create dynamic tree based on BAPI

    Hi
    I am able to create dynamic tree based on flat file structure example given in SDN . But how to create the tree from BAPI directly.Also when I will be clicking on any leaf node of the tree some data related to the node will be passed to another view.
    Regards
    Ananda

    What i'm trying to do is create an organizational structure.
    Global>Region>Plant-->Corporation
    The output from the RFC is a structure containing every possible combination for orgazational hierarchy. Basically a flat table with record for every possible combinaton of Region-Plant-Corporation. This data needs to be bound to a tree structure so that we can call BW queries based on that level. For example: Give me aged inventory for the SAP corporation within the plant Berlin that is located in the Europe region.
    Now that you understand the business reason will the nodes that represent Region and Plant and corporation be non-singleton nodes or recursive? I was thinking a hierarchy of non-singleton nodes.
    I can bind these nodes to the Region - Plant - Corporation elements returned from in the flat table structure. I will probably get duplicates as a specific Region will be listed multiple times for every possible combination of the data beneath it. I'm not so concerned about that right now as I want to make sure I understand how in Web Dynpro to bind the data to the tree.
    Hopefully this makes some sense. Can you elaborate on how this may be constructed in context of the view?
    Would i create a model node for region (0..n), model node for plant (0..n), and a model node for Corporation (0..n)?
    Or does this sound totally incorrect?
    julian
    We have 3 regions over 50 plants and probably around 500 corporations.

  • Dynamic Pages In Portal

    I am trying to create a dynamic page based on a stored procedure
    which inserts rows into a table. I am having problems changing
    the value of a parameter text box via the following JavaScript.
    <SCRIPT type="text/javascript">
    <!--
    function change_val()
    var rightnow = new Date ();
    execproc.p_curr_values = rightnow.Date()+rightnow.Month()
    +rightnow.Year();
    //-->
    </SCRIPT>
    As you can see from the code below, all the parameters are given
    the same name value (p_curr_values) by Portal (last line of each
    block). This is what throws the Javascript off.
    <INPUT TYPE="hidden" NAME="p_col_displays" VALUE="1">
    <INPUT TYPE="hidden" NAME="p_data_types" VALUE="VARCHAR2">
    <INPUT TYPE="hidden" NAME="p_col_names" VALUE="P_DATA">
    <INPUT TYPE="hidden" NAME="p_in_out" VALUE="IN">
    <TD COLSPAN="1"><INPUT TYPE="text" NAME="p_curr_values" SIZE="2"
    MAXLENGTH="12"></TD>
    <INPUT TYPE="hidden" NAME="p_col_displays" VALUE="2">
    <INPUT TYPE="hidden" NAME="p_data_types" VALUE="VARCHAR2">
    <INPUT TYPE="hidden" NAME="p_col_names" VALUE="P_SURNAME">
    <INPUT TYPE="hidden" NAME="p_in_out" VALUE="IN">
    <TD COLSPAN="1"><INPUT TYPE="text" NAME="p_curr_values"
    SIZE="30" MAXLENGTH="15"></TD>
    <INPUT TYPE="hidden" NAME="p_col_displays" VALUE="3">
    <INPUT TYPE="hidden" NAME="p_data_types" VALUE="DATE">
    <INPUT TYPE="hidden" NAME="p_col_names" VALUE="P_REG">
    <INPUT TYPE="hidden" NAME="p_in_out" VALUE="IN">
    <TD COLSPAN="1"><INPUT TYPE="text" NAME="p_curr_values"
    SIZE="30" MAXLENGTH="9"></TD>
    I tried to change the HTML of the page so that each of the boxes
    may have different names but it does not work. When I save the
    page and run it, the HTML reverts to the default names.
    Does anybody know how to solve this problem?
    I have spend hours on this one and I would really appreciate
    some help.
    Regards,
    Kostas Paschalis

    Hi Debbianna -
    If you are not already a member of Portal Knowledge Exchange ... sign up now - it is free
    http://portalstudio.oracle.com/servlet/page?_pageid=2112&_dad=ops&_schema=OPSTUDIO&_mode=3
    Once you log in, if you do a search on DHTML you will see some samples for dynamic menus. These allow you to download the code as well so you can check out how others have implemented this and possibly just reuse their portlets.
    Hope this helps,
    Candace

  • Dynamic Page Parameter Limitations

    Parameters (bind variables) do not seem to be equivalent to string literals when passed to other procedures.
    Try this:
    1)create dynamic page
    2)make the contents call a known function [oracle]begin htp.print(portal30.wwsec_api.id('portal30')); end;[oracle]
    3)run successfully
    Now try this:
    1) change the literal 'portal30' to a dynamic param (:usr)
    2) run from the customize link entering portal30 for usr
    3) unsuccessful
    Why isn't the bind variable style parameter equivalent to a string literal when it is forwarded?

    Could someone see if this works for them - it takes just a moment. I'm really perplexed. When I pass the bind variable to dbms output, it looks right.

  • Adding Page View Web Part with dynamic URL based on visited mysite user

    Problem:
    I want to add an iframe (using Page View Web Part for example) on all mysite users front page (person.aspx) with following address:
    http://webservice/calendar?user=name
    The property "name" represents a dynamic value based on which person the user is visiting. Hence if i open "Tom Hanks" mysite profile, the iframe will show content from http://webservice/calendar?user=Tom%Hanks
    (This is a custom made calendar from Domino)
    Any suggestions welcome.
    -Terje

    Hi,
    The Page Viewer Web Part is basically an HTML IFRAME. We can use a Content Editor Web Part with an IFRAME and a little JavaScript to meet your requirement.
    Here is a similar thread for your reference:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/d9a06d93-93d2-4340-a491-c7d0d5d4fdf3/how-to-dynamically-change-link-in-page-viewer-web-part-sharepoint-2010?forum=sharepointgeneralprevious
    More information:
    http://stackoverflow.com/questions/20981226/sharepoint-2013-get-current-user-javascript
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Dynamic page structure

    Hello,
    I am using ADF 11g.
    I am trying to implement a page structure which differs in order to a logic behind. As a result, page might have different count of facets and these facets should be filled programmatically. I wonder what is the best method for doing this. I am trying to use different page templates for each possible page structure. But i have some questions about it, any idea would be appreciated.
    1- Is this supported: Main jsp file with a page template (which has a facet named contentArea), a jsff file (which has a dynamic page template reference) included in contentArea.
    2- When using dynamic page template binding, is it a requirement that used page templates must have the same amount of facetrefs?
    3- Can i dynamically change jsp:include tag's "page" attribute, e.g. with expression language?
    4- How can i find a page template (RichPageTemplate component) from backing bean.
    Thanks.

    Hi,
    1- Is this supported: Main jsp file with a page template (which has a facet named contentArea), a jsff file (which has a dynamic page template reference) included in contentArea.
    I tried it and it works with full support by the IDE.
    2- When using dynamic page template binding, is it a requirement that used page templates must have the same amount of facetrefs?
    Yes.
    3- Can i dynamically change jsp:include tag's "page" attribute, e.g. with expression language?
    The page include is added during compile tme, not runtime. So I don't think this is possible. However you can change the <af:pageTemplate> content dynamically. If you need to dynamically change parts of a pae, have a look at the Dynamic Page Template tag in the ADF Faces tag documentation
    4- How can i find a page template (RichPageTemplate component) from backing bean.
    You can start searching from the UIViewRoot or relatve to the parent container, which is af:form. In the latter case, you create a JSF component binding reference for the RichForm in the managed bean and then call getChildren
    e.g.
        public String cb1_action() {
            // Add event code here...
            List<UIComponent> l = form1.getChildren();
            for (UIComponent u : l){
                System.out.println("Child "+ u.getId() + "--"+u.getClass());
            return null;
        }Frank

  • How to create dynamic context based on a structure defined in the program?

    Hi Experts,
             I need to create a dynamic context based on a structure wa_struc which i have define programatically.
    When I pass wa_struc to structure_name parameter of create_nodeinfo_from_struc, i get a runtime error:
    "Parameter STRUCTURE_NAME contains an invalid value wa_struc."
    How to create dynamic context based on a structure defined in the program?
    I have written the code like this:
    TYPES: BEGIN OF t_type,
                v_carrid TYPE sflight-carrid,
                v_connid TYPE sflight-connid,
             END OF t_type.
      Data:  i_struc type table of t_type,
             wa_struc type t_type.
      data: dyn_node   type ref to if_wd_context_node.
      data: rootnode_info   type ref to if_wd_context_node_info.
      rootnode_info = wd_context->get_node_info( ).
      clear i_struc. refresh i_struc.
      select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
    cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
      parent_info = rootnode_info
      node_name = 'dynflight'
      structure_name = 'wa_struc'
      is_multiple = abap_true ).
    dyn_node = wd_context->get_child_node( name = 'dynflight' ).
    dyn_node->bind_table( i_struc ).
    Thanks
    Gopal
    Message was edited by: gopalkrishna baliga

    Hi Michelle,
              First of all Special thanks for your informative answers to my other forum questions. I really appreciate your help.
    Coming back to this question I am still waiting for an answer. Please help. Note that my structure is not in a dictionary.
    I am trying to create a new node. That is
    CONTEXT
    - DYNFLIGHT
    CARRID
    CONNID
    As you see above I am trying to create 'DYNFLIGHT' along with the 2 attributes which are inside this node. The structure of the node that is, no.of attributes may vary based on some condition. Thats why I am trying to create a node dynamically.
    Also I cannot define the structure in the ABAP dictionary because it changes based on condition
    I have updated my code like the following and I am getting error:
    TYPES: BEGIN OF t_type,
    CARRID TYPE sflight-carrid,
    CONNID TYPE sflight-connid,
    END OF t_type.
    Data: i_struc type table of t_type,
    dyn_node type ref to if_wd_context_node,
    rootnode_info type ref to if_wd_context_node_info,
    i_node_att type wdr_context_attr_info_map,
    wa_node_att type line of wdr_context_attr_info_map.
    wa_node_att-name = 'CARRID'.
    wa_node_att-TYPE_NAME = 'SFLIGHT-CARRID'.
    insert wa_node_att into table i_node_att.
    wa_node_att-name = 'CONNID'.
    wa_node_att-TYPE_NAME = 'SFLIGHT-CONNID'.
    insert wa_node_att into table i_node_att.
    clear i_struc. refresh i_struc.
    select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
    rootnode_info = wd_context->get_node_info( ).
    rootnode_info->add_new_child_node( name = 'DYNFLIGHT'
    attributes = i_node_att
    is_multiple = abap_true ).
    dyn_node = wd_context->get_child_node( 'DYNFLIGHT' ).
    dyn_node->bind_table( i_struc ).
    l_ref_interfacecontroller->set_data( dyn_node ).
    But now I am getting the following error :
    The following error text was processed in the system PET : Line types of an internal table and a work area not compatible.
    The error occurred on the application server FMSAP995_PET_02 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: IF_WD_CONTEXT_NODE~GET_STATIC_ATTRIBUTES_TABLE of program CL_WDR_CONTEXT_NODE_VAL=======CP
    Method: GET_REF_TO_TABLE of program CL_SALV_WD_DATA_TABLE=========CP
    Method: EXECUTE of program CL_SALV_WD_SERVICE_MANAGER====CP
    Method: APPLY_SERVICES of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: REFRESH of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE_DATA of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~UPDATE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_VIEW~MODIFY of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMPONENT~VIEW_MODIFY of program CL_SALV_WD_A_COMPONENT========CP
    -Gopal
    Message was edited by: gopalkrishna baliga

  • Dynamic subject based on data structure (JD Edwards)

    In JD EDwards TR 8.98.3.0 it should be possible to create a dynamic email subject based on a data structure that is connected to a report definition. I have managed to create the data strucure with two elements (DOCO and DESC), this data structure is connected to a report definition in which I have stated that the subject must contain the first element (DOCO): Purchase order &1.
    In the report definition I mapped the element DOCO from the data structure to the XML-element that contains the order number.
    Unfortunately the e-mail does contain the statis text "purchase order" but it doesn't contain the order number (DOCO) from the XML-file.
    Can anyone give me a hint for what I have done wrong?

    In JD EDwards TR 8.98.3.0 it should be possible to create a dynamic email subject based on a data structure that is connected to a report definition. I have managed to create the data strucure with two elements (DOCO and DESC), this data structure is connected to a report definition in which I have stated that the subject must contain the first element (DOCO): Purchase order &1.
    In the report definition I mapped the element DOCO from the data structure to the XML-element that contains the order number.
    Unfortunately the e-mail does contain the statis text "purchase order" but it doesn't contain the order number (DOCO) from the XML-file.
    Can anyone give me a hint for what I have done wrong?

  • Moving pages using Manage Site content and structure is corrupting the version history

    Hi,
    I am using share point 2010 manage site content and structure feature to move pages from one sub site to other. After doing several edits and check ins of a page and if I try to move the page using manage site content and structure , the version history
    is corrupted in the destination site (i.e., all the versions are not showing).
    Note: Sometimes content is also getting replicated after performing move operation.
    Is it a Bug/ Known issue in SharePoint?
    Any info on this issue is very helpful to us.
    Thanks in advance!!

    Hi,
    Using Site Content and Structure unable to move documents,pages and getting weird error message
    We are getting Below error:
    When Moving Document items from one site to another site in the same site collection using Site content and structure(But it's working in same site,we can move documents from one library to another library)
    1576|/wEWwwECuLLErw0Cy+nFYwK84baBAgK6zNqsAgLs0Le0BQK1s8uaCAL5qrm3CAKk7K6pDwKo9a0GArm+xr4NApKe9KUKAoajpK4CAqqU/2sChJXBtAIC052rYQKS+LTPAgLe+7uQAwLO0re/BwLgoaw2AojAlIMOApSO4JoNAuvW7MoKAojz2P4OAuOMt9EGAv/ns1wC64qI7gEC0LymmAcCro3lnQkCj7viwAsC8Met9QEC3a/DHALg4ZO6AQKAn8ebCALvr72DAwKm/NGmAgKN4aayCQLmmczsCgL+46qSAQKH7paCDgLouOHjDwKGuNCBCQKwuob2CQKP78n3BwLQ7vSYCALxlcvIBALRuajXAwK6/vr4AwKx8YasCQLti5igAQKay7JZAta625IFAuTy6rUKAvnC7eQKApvB3ugPAoTBua8BAoyajvgMAsGdloEJAvH+2KECAua7k9AGAv3Lzd8HAtPD3ocOAuX7hM4GAqO1g9sIAtn65sgFAuDkr9QEAt7I1KkMAryhltsIAtizx/kBAvzS7IcBAr+YhK4PAsO3rtADAvea+sADAsvc4IgKAp/1vIoMApelp3ICl+PqiwwC/KX1gwUC3fv58gIC7ZG/pwIC4cnupQgCq7mdlgYCjciR+AwC8/ue4gkC4YWJywUCs+rviAECpuyJigECkfr5rgkC08rHoQ0C+erayQUCjMqStQkCpIuKtwEC+dG5ngICoZ3/og0CspXoxwwC+pzgmwwCkoD5mAYCn/qH2AcC/N/pvAcCv5OtwAICuZquqgcC0/OFnwkC2/2wzQMCrJrO9woC69G52ggC64nunggCtLOIsQEC9LyC7gUC0ry/zgIC1ZDvgQ0C98OfMgL4kaj3CQKXhebCCwKi3bjPBQKYuojTCAKc4+fxCAKyjLfoBALVxO8SAsXSyuQLAqyvkNIPApDV5PgDAtufwJwEAu2BsoYLAs3Oqd8PAo6i+YMDAsy706oCAsLjx7kLApu3+9gKAuLnvMoIAtWywo8OAv6MjvIHAtSDhJwNArXRmL0LAraZvUcC5cGygQoCz5HN7A0C+YzY9AMCmtWQ6AUC/oHF8w4CxeTgmg8CgszujQECss22vgYCp6HBuggCkfm+FAKngqb5BgKkuIzAAQKPspKCCQLu+eDvCwKf5YrEBQKl0M3ACgKm85DvDALCu/nfCwLbwO38DgLoz5eyDQLfr9XLCwL20/eUDgL7hpr3DAKh1tfbCgL48OuNBwK4tuKaCALpgbn5CgLC4dKvBgKKlu76CwKfhKLJAQLurPTIAwLG0o+hAgKI5Y6dDALq+OOlCQKxjuuICAK8yrLHBwLcrOSSAwLoiJfQCwKKyvrtBALXkbCBCgKt4bG9BQLr6qnxCwLC2pz2DQKQ7OuZBALt7t+DDAKR47b8CAKi6pPGCQKLl4r3CQK5yfj+AwLgzYvjDwKUjerODQK7mOPTCQL9qP3qBgKYiOL9AgLA8pSaBwKay8fBDQLqw93DCgKkjpf/CwLsyquQCwKtpbGsDALMtKmxBwKPpvCmBOAFHtmBuG3iNmIT9fQ8Z1TWMpjZ122|cccccccccnncnnnnn|

  • Help! dynamic page content - how to handle?

    Hi !
    How do I handle dynamic page content, where for example my jsp page does a post and updates some data, and I dont want the user to use "back" button to go back onto it.
    Hints appreciated
    Cheers
    Steve

    Yes, you can create links for columns in the sql query of a portal report using htf.anchor/htf.anchor2 or just put in your own html code between single quotes. See the [PL/SQL Web Toolkit|http://download-west.oracle.com/docs/cd/B14099_10/web.1012/b15896/toc.htm] for info on the HTF package. There is also a portal Link component which can be created separately and then selected for use on a column in a portal report.

  • How to create a form based on table using dynamic page?

    Hi,
    I need to create a form using dynamic page. How do you pass values from the html form to a oracle procedure that will get executed on submission of the form ? I could not find any documents which shows how to do that. Can anyone please help me out with an example ?
    thanks,
    Mainak

    Hi,
    Something seems to get added to the form action because of "http". Hence I am removing it.
    You need to write a procedure with the values in the as parameters. Say for example you want to insert a record into dept
    table then
    Dynamic page code
    <html>
    <body>
    <form action="portalschema.insert_dept">
    <input type="text" name="p_deptno">
    <input type="text" name="p_dname">
    <input type="submit" name="p_action" value="save">
    </form>
    </body>
    </html>
    Procedure code.
    create or replace procedure insert_dept
    (p_deptno in number,
    p_dname in varchar2,
    p_action in varchar2)
    is begin
    if p_action = 'save' then
    insert into scott.dept(deptno,dname) values(p_deptno,p_dname);
    commit;
    end if;
    end;
    grant execute on insert_dept to public;
    Hope this helps.
    Thanks,
    Sharmila

  • How to display dynamic page content in an external application (MS Word)?

    I have a portal that generates a CV from info stored by various forms. The CV displays fine in a dynamic page, but when I add javascript to launch MS Word with a call to the dynamic page portlet, only the hard coded html displays - nothing between the <ORACLE> tags is loaded.
    I had the idea of updating the dynamic page with hard coded html prior to each export - but I can't find where the dynamic page definition is stored in the database.
    Any ideas/better solutions out there?

    dynamic page:
    <ORACLE>
    DECLARE
    theUser varchar2(30) := portal30.COE_GET_CV_PERSON;
    v_output varchar2(6) := portal30.COE_GET_CV_OUTPUT;
    v_no number;
    v_url varchar2(500):= 'http://oraclecoedb.asiapacific.cgey.com:7779/pls/portal30/PORTAL30.wwv_component_control.run_as_portlet?p_module_id=1934976747';
    BEGIN
    IF v_output = 'WORD' THEN htp.script('startWord('||''''||v_url||''''||');','Javascript');
    ELSE null;
    etc ...
    javascript:
    <script language="JavaScript">
    function startWord(strFile)
    var myApp = new ActiveXObject("Word.Application");
    if (myApp != null)
    myApp.Visible = true;
    myApp.Documents.Open(strFile);
    </script>

Maybe you are looking for

  • 11gR2 Install Error, Listener is not up or database service is not registered with it

    Hi all, I'm currently studying towards my OCA, I've passed 1z0-051 (SQL Fundementals I), and now I'm moving onto 1z0-052 (Admin 1). Im really having trouble creating a database in Oracle 11g R2 Enterprise Edition. I install the software no problem. T

  • Dispatcher stopped and not able to connect with sql server

    Hi ,                    In one of test system disp+work is started and then within no time its stopped. I am able to connect with  sql server 2005 database but while starting sap  dispatcher is stopping. Here is the log of  dev_wo trc file: "dev_w0",

  • Possible to install on external USB 2.0 hard drive?

    Is it possible? I have leopard installed on my macbook pro, however i need tiger for final cut pro. I am going to buy an external HD, and want to know if i can install tiger onto it? to use.....for the time being for FCP (some plugins not compatible)

  • BPM message collect problem

    Hi, I have a problem with  collecting messages and sending them together. I'm trying to work out a simple correlation example. Its a File -> XI -> File scenario. I followed the blog /people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection

  • How to open connection with only filepath(.mdb)

    hi, i only have the filepath of a mdb file, which the user selects.. how will i open connection to that file? thnx in advance