Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3867

Grid - click on any row selects always 1 row of the grid.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • None
    • None
    • Plugin - Tags
    • None
    • Struts 2.3.4

    Description

      I am creating GridView with:

      <sjg:grid id="listData" dataType="json"
      href="%{listAction}" pager="true" gridModel="list"
      gridview="true" rowList="10,20,30,50,100" rowNum="10"
      autowidth="true">
      

      where:

      <s:url id="listAction" action="list-data-action">
      <s:param name="param" value="%{paramValue}" />
      </s:url>
      

      I define Grid data as:

      <sjg:gridColumn id="timestamp" name="timestamp" index="timestamp"
      title="date/time" formatter="date"
      formatoptions="{newformat : 'd/m/Y H:i', srcformat : 'Y-m-d H:i:s'}"
      sortable="true" width="50" />
      <sjg:gridColumn name="packageName" index="packageName"
      title="package name" sortable="true" width="90"
      formatter="funcTestDetails" />
      <sjg:gridColumn name="executionTime" index="executionTime"
      title="execution time" sortable="true" width="50" />
      <sjg:gridColumn name="testsCount" index="testsCount" title="total"
      sortable="true" width="20" />
      

      Grid is populated with data properly, but when I click on any row - the first one is highlighted always.
      I analized code with FireBug. Created table is:

      <tbody>
      <tr class="jqgfirstrow" style="height:auto" role="row">
      <tr id="null" class="ui-widget-content jqgrow ui-row-ltr ui-state-highlight" role="row" tabindex="0" aria-selected="true">
      <tr id="null" class="ui-widget-content jqgrow ui-row-ltr" role="row" tabindex="-1">
      <tr id="null" class="ui-widget-content jqgrow ui-row-ltr" role="row" tabindex="-1">
      <tr id="null" class="ui-widget-content jqgrow ui-row-ltr" role="row" tabindex="-1">
      <tr id="null" class="ui-widget-content jqgrow ui-row-ltr" role="row" 
      (...)
      </tbody>
      

      id for each tr is null. when I modify it by hand (put 1,2,3 ...) highlight works properly.

      is there any workround to make it work properly or is there some bug in implementation.

      I create other grid with data, and it works properly. My observation is, that in >working< grid I have field called "ID" in the table, but I don't think it is related?

      Help appreaciated a lot.
      Thanks!

      Attachments

        Activity

          People

            Unassigned Unassigned
            klempusia Anna Gadomska
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: