Announcement Announcement Module
Collapse
No announcement yet.
@ResourceMapping in Jboss EPP server. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • @ResourceMapping in Jboss EPP server.

    Hi,

    We are doing a Ajax call to a Method in the controller annotated with @ResourceMapping.

    Following is the code.

    jsp file with Ajax call:

    <script src='<c:url value="/js/jquery.min.js"/>'>
    </script>
    <script>
    function searchResult(){
    $.ajax("<portlet:resourceURL id='searchBook'><porletaram name='book' value='"+$('#searchBox').val()+"'/></portlet:resourceURL>").done(function(data){alert(" came back");});
    }
    </script>
    <h2>Search Form</h2>
    <br />
    <label>Search Word:</label>
    <input type="text" id="searchBox" onKeyUp="searchResult()" />
    <br />
    <div id="results"></div>

    Controller:
    @Controller
    @RequestMapping(value="VIEW")
    public class ajaxCallController{

    @ResourceMapping("searchBook")
    public ModelAndView performLooseSearch(ResourceRequest request,ResourceResponse response)
    {
    System.out.println("------------------>"+request.getResourceID());
    System.out.println("------------------>"+request.getParameter("book"));
    System.out.println("***************success******** *******");
    return new ModelAndView("data","success","true");
    }



    }


    This code is perfectly working fine on Liferay but on JBoss EPP it works only if we do not provide an ID for the @ResourceMapping annotation and at the same time it does not even identify the params being passed.

    In JBoss EPP or gatein the sops return null where as in Liferay the actually values gets printed.

    Should this be a problem with the Server or do we have another approach.

    Please help!

    Regards,
    Anish
Working...
X