I am working with communities in a Salesforce org. I have a page that does a search for files using a commandLink with a param. Upon button click of the icon for the commandLink a controller method is called and returns the appropriate result based on the search string from the inputText. This all works correctly.
However, if I search using the exact same search string and hit the enter key, the POST fails and I do not get a response. I have a JS script that fires onKeyPress and checks for the enter key code. The script fires and gets to the point of calling the controller method and then nothing...
here is the script:
<script type="text/javascript"> function handleKeyPress(e){ var key = 0; if(window.event){ key = e.keyCode; }else if(e.which){ key = e.which; } if(key == 13){ console.log("We are about to call to call the controller method"); findFileMethod(); } } </script>