ICEfaces
  1. ICEfaces
  2. ICE-6912

Unable to select text after double clicking row

    Details

      Description

      The user has an ice:dataTable that when double clicked (rowSelection) will take you to a basic details page. Once there you are unable to use the cursor and highlight/select text in the view. However, the table also contains a commandButton which will take you to this same details page but text selection is active. Their clickListener will create a new tab within their custom tabSet component.

      After digging deeper, we found that the double click DOM update differs from the commandButton in that there is a focus call. Since clicking the commandButton works as expected, we suggested that the user add a component binding to the commandButton and explicitly set focus which then did result in the same DOM update for both actions:
      Command button action event:

      <update address="f2YiHAyt395YQr_X7OU8eg:1:dynamic-code" tag="script">
      <attribute name="id">f2YiHAyt395YQr_X7OU8eg:1:dynamic-code</attribute>
      <attribute name="type">text/javascript</attribute>
      <content>Ice.Focus.setFocus('createPRForm:tblResults:0:cmdOpen');//1843364878</content>
      </update>

      Row selector click event:

      <update address="f2YiHAyt395YQr_X7OU8eg:1:dynamic-code" tag="script">
      <attribute name="id">f2YiHAyt395YQr_X7OU8eg:1:dynamic-code</attribute>
      <attribute name="type">text/javascript</attribute>
      <content>Ice.Focus.setFocus('createPRForm:tblResults:0:cmdOpen');//-1728417036</content>
      </update>

      A test case has been uploaded to the FTP site mentioned in the comment below. The relevant files can be found here:

      1. DataTable + RowSelector - RefreshTestSource/WEB-INF/includes/templates/paginator/sortable_paginator_tpl.jspx
      2. TabSet composite component - RefreshTestSource/WEB-INF/facelets/tags/tabs.xhtml and tab.xhtml
      3. TabControlBean - RefreshTestSource/src/au/com/nissan/havana/beans/TabControl.java

        Activity

        Hide
        yip.ng added a comment - - edited

        \\iceads1\Support\10024\RefreshTest.war

        war file doesn't run on my machine. Tomcat (6.0.29) main page lists app. as running, but when app. link followed it says "The requested resource (/RefreshTest/) is not available." No exceptions in log files.

        I need to set up project in Intellij. eventually. I need the Java source files. (There is none in the war file.)

        Show
        yip.ng added a comment - - edited \\iceads1\Support\10024\RefreshTest.war war file doesn't run on my machine. Tomcat (6.0.29) main page lists app. as running, but when app. link followed it says "The requested resource (/RefreshTest/) is not available." No exceptions in log files. I need to set up project in Intellij. eventually. I need the Java source files. (There is none in the war file.)
        Hide
        yip.ng added a comment -

        Tried Tomcat 6.0.18 (also tried 7.0.8). Same problem.

        Tried unpacking war and setting up webapp in Intellij to run. There was an exception: FacesContext not found. How can FacesContext be not found?

        16-Jun-2011 12:01:48 PM org.apache.catalina.core.StandardContext listenerStart
        SEVERE: Error configuring application listener of class com.sun.faces.config.ConfigureListener
        java.lang.NoClassDefFoundError: javax/faces/context/FacesContext
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
        at java.lang.Class.getConstructor0(Class.java:2699)
        at java.lang.Class.newInstance0(Class.java:326)
        at java.lang.Class.newInstance(Class.java:308)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3787)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
        at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1217)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
        at java.lang.Thread.run(Thread.java:619)
        Caused by: java.lang.ClassNotFoundException: javax.faces.context.FacesContext
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
        ... 21 more

        Show
        yip.ng added a comment - Tried Tomcat 6.0.18 (also tried 7.0.8). Same problem. Tried unpacking war and setting up webapp in Intellij to run. There was an exception: FacesContext not found. How can FacesContext be not found? 16-Jun-2011 12:01:48 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class com.sun.faces.config.ConfigureListener java.lang.NoClassDefFoundError: javax/faces/context/FacesContext at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.newInstance0(Class.java:326) at java.lang.Class.newInstance(Class.java:308) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3787) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1217) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.ClassNotFoundException: javax.faces.context.FacesContext at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) ... 21 more
        Hide
        Tyler Johnson added a comment -

        Example runs when referencing the following URL http://localhost:8080/RefreshTest/index.iface

        Show
        Tyler Johnson added a comment - Example runs when referencing the following URL http://localhost:8080/RefreshTest/index.iface
        Hide
        yip.ng added a comment - - edited

        App. finally running after installing zip package of Tomcat + app. from Tyler. Can see the problem now.

        Show
        yip.ng added a comment - - edited App. finally running after installing zip package of Tomcat + app. from Tyler. Can see the problem now.
        Hide
        yip.ng added a comment - - edited

        After tracing the code and putting in some Java and JS debug statements, I rebuilt icefaces.jar and icefaces-comps.jar and copied them to replace old ones in C:\apache-tomcat-6.0.18\webapps\RefreshTest\WEB-INF\lib. After debugging for a while, I suddenly found that it was actually working with the new jars. To make sure that it was not some timing issues I reverted all my changes and rebuilt, copied and ran again. It was still working fine. So this problem seems to have disappeared in the icefaces trunk version. See video at http://screencast.com/t/OskBnBhqcH. (icefaces.jar and icefaces-comps.jar rebuilt from icefaces 1.8 trunk, run in Firefox 4.0.1 and Tomcat 6.0.18.) New jar files attached.

        Show
        yip.ng added a comment - - edited After tracing the code and putting in some Java and JS debug statements, I rebuilt icefaces.jar and icefaces-comps.jar and copied them to replace old ones in C:\apache-tomcat-6.0.18\webapps\RefreshTest\WEB-INF\lib. After debugging for a while, I suddenly found that it was actually working with the new jars. To make sure that it was not some timing issues I reverted all my changes and rebuilt, copied and ran again. It was still working fine. So this problem seems to have disappeared in the icefaces trunk version. See video at http://screencast.com/t/OskBnBhqcH . (icefaces.jar and icefaces-comps.jar rebuilt from icefaces 1.8 trunk, run in Firefox 4.0.1 and Tomcat 6.0.18.) New jar files attached.
        Hide
        Tyler Johnson added a comment -

        Tested with P03 and the issue is resolved.

        Show
        Tyler Johnson added a comment - Tested with P03 and the issue is resolved.

          People

          • Assignee:
            yip.ng
            Reporter:
            Tyler Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: