0
나는 grails 포틀릿 플러그인을 사용하고 있으며, 아약스 메소드를 라우트하는 방법을 알아 내려고하고있다.liferay ajax urls?
<portlet:actionURL>
은 GSP로 모델을 반환 할 수있는 메소드에만 매핑되는 것 같습니다. <portlet:resourceURL>
은 내 포틀릿에서 전혀 맞지 않습니다.
class MyPortlet {
def title = 'MyPortlet'
def description = '''
My Portlet
'''
def displayName = 'MyPortlet'
def supports = ['text/html': ['view']]
def liferay_display_category = 'MyPortlet'
def liferay_portlet_header_portlet_css = [
...
]
def liferay_portlet_header_portlet_javascript = [
...
]
def renderView = {
[...]
}
def actionView = {
[...]
}
}
JS : I 중 하나가 (resourceURL에 대한) 내 방법을 때리지 마세요
this.portletUrl = "${portletResponse.createResourceURL()}";
또는 this.portletUrl = "${portletResponse.createActionURL()}";
내가 AJAX GET
또는 POST
요청에 이러한 URL 중 하나를 공격하면, 또는보기 (actionURL)를 렌더링하는 것만 보입니다.
liferay를 통해 올바르게 수행하는 방법을 알려주세요.