Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/354.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何更改displaytag sortproperty链接_Java_Displaytag - Fatal编程技术网

Java 如何更改displaytag sortproperty链接

Java 如何更改displaytag sortproperty链接,java,displaytag,Java,Displaytag,我正在应用程序中使用显示标记。在这种情况下,我需要根据列标题对表内容进行排序。列标题具有链接导航。相反,我需要在单击表列标题时提交表单。我们如何才能做到这一点 $('.sortable').each(function(event){ var obj = $(this).find('a').attr('href'); var urltext = 'javascript:submitform("'+contextPath+'/'+o

我正在应用程序中使用显示标记。在这种情况下,我需要根据列标题对表内容进行排序。列标题具有链接导航。相反,我需要在单击表列标题时提交表单。我们如何才能做到这一点

$('.sortable').each(function(event){ 
                var obj = $(this).find('a').attr('href'); 
                var urltext = 'javascript:submitform("'+contextPath+'/'+obj+'\")';  
                $(this).find('a').attr('href', urltext);
            }); 
到现在为止,我的申请表是这样的

<display:table id="data" name="lstEntities"
                        sort="external" uid="row" htmlId="rowid" class="tborder"
                        excludedParams="*" style="width:100%"
                        pagesize="${pageCriteria.recordsPerPage}" partialList="true"
                        size="${pageCriteria.totalRecords}" export="false"
                        requestURI="prestigeBrandListMDA.action">
                        <display:column property="brandId" sortName="brand.brandId"
                            sortable="true" titleKey="table.title.brandId"
                            style="width:100px" />

<thead>
<tr>
<th class="sortable">
<a href="prestigeBrandListMDA.action?d-16544-p=1&amp;d-16544-o=2&amp;d-16544-n=1&amp;d-16544-s=brand.brandId">Sales Brand Id</a></th>

相反,我需要像下面这样的链接

<thead>
<tr>
<th class="sortable">
<a href="#" onclick="javascript:submitform(prestigeBrandListMDA.action?d-16544-p=1&amp;d-16544-o=2&amp;d-16544-n=1&amp;d-16544-s=brand.brandId)">Sales Brand Id</a></th>


据我所知,使用displaytag无法做到这一点。使用JQuery动态更改链接。

据我所知,使用displaytag无法做到这一点。使用JQuery动态更改链接。

是的,我使用JQuery实现了此功能。谢谢。我使用以下代码实现了此功能

$('.sortable').each(function(event){ 
                var obj = $(this).find('a').attr('href'); 
                var urltext = 'javascript:submitform("'+contextPath+'/'+obj+'\")';  
                $(this).find('a').attr('href', urltext);
            }); 

是的,我使用Jquery来实现这个功能。谢谢。我使用以下代码来实现它

$('.sortable').each(function(event){ 
                var obj = $(this).find('a').attr('href'); 
                var urltext = 'javascript:submitform("'+contextPath+'/'+obj+'\")';  
                $(this).find('a').attr('href', urltext);
            });