Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/309.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
Liferay jquery函数无法重定向到自定义portlet中的actionURL_Liferay_Portlet_Liferay 6 - Fatal编程技术网

Liferay jquery函数无法重定向到自定义portlet中的actionURL

Liferay jquery函数无法重定向到自定义portlet中的actionURL,liferay,portlet,liferay-6,Liferay,Portlet,Liferay 6,我有一个jquery函数,当我在自定义liferay portlet中单击列的编辑图标时,它将重定向到我的编辑页面 但是当我点击图标时,它只是重新加载页面,而不是重定向到我想要的页面 这是我的view.jsp代码 我的PORTLET操作URL代码 <portlet:actionURL var="editrestaurantURL" > <portlet:param name="jspPage" value="/jsps/edit_restaurant.jsp"/>

我有一个jquery函数,当我在自定义liferay portlet中单击列的编辑图标时,它将重定向到我的编辑页面

但是当我点击图标时,它只是重新加载页面,而不是重定向到我想要的页面

这是我的view.jsp代码

我的PORTLET操作URL代码

<portlet:actionURL var="editrestaurantURL" >
<portlet:param name="jspPage" value="/jsps/edit_restaurant.jsp"/>

单击jquery将调用我的列

<td class="editable"><%=temprest.getName() %></td>

这是我的脚本代码

<script>
                    $(document).ready(function() {     
                        $(".editable").hover(function(){
                            $(this).append("<i class='splashy-pencil_right'></i>")
                        }, function(){
                            $(this).children("i").remove();
                        });                        
                        $(".editable").click(function(){
                            $.colorbox({
                                initialHeight: '0',
                                initialWidth: '0',
                                href: "#confirm_dialog",
                                inline: true,
                                opacity: '0.3',
                                onComplete: function(){
                                    $('.confirm_yes').click(function(e){
                                        e.preventDefault();
                                        window.location.href = "<%=editrestaurantURL.toString() %> ";
                                        $.colorbox.close();
                                    });
                                    $('.confirm_no').click(function(e){
                                        e.preventDefault();
                                        $.colorbox.close(); 
                                    });
                                }
                            });
                        });
                        //* show all elements & remove preloader                        
                        setTimeout('$("html").removeClass("js")',1000);
                    });
                </script>   

$(文档).ready(函数(){
$(“.editable”).hover(函数(){
$(this.append(“”)
},函数(){
$(this.children(“i”).remove();
});                        
$(“.editable”)。单击(函数(){
$彩色盒({
初始高度:“0”,
initialWidth:'0',
href:“确认对话框”,
是的,
不透明度:“0.3”,
onComplete:function(){
$('.确认_是')。单击(函数(e){
e、 预防默认值();
window.location.href=“”;
$.colorbox.close();
});
$('.确认编号')。单击(功能(e){
e、 预防默认值();
$.colorbox.close();
});
}
});
});
//*显示所有元素并删除预加载程序
setTimeout(“$”(“html”).removeClass(“js”)”,1000);
});

任何人都可以告诉我问题出在哪里?我不知道哪里出了问题。

URL的定义:

<portlet:actionURL var="editrestaurantURL" >
    <portlet:param name="jspPage" value="/jsps/edit_restaurant.jsp"/>
</portlet:actionURL>
...
window.location.href = "${editrestaurantURL}";
...