[
https://issues.apache.org/jira/browse/WW-3867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13442311#comment-13442311
]
Anna Gadomska commented on WW-3867:
-----------------------------------
Johannes Geppert thank you very much, this solved my problem.
> Grid - click on any row selects always 1 row of the grid.
> ---------------------------------------------------------
>
> Key: WW-3867
> URL: https://issues.apache.org/jira/browse/WW-3867
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - Tags
> Environment: Struts 2.3.4
> Reporter: Anna Gadomska
>
> I am creating GridView with:
> {code}
> <sjg:grid id="listData" dataType="json"
> href="%{listAction}" pager="true" gridModel="list"
> gridview="true" rowList="10,20,30,50,100" rowNum="10"
> autowidth="true">
> {code}
> where:
> {code}
> <s:url id="listAction" action="list-data-action">
> <s:param name="param" value="%{paramValue}" />
> </s:url>
> {code}
> I define Grid data as:
> {code}
> <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" />
> {code}
> 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:
> {code}
> <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>
> {code}
> 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!
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira