Insanely Simple Navigation Not Working

Working w/the Core book, which is not much help on exception cases. Here are my files:
WEB.XML
     <!-- Faces Servlet -->
     <servlet>
          <servlet-name>Faces Servlet</servlet-name>
          <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
          <load-on-startup> 1 </load-on-startup>
     </servlet>
     <servlet-mapping>
          <servlet-name>Faces Servlet</servlet-name>
          <url-pattern>/faces/*</url-pattern>
     </servlet-mapping>
     <listener>
            <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
     </listener>...
FACES-CONFIG.XML
<?xml version="1.0"?>
<!DOCTYPE faces-config PUBLIC
     "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
     "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
<faces-config>
     <navigation-rule>
          <!--  <from-view-id>/faces/login.jsp</from-view-id>  -->
          <navigation-case>
               <from-outcome>login</from-outcome>
               <to-view-id>/welcome.jsp</to-view-id>
          </navigation-case>
     </navigation-rule>
     <managed-bean>
          <managed-bean-name>user</managed-bean-name>
          <managed-bean-class>com.ontometrics.web.test.User</managed-bean-class>
          <managed-bean-scope>session</managed-bean-scope>
     </managed-bean>
</faces-config>LOGIN.JSP
<html>
     <%@ taglib uri="http://java.sun.com/jsf/core" prefix="o" %>
     <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
     <o:view>
          <head>
               <title>Login Screen</title>
          </head>
          <body>
               <h:form>
                    <h3>Please enter your name and password.</h3>
                    <table>
                         <tr>
                         <td>Name:</td>
                         <td>
                              <h:inputText value="#{user.email}"/>
                         </td>
                         </tr>
                         <tr>
                              <td>Password:</td>
                              <td>
                                   <h:inputSecret value="#{user.password}"/>
                              </td>
                         </tr>
                         </table>
                         <p>
                              <h:commandButton id="login" value="Login" action="login"/>
                         </p>
                    </h:form>
               </body>
     </o:view>
</html>WELCOME.JSP
<?xml version 1.0 ?>
<jsp:root version="2.0"
     xmlns:jsp="http://java.sun.com/JSP/Page"
     xmlns:o="http://java.sun.com/jsf/core"
     xmlns:h="http://java.sun.com/jsf/html">
     <o:view>
          <o:verbatim><![CDATA[<!DOCTYPE html
               PUBLIC "-//W3C/DTD XHTML 1.0 Transitional//EN"
               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">]]>
          </o:verbatim>
          <html xmlns="http://www.w3.org/1999/xhtml">
               <head>
                    <title>Welcome Screen</title>
               </head>
               <body>
                    <h3>
                         Welcome to Java Server Faces,
                         <o:outputText value="#{user.first}"/>!
                    </h3>
               </body>
          </html>
     </o:view>
</jsp:root>I am loading the page with:
http://localhost:8080/web/faces/login.jspand that prompts these warnings in the log file:
Aug 9, 2004 2:24:29 AM com.sun.faces.application.ViewHandlerImpl getFacesMapping
WARNING: Unable to determine FaceServlet mapping for servlet path '/faces'.
Aug 9, 2004 2:24:29 AM com.sun.faces.application.ViewHandlerImpl getFacesMapping
WARNING: Unable to determine FaceServlet mapping for servlet path '/faces'.
Aug 9, 2004 2:24:30 AM com.sun.faces.application.ViewHandlerImpl getFacesMapping
WARNING: Unable to determine FaceServlet mapping for servlet path '/login.jsp'.Then when I click submit, I get this:
StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: Cannot find FacesContext
     at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:399)
     at com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:105)
     at org.apache.jsp.login_jsp._jspx_meth_o_view_0(login_jsp.java:92)
     at org.apache.jsp.login_jsp._jspService(login_jsp.java:69)
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:268)
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:258)
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:205)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
     at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:790)
     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:709)
     at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:572)
     at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)
     at java.lang.Thread.run(Thread.java:552)

JSF matches patterns based on your web.xml file. You don't put your jsp pages in a folder called /faces or name them with a .faces extension. You just have a normal directory structure, like so:
${context_root}/
somePage.jsp
folder1/someOtherPage.jsp
In order to use jsf, you have to have a faces servlet & mapping in your web.xml file:
     <!-- Faces Servlet-->
     <servlet>
          <description>
               This is the Faces Servlet; the central controller for all jsf applications.
          </description>
          <display-name>The Faces Servlet</display-name>
          <servlet-name>Faces Servlet</servlet-name>
          <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
          <init-param>
               <param-name>config</param-name>
               <param-value>/WEB-INF/faces-config.xml</param-value>
          </init-param>
          <load-on-startup>1</load-on-startup>
     </servlet>
     <!-- Faces Mapping -->
     <servlet-mapping>
          <servlet-name>Faces Servlet</servlet-name>
          <url-pattern>/faces/*</url-pattern>
     </servlet-mapping>
This tells the web container that any URL request for /faces/somePage.jsp must be routed through the FacesServlet, where the actual jsp to process is /somePage.jsp. Similarly, if the server gets a request for /faces/folder1/someOtherPage.jsp, it will process /folder1/someOtherPage.jsp through the faces servlet.
So, if your web container is at http://localhost:8080
And your context root is: /webapp_contextroot
And your jsp is: /folder/page.jsp
And your FacesServlet mapping pattern is: /faces/*
Then to request that page you must type the url:
http://localhost:8080/webapp_contextroot/faces/folder/page.jsp
On the other hand, if you had the same setup as above but your faces mapping was *.faces, you would have to access this url:
http://localhost:8080/webapp_contextroot/folder/page.faces
That's how it works, someone please correct me if I'm wrong...

Similar Messages

  • Pie chart with two measures and date dimension navigation not working

    Hi Experts,
    Pie chart with two measures and date dimension navigation not working. Any help is appreciated.
    Thanks
    V

    Hi Deepak,
    I had time dimension in the RPD.
    I have stacked bar chart with same time dim like year & month in the report. when I go to legand and set navigation it is working fine. But not with pie chart.
    I am not not sure what is the problem. When I click on Pie chart it is not navigating to the target report. Can it be any other issues..???

  • Simple pass not working windows 10

    simple pass not working, does not recognise windows password at start to gain access to system, no flashing light, driversin software only go to windows 8.1.How do I reset the lot or reinstall simple pass?

    I have an HP Elitebook 8760W.  I cannot get Simplepass or Windows Hello to recognize my Validity VFM-471 fingerprint reader.  I'm not sure I have the right driver installed for the Validity hardware.  Could someone please point me to a link for the proper Win 8.1 driver?   I'm trying to make this work on Windows Pro 64 Bit.   I have tried everything to make this work.  Both Simplepass and Window Hello recognize the fingerprint read while I'm setting it up, but when rebooting and trying to log in with the fingerprint function - it doesn't act like it is even working.  I've tried all of the suggestions on the instructions to no avail.  The Laptop works just fine without the fingerprint scanner, and I guess I can live without it, but I've been used to using it on Windows 7 for so long, I'd like to have it working agian.  Any suggestions or hellp would be greatly appreciated.  Thanks in advance. 

  • Navigation not working in Weblogic Server but working from JDeveloper.

    Hi
    I created a simple application with some page navigations (some declarative and some dynamic using Managed Bean).
    The navigation works fine when I run from JDeveloper. (Local System)
    So I deployed the application to the WebLogic server (Local system with a domain configured with ADF.)
    The pages are getting rendered correctly, bu on button clicks, the navigation is not happening from any of the pages.
    Could I have missed something or is there a way to track what the problem might be?
    JDev : 11.1.1.3
    Web Logic Server : 11gR1 (1.3) which comes with JDeveloper
    Thanks for any help.
    Sameer

    Hi John
    I am not using task flows. I just have some jspx pages defined in the unbounded task flow adfc-config.xml connected with navigation.
    I run from JDEveloper by right clicking on the jspx files.
    The URL when run from jdeveloper is as follows.
    http://127.0.0.1:7101/SessionsPOC-ViewController-context-root/faces/MainPage
    From Weblogic server I am using the link given in the Testing tab of the weblogic administration console.
    The URL is as follows.
    http://10.9.73.103:7001/SessionsPOC-ViewController-context-root (default)
    http://10.9.73.103:7001/SessionsPOC-ViewController-context-root/MainPage.jspx
    Actually, the URL given in the weblogic testing tab is not runnable. I am changing the link as follows to be able to run it.
    http://10.9.73.103:7001/SessionsPOC-ViewController-context-root/faces/MainPage.jspx
    I have defined the MainPage.jspx in the web.xml 's Welcome page. But it is not taking it I guess.
    Also, I am able to run the other page by giving the following url. But the navigation buttons are not working in that page also.
    http://10.9.73.103:7001/SessionsPOC-ViewController-context-root/faces/SecondPage.jspx
    Thanks
    Sameer

  • Voice navigation not working on iOS 6 maps 4S

    Voice navigation is not working, no voice
    Coming out of maps  on iPhone 4S maps on iOS 6/6.0.1
    I have tried everything . Help needed!

    Sure it's availble in the country you're trying to use such? Read here:
    http://www.apple.com/ios/feature-availability/

  • Simple Pass not working with Windows 7 Premium

    I have a Pavillion Notebook, model dv6-6b51sa running Windows 7 Home Premium 64bit O/S
    For some time now my Simple Pass has not worked. I have uninstalled and reinstalled the programme but to no avail. I have read several posts to the community here and have tried just about all recommendations including; hard reset, system restore (in case it had anything to do with Windows updates) a BIOS update and shutting down and rebooting after each process.
    Now, having reinstalled Simple Pass (from the HP Support website) , biometric devices do not even feature in Device Manager!
    Can anyone kindly offer me assistance?

    Hi @tagl
    Welcome to HP Forums! I will be happy to help with the SimplePass problem you are experiencing. The fact you are missing a biometric device in your Device Manager would be a problem because for it to work you need the software and the accompanying biometric device. Here is the Validity Fingerprint Sensor Driver, install that and then see if you are able to use your fingerprint reader.
    Please click “Accept as Solution ” if you feel my post solved your issue.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Thank you,
    BHK6
    I work on behalf of HP

  • Filter and navigation not working properly

    Hi Gurus,
    I have two reports - report1(source) and report2(target) report.
    In report1, it shows two columns - Market_ID, Amount_sold
    In report2, it shows two columns - Market_ID, Reasons(where Market_ID is made prompted)
    In report1, I have made the Value Interaction as 'Navigate' and the target as 'path of report2' in Column properties ->Column Format
    But, when I click on Market_ID(report1), it is NOT showing the details of that particulat Market_ID(report2).
    It is showing the details of whole Market_ID in report2. That means, the filter is not working properly.
    Is there any method in which the report2 shows the details of particular Market_ID which is selected from report1(market_ID)?
    Best Regards,
    J

    yes you can,
    in your source add a master_name column and in that make the navigation.
    in the master_id column go to column format and style options and check the Use Custom CSS style option and type,
    display: none
    now in your source the master_id column will get hidden. in your target make the master_id prompted.
    now click on the master_name in your source, your target will get filtered by the corresponding msater_id
    thanks,
    Karthick
    Edited by: kart on Jun 7, 2010 11:52 AM

  • Help - Simple mask not working in Flash CS4

    Hi everyone,
    Thanks for taking a minute to read my post.
    I am creating a very simple mask using motion tweening. I created some text on a layer and made it a masked layer. Then I created a mask layer which consists of a circle that will span across the text. When I play the movie the circle does not show up at all in the frames the mask layer spans (it's purple on a black background) and the circle does not move across the text like I told it to with the motion tweening. I don't know why it's not working. For some reason the circle isn't showing on the stage at all and it's not moving across the text. I don't know if I have it set up wrong on the timeline or what. Here's the steps I followed to create the mask:
    1.insert a new layer in which I named it mask and click frame 1 on this layer
    2. select the oval tools on the tools panel and set the stroke to none
    3. set the fill color to purple
    4. draw a circle and click the selection tool and drag a marquee around the circle to select it.
    5. click insert on the menu bar, click motion tween then click ok in dialog box about converting it to a symbol to be tweened
    6. click the last frame in the mask layer and drag the circle to the end of the line of text
    7.click mask on the timeline to select the mask layer, click modify on the menu bar, point to timeline then click layer properties
    8. verify the show check box is selected in the name section, click the lock check box to select it, click the mask option button in he type section, then click ok.
    9. play the movie in which the circle object covers the text on the masked layer as it moves across the stage
    Thanks for your help!
    ashmic19

    Update 8-2-10: In play mode the text was still visible when it shouldn't be but once I tested the movie the mask worked correctly with the text. So problem solved
    -ashmic19
    Thanks for all who viewed this. I finally figured out why it wasn't working. I had the mask layer locked. But now the circle is moving across the text but the text is viewable when it shouldn't be until the circle moves across it. How come it's doing this?
    ashmic19
    Message was edited by: ashmic19
    Message was edited by: ashmic19

  • Table of Contents navigation not working

    I am using Captivate 6.  I have a separate TOC, with only 4 items.  'Self paced Learning' and 'Enable Navigation' are both checked. However, when I publish to SWF, or preview, the navigation does not work.
    Due to IT team desktop image restrictions, I can only check this in IE8, using Flash 11.1.102.55.
    Any suggestions?
    Kayellsa

    I'm having the same exact problem.  I do not have the Navigate Visited Slides only option checked.  I want the user to be able to just skip to a section.  I've noticed it works to an extent, but easliy gets hung up.  So if I click to a section, the project either gets stuck or it continues to play, but audio dissapears.

  • Internal Navigation not working in PDF

    Hi,
    I have a PDF document (parent) which gets rendered in IE8 & IE9 without any issue. However the parent pdf has hyperlinks to other pdf files which are located on a network share in my intranet.
    The issue is when we click on the hyperlink for the pdf documents from the parent PDF document it does not open (no error is obtained). If the parent PDF is saved in the local file system then the hyperlinks start working. Note that permission is not an issue here since the network share has full rights for all accounts.
    Any help appreciated.

    Hi John
    I am not using task flows. I just have some jspx pages defined in the unbounded task flow adfc-config.xml connected with navigation.
    I run from JDEveloper by right clicking on the jspx files.
    The URL when run from jdeveloper is as follows.
    http://127.0.0.1:7101/SessionsPOC-ViewController-context-root/faces/MainPage
    From Weblogic server I am using the link given in the Testing tab of the weblogic administration console.
    The URL is as follows.
    http://10.9.73.103:7001/SessionsPOC-ViewController-context-root (default)
    http://10.9.73.103:7001/SessionsPOC-ViewController-context-root/MainPage.jspx
    Actually, the URL given in the weblogic testing tab is not runnable. I am changing the link as follows to be able to run it.
    http://10.9.73.103:7001/SessionsPOC-ViewController-context-root/faces/MainPage.jspx
    I have defined the MainPage.jspx in the web.xml 's Welcome page. But it is not taking it I guess.
    Also, I am able to run the other page by giving the following url. But the navigation buttons are not working in that page also.
    http://10.9.73.103:7001/SessionsPOC-ViewController-context-root/faces/SecondPage.jspx
    Thanks
    Sameer

  • Adfc-config navigation not working

    Hello,
    I have created the following navigation in the adfc-config.xml:
      <view id="partError">
        <page>/partError.jspx</page>
      </view>
      <view id="estimation-home">
        <page>/estimation-home.jspx</page>
      </view>
      <view id="estimation-chart">
        <page>/estimation-chart.jspx</page>
      </view>
      <control-flow-rule id="__9">
        <from-activity-id id="__10">estimation-home</from-activity-id>
        <control-flow-case id="__13">
          <from-outcome id="__14">fill-estimation</from-outcome>
          <to-activity-id id="__12">estimation-chart</to-activity-id>
        </control-flow-case>
      </control-flow-rule>And I am calling the outcome as:
    <af:commandLink id="cl1" action="fill-estimation" partialSubmit="true" text="Test"/>But it is not working.
    If I define the navigation in the faces-config.xml:
      <navigation-rule>
        <from-view-id>/estimation-home.jspx</from-view-id>
        <navigation-case>
          <from-outcome>fill-estimation</from-outcome>
          <to-view-id>/estimation-chart.jspx</to-view-id>
          <redirect/>
        </navigation-case>
      </navigation-rule>It works. I am unable to find what I am doing wrong. Any suggestion would be very helpful to me.

    Hello Frank,
    Before I was launching the first page as:
    1. Defined index.jsp and added jsp:redirect to the estimation-home.jspx.
    2. Added index.jsp as the welcome page in web.xml.
    After the point you asked me, form that, I came to know I am doing this in wrong way, that's why the navigation is not working.
    Now
    1. I have changed my index.jsp to add
    <meta http-equiv="refresh" content="0;url=./pages/estimation-home" />2. Removed the navigation from faces-config.xml and defined it in adfc-config.xml.
    It is working now.
    Thank you very much.
    Best regards,
    Tapas

  • Object based navigation not working in FPN

    Hi All,
    We are having issue with Object Based Navigation in FPN. 
    System details are, Central Portal 7.01 sp 06 and Child (SRM) Portal 7.01 SP 07.
    We are using the standard business package iView Check Status, which is working fine in Producer Portal and the same is not working in Central Portal.
    Kindly help us on this.
    Regards,
    Venkatesh K

    Hi Venkatesh,
    Before gettign into the isue there is some limitation given by sap on this reagrds of OBN with fpn:
    1.A content developer may create an OBN source iView to call the OBN service to run code that processes a number of target iViews and displays them for the user to choose from, during runtime, in a context menu accessible from the source iView.
    When in remote delta link mode, the federated portal network does not support this implementation of OBN, regardless or whether the source iView calling the OBN service was created in NetWeaver 7.1 or in NetWeaver 7.0 and then upgraded to 7.1.
    2.The user on the consumer side may have additional roles that the respective user on the producer does not have.
    Conversely, OBN does not search for targets in roles that the user has on the producer, which do not exist on the consumer.
    Note also: In remote role assignment mode all content editing is done on the producer, including the editingobject-based navigation, such as the removal and addition of implementations and changes in priority
    so as per your perspective issue can i clearly knwo abou the issue your getiing ,as it is working fine in Producer Portal and not in central portal right?
    Once check for the remote delta link which might help you to resolve your issue,Hope this information helps you or take near to the issue any more queries get back !
    Thanks&Regards
    AswinChandraGirmaji

  • Flash Navigation Not Working (the swf works, but the external links don't)

    I used Illustrator and Flash Catalyst to make a navigation bar for my website, but it's not working... I click links and nothing happens. I click one of the links to the sub-menu (the "careers" button and "advertising" button go to other menus) and those work fine, but the links themselves aren't working, even though they were when I first uploaded it...
    I've double and triple checked, and they all have the right links associated with them in FC, so any ideas on what I should do to fix it?
    The site: http://www.sorean.net
    ALSO: Anyone not using Firefox, if you could see if they work for you, I'd much appreciate it.
    Anyway, you click on the logo to bring the main menu back up if you're in a sub menu... But I've had to put text-based links above the navigation so that it wouldn't be a huge inconvenience while I'm trying to make it work.
    Any help or suggestions are greatly appreciated.
    - Amanda

    I figured it out... I was trying to use the navigation on multiple layers (sub-folders) of my site, but putting a full URL makes the external links NOT work
    like "http://mydomain.com/file.swf" instead of just "file.swf" but when I changed it to NOT include my domain, it works great. ... SO, I did have to put a copy of the swf in each sub-folder, but that's ok, 'cause as long as it works, I'm good. I'm so excited.

  • Simple pass not working with Chrome

    I've seen this posted numerous times (some posts going back to 2012) and I have yet to see an answer that works. I just bought a windows 7 machine with simple pass.  Simple pass simply does not work with chrome. The only time it works is when I log on to windows itself. Everything is new and up to date, and simple pass is configured correctly. 
    This is one of the reasons why I bought this machine, and it just doesn't work. Can someone, anyone, tell me how to make it work?

    It does work with IE Explorer but I have to use Chrome for work

  • Simple javascript not working

    Hello,
    I have got a problem with this simple javascript that works
    on every browser I tested but not on AIR (1.5.0 on Aptana Studio) :
    <html>
    <head>
    <title>Test</title>
    <script type="text/javascript">
    function init()
    display();
    var nb=10;
    function del()
    nb--;
    display();
    function display()
    var i;
    var res = "";
    for (i=0; i<nb; i++)
    res += "<li><a onclick=\"del();\">link"+ i
    +"</a></li>";
    document.getElementById("results").innerHTML = "<ul>"+
    res +"</ul>";
    </script>
    </head>
    <body onload="init()">
    <p onclick="del()">test</p>
    <div id="results"></div>
    </body>
    </html>
    Clicking on any link in the list should reload this list with
    one item less, but it only works once, I do not understand why
    considering this code perfectly works on any browser.
    Clicking on the "test" text in the <p> also works
    perfectly and I have got no error message in the console, so what
    is the problem, please?
    Thanks for your help.

    Unsure what the problem is. I copied almost verbatim and it
    worked fine for me.
    here's my script (slightly different due to my base file is
    xhtml strict)
    quote:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xml:lang="en" lang="en">
    <head>
    <title>Adobe Air 1.5 Test</title>
    <script src="lib/AIRAliases.js"
    type="text/javascript"></script>
    <script src="lib/main.js"
    type="text/javascript"></script>
    <script type="text/javascript">
    function init(){
    display();
    var nb=10;
    function del(){
    nb--;
    display();
    function display(){
    var i;
    var res = "";
    for (i=0; i<nb; i++)
    res += "<li><a onclick=\"del();\">link"+ i
    +"</a></li>";
    document.getElementById("results").innerHTML = "<ul>"+
    res +"</ul>";
    </script>
    </head>
    <body onload="init();">
    <p onclick="del()">test</p>
    <div id="results"></div>
    </body>
    </html>

Maybe you are looking for