SELECT가 변경되었을 때 부분 템플릿 만 렌더링하려고합니다. 나는 onchange 및 remotFunction을 시도했지만 컴파일되지 않습니다. 내가 작성한 GSP에서 Grails가 선택시 변경시 부분 템플릿 렌더링
:<g:select name="sawMill" from="${prodBuffer}" value="" onchange="${remoteFunction(action: 'availableProducts')}"/>
컨트롤러에
: 오류
def availableProducts() {
render(template:"AvailableProductData", model:[prodBuffer: getBufferList()])
}
:
Class
groovy.lang.MissingMethodException
Message
Request processing failed; nested exception is org.grails.gsp.GroovyPagesException: Error processing GroovyPageView: [views/orders_and_Store/list.gsp:154] Error executing tag <g:form>: Error evaluating expression [remoteFunction(action: 'availableProducts')] on line [24]: No signature of method: D__Grails_projects_torntrading_grails_app_views_orders_and_Store_list_gsp.remoteFunction() is applicable for argument types: (java.util.LinkedHashMap) values: [[action:availableProducts]]
Caused by
No signature of method: D__Grails_projects_torntrading_grails_app_views_orders_and_Store_list_gsp.remoteFunction() is applicable for argument types: (java.util.LinkedHashMap) values: [[action:availableProducts]]
내가 다른 솔루션을 많이 봤어요 하지만 그들은 더 복잡합니다, 나는 단지 Gsp의 조각을 렌더링하고 싶을 때 선택 변경과 나는 어떤 매개 변수가 필요하다고 생각하지 않습니다.
Grails 3를 사용하는 경우이 종속성을 앱에 추가해야합니다 (권장하지 않음). https://plugins.grails.org/plugin/grails/ajax-tags –