1 Reply Latest reply on Feb 4, 2016 9:01 AM by Michal Petrov

    Only First row "input text" - onclick- cursor position not going to the beginning of text box

    Gopal Herkal Newbie

      Hi,

       

      When I click only on first row input text box the cursor is not setting to the beginning of text area.

      Other rows are working fine.

       

      please find screenshot:

       

      The code is:

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

      <!-- Update abended job details-->

      <html xmlns="http://www.w3.org/1999/xhtml";

             xmlns:c="http://java.sun.com/jsp/jstl/core";

             xmlns:ui="http://java.sun.com/jsf/facelets";

             xmlns:h="http://java.sun.com/jsf/html";

             xmlns:f="http://java.sun.com/jsf/core";

             xmlns:rich="http://richfaces.org/rich";

             xmlns:a4j="http://richfaces.org/a4j";

             xmlns:fn="http://java.sun.com/jsp/jstl/functions";>

      <h:head>

             <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

             <link href="#{request.contextPath}/resources/framework/css/styles.css"

                    rel="stylesheet" type="text/css"></link>

      </h:head>

      <h:body>

       

             <ui:composition template="templates/framework/template.xhtml">

      <ui:define name="content">

      <rich:panel id="abendUpdate" modal="true" autosized="true"

                           resizeable="false" width="1040"

                           style="top:95px;border-radius:21px;padding:0px;overflow:hidden;visibility:visible;"

      domElementAttachment="form">

      <h:form id="form1" onsubmit="return false;">

      <div id="header">

       

      <table>

      <tr>

      <td><h:graphicImage name="framework/img/brand-logo.png"

      alt="brand-logo" /></td>

      <td>

      <h:outputText

      value="  #{framework.app.properties.getProperty('FRAMEWORK_TITLE')}" />

      </td>

      </tr>

      </table>

      </div>

       

      <br />

      <h:outputText

                                 value="#{fwlbl.update_abend_screen}"

                                 style="font-size:24px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif; margin-left:280px;" />

      <br />

      <br />

       

      <rich:dataTable value="#{abend.dtl}"

                                 enableContextMenu="false" var="a" rowKeyVar="row"

                                 selectionMode="none" rowClasses="tableCenter" sortMode="single"

                                 headerClass="tableCenter"

                                 style="margin-left:10px;margin-right:10px;max-height:248px;background-attachment:fixed;"

      id="tbl_abend_u" rows="10">      

       

      <rich:column sortBy="#{a.jobName}"

      filterExpression="#{fn:containsIgnoreCase(a.jobName,abend.jobNameFilter)}"

      filterValue="#{abend.jobNameFilter}" filterType="custom"

      label="Abend Id" style="text-align: center"

      sortOrder="#{abend.sortOrders['jobName']}" sortType="custom">

      <f:facet name="header">

      <h:panelGrid columns="2">

      <a4j:commandLink execute="@this" value="Job Name"

      style="text-decoration:none !important;" render="tbl_abend_u"

      action="#{abend.sort}">

      <f:param name="sortProperty" value="jobName" />

       

      </a4j:commandLink>

      <h:graphicImage value="/resources/framework/img/arrow.png"

      rendered="#{abend.sortOrders['jobName']=='descending'}" />

      <h:graphicImage value="/resources/framework/img/arrowUp.png"

      rendered="#{abend.sortOrders['jobName']=='ascending'}" />

       

      <h:inputText value="#{abend.jobNameFilter}"

       

      onkeypress="if (event.keyCode == 13) {event.target.blur();event.stopPropagation();return false;} else {return true;};"

      style="width:66px;" label="Job Name Filter">

      <a4j:ajax event="blur" render="tbl_abend_u scroller"

      execute="@this"></a4j:ajax>

      </h:inputText>

      </h:panelGrid>

       

      </f:facet>

      <h:outputText value="#{a.jobName}" />

       

      </rich:column>

       

      <rich:column sortBy="#{a.envCode}"

      filterExpression="#{fn:containsIgnoreCase(a.envCode,abend.envFilter)}"

      filterValue="#{abend.envFilter}" filterType="custom"

      label="Environment" style="text-align: center"

      sortOrder="#{abend.sortOrders['envCode']}" sortType="custom">

      <f:facet name="header">

      <h:panelGrid columns="2">

      <a4j:commandLink execute="@this" value="Environment"

      style="text-decoration:none !important;" render="tbl_abend_u"

      action="#{abend.sort}">

      <f:param name="sortProperty" value="envCode" />

       

      </a4j:commandLink>

      <h:graphicImage value="/resources/framework/img/arrow.png"

      rendered="#{abend.sortOrders['envCode']=='descending'}" />

      <h:graphicImage value="/resources/framework/img/arrowUp.png"

      rendered="#{abend.sortOrders['envCode']=='ascending'}" />

       

      <h:inputText value="#{abend.envFilter}"

       

      onkeypress="if (event.keyCode == 13) {event.target.blur();event.stopPropagation();return false;} else {return true;};"

      style="width:66px;" label="Environment Filter">

      <a4j:ajax event="blur" render="tbl_abend_u scroller"

      execute="@this"></a4j:ajax>

      </h:inputText>

      </h:panelGrid>

       

      </f:facet>

      <h:outputText value="#{a.envCode}" />

       

      </rich:column>

       

       

       

      <rich:column sortBy="#{a.regCode}"

      filterExpression="#{fn:containsIgnoreCase(a.regCode,abend.regFilter)}"

      filterValue="#{abend.regFilter}" filterType="custom"

      label="Region" style="text-align: center"

      sortOrder="#{abend.sortOrders['regCode']}" sortType="custom">

      <f:facet name="header">

      <h:panelGrid columns="2">

      <a4j:commandLink execute="@this" value="Region"

      style="text-decoration:none !important;" render="tbl_abend_u"

      action="#{abend.sort}">

      <f:param name="sortProperty" value="regCode" />

       

      </a4j:commandLink>

      <h:graphicImage value="/resources/framework/img/arrow.png"

      rendered="#{abend.sortOrders['regCode']=='descending'}" />

      <h:graphicImage value="/resources/framework/img/arrowUp.png"

      rendered="#{abend.sortOrders['regCode']=='ascending'}" />

       

      <h:inputText value="#{abend.regFilter}"

       

      onkeypress="if (event.keyCode == 13) {event.target.blur();event.stopPropagation();return false;} else {return true;};"

      style="width:66px;" label="Region Filter">

      <a4j:ajax event="blur" render="tbl_abend_u scroller"

      execute="@this"></a4j:ajax>

      </h:inputText>

      </h:panelGrid>

       

      </f:facet>

      <h:outputText value="#{a.regCode}" />

       

      </rich:column>

       

      <rich:column sortBy="#{a.status}"

      filterExpression="#{fn:containsIgnoreCase(a.status,abend.statusFilter)}"

      filterValue="#{abend.statusFilter}" filterType="custom"

      label="Status" style="text-align: center;"

      sortOrder="#{abend.sortOrders['status']}" sortType="custom">

      <f:facet name="header">

      <h:panelGrid columns="2">

      <a4j:commandLink execute="@this" value="Status"

      style="text-decoration:none !important;" render="tbl_abend_u"

      action="#{abend.sort}">

      <f:param name="sortProperty" value="status" />

       

      </a4j:commandLink>

      <h:graphicImage value="/resources/framework/img/arrow.png"

      rendered="#{abend.sortOrders['status']=='descending'}" />

      <h:graphicImage value="/resources/framework/img/arrowUp.png"

      rendered="#{abend.sortOrders['status']=='ascending'}" />

       

      <h:inputText value="#{abend.statusFilter}"

       

      onkeypress="if (event.keyCode == 13) {event.target.blur();event.stopPropagation();return false;} else {return true;};"

      style="width:66px;" label="Status Filter">

      <a4j:ajax event="blur" render="tbl_abend_u scroller"

      execute="@this"></a4j:ajax>

      </h:inputText>

      </h:panelGrid>

       

      </f:facet>

      <rich:select value="#{a.status}" id="statusDropdown"

      valueChangeListener="#{abend.valueChange}">

      <f:selectItems immediate="true" value="#{abend.statusList}"></f:selectItems>

      <f:attribute name="abendId" value="#{a.abendId}"></f:attribute>

       

      </rich:select>

       

      </rich:column>

       

      <rich:column sortBy="#{a.abendCode}"

      filterExpression="#{fn:containsIgnoreCase(a.abendCode,abend.abendCodeFilter)}"

      filterValue="#{abend.abendCodeFilter}" filterType="custom"

      label="Abend Code" style="text-align: center"

      sortOrder="#{abend.sortOrders['abendCode']}" sortType="custom">

      <f:facet name="header">

      <h:panelGrid columns="2">

      <a4j:commandLink execute="@this" value="Abend Code"

      style="text-decoration:none !important;" render="tbl_abend_u"

      action="#{abend.sort}">

      <f:param name="sortProperty" value="abendCode" />

       

      </a4j:commandLink>

      <h:graphicImage value="/resources/framework/img/arrow.png"

      rendered="#{abend.sortOrders['abendCode']=='descending'}" />

      <h:graphicImage value="/resources/framework/img/arrowUp.png"

      rendered="#{abend.sortOrders['abendCode']=='ascending'}" />

       

      <h:inputText value="#{abend.abendCodeFilter}"

      onkeypress="if (event.keyCode == 13) {event.target.blur();event.stopPropagation();return false;} else {return true;};"

      style="width:66px;" label="Abend Code Filter">

      <a4j:ajax event="blur" render="tbl_abend_u scroller"

      execute="@this"></a4j:ajax>

      </h:inputText>

      </h:panelGrid>

       

      </f:facet>

      <h:outputText value="#{a.abendCode}" />

       

      </rich:column>

       

       

      <rich:column sortBy="#{a.comment}"

      filterExpression="#{fn:containsIgnoreCase(a.comment,abend.commentFilter)}"

      filterValue="#{abend.commentFilter}" filterType="custom"

      label="Commennt/Resolution" style="text-align: center"

      sortOrder="#{abend.sortOrders['comment']}" sortType="custom">

      <f:facet name="header">

      <h:panelGrid columns="2">

      <a4j:commandLink execute="@this" value="Comment/Resolution"

      style="text-decoration:none !important;" render="tbl_abend_u"

      action="#{abend.sort}">

      <f:param name="sortProperty" value="comment" />

       

      </a4j:commandLink>

      <h:graphicImage value="/resources/framework/img/arrow.png"

      rendered="#{abend.sortOrders['comment']=='descending'}" />

      <h:graphicImage value="/resources/framework/img/arrowUp.png"

      rendered="#{abend.sortOrders['comment']=='ascending'}" />

       

      <h:inputText value="#{abend.commentFilter}"

      onkeypress="if (event.keyCode == 13) {event.target.blur();event.stopPropagation();return false;} else {return true;};"

      style="width:66px;" label="comment Filter">

      <a4j:ajax event="blur" render="tbl_abend_u scroller"

      execute="@this"></a4j:ajax>

      </h:inputText>

      </h:panelGrid>

       

      </f:facet>

       

      <h:inputText value="#{a.comment}" id="comment" type="text">

       

      <a4j:ajax event="change" listener="#{abend.changeFields}"></a4j:ajax>

      <f:attribute name="abendId" value="#{a.abendId}"></f:attribute>

       

       

      </h:inputText>

       

      </rich:column>

      <rich:column sortBy="#{a.rc}"

      filterExpression="#{fn:containsIgnoreCase(a.rc,abend.rcFilter)}"

      filterValue="#{abend.rcFilter}" filterType="custom"

      label="Root Cause" style="text-align: center"

      sortOrder="#{abend.sortOrders['rc']}" sortType="custom">

      <f:facet name="header">

      <h:panelGrid columns="2">

      <a4j:commandLink execute="@this" value="Root Cause"

      style="text-decoration:none !important;" render="tbl_abend_u"

      action="#{abend.sort}">

      <f:param name="sortProperty" value="rc" />

       

      </a4j:commandLink>

      <h:graphicImage value="/resources/framework/img/arrow.png"

      rendered="#{abend.sortOrders['rc']=='descending'}" />

      <h:graphicImage value="/resources/framework/img/arrowUp.png"

      rendered="#{abend.sortOrders['rc']=='ascending'}" />

       

      <h:inputText value="#{abend.rcFilter}"

      onkeypress="if (event.keyCode == 13) {event.target.blur();event.stopPropagation();return false;} else {return true;};"

      style="width:66px;" label="rc Filter">

      <a4j:ajax event="blur" render="tbl_abend_u scroller"

      execute="@this"></a4j:ajax>

      </h:inputText>

      </h:panelGrid>

       

      </f:facet>

      <rich:select  id="rcDropdown" converter="rcConverter"

      valueChangeListener="#{abend.valueChange}">

      <f:selectItems  immediate="true" value="#{abend.rcList}"></f:selectItems>

      <f:attribute name="abendId" value="#{a.abendId}"></f:attribute>

       

       

      </rich:select>

       

      </rich:column>

      <rich:column sortBy="#{a.hpdef}"

      filterExpression="#{fn:containsIgnoreCase(a.hpdef,abend.hpdefFilter)}"

      filterValue="#{abend.hpdefFilter}" filterType="custom"

      label="Hpalm Defect" style="text-align: center"

      sortOrder="#{abend.sortOrders['hpdef']}" sortType="custom">

      <f:facet name="header">

      <h:panelGrid columns="2">

      <a4j:commandLink execute="@this" value="Hpalm Defect No."

      style="text-decoration:none !important;" render="tbl_abend_u"

      action="#{abend.sort}">

      <f:param name="sortProperty" value="hpdef" />

       

      </a4j:commandLink>

      <h:graphicImage value="/resources/framework/img/arrow.png"

      rendered="#{abend.sortOrders['hpdef']=='descending'}" />

      <h:graphicImage value="/resources/framework/img/arrowUp.png"

      rendered="#{abend.sortOrders['hpdef']=='ascending'}" />

       

      <h:inputText value="#{abend.hpdefFilter}" id="hpalm"

       

      style="width:66px;" label="hpdef Filter">

      <a4j:ajax event="blur" render="tbl_abend_u scroller"

      execute="@this"></a4j:ajax>

      </h:inputText>

      </h:panelGrid>

       

      </f:facet>

      <h:inputText value="#{a.hpdef}">

      <a4j:ajax event="change" listener="#{abend.changeFields}"></a4j:ajax>

      <f:attribute name="abendId" value="#{a.abendId}"></f:attribute>

      </h:inputText>

       

      </rich:column>

      </rich:dataTable>

      <br></br>

      <rich:dataScroller id="scroller"

                                 style="align:center;margin-left:230px;"

      page="#{abend.pageNumber}" renderIfSinglePage="false"

                                 for="tbl_abend_u" />

      <br />

      <br />

       

       

      <div id="buttons" style="display: flex;">

       

      <a4j:commandButton styleClass="buttonClass"

      style="margin-left:284px;width:58px;"

      action="#{abend.clearSort}" execute="@form"

      render="tbl_abend_u scroller" value="Reset" />

       

      <a4j:commandButton styleClass="buttonClass"

      style="margin-left:197px;width:58px;"

      action="#{abend.save}" execute="@form"

      render="tbl_abend_u scroller" value="Save" />

       

      <rich:notifyMessages stayTime="4000"></rich:notifyMessages>

       

      </div>

       

      <br></br>

       

      </h:form>

      </rich:panel>

      </ui:define>

             </ui:composition>

       

      </h:body>

      </html>