You need to sign in to do that
Don't have an account?
Austin Davis 8
My variables won't pass to controller.
I have a variable I am trying to pass to the controller, but it is not working. According to several posts I've seen it should work. Here's my code:
VF:
Controller:
I am however, getting a XmlHTTPSynchronous error that when expanded says that it is related to the onclick event shown above. I've tried several different methods of sending variables to the controller, but none have worked so far. I have also tried putting async=true in many places, but maybe not the right one. Any and all help would be appreciated. Thanks in advance.
VF:
<apex:actionFunction action="{!clickedRow}" name="call_clickedRow"> <apex:param value="" assignTo="{!selectedRow}"/> </apex:actionFunction> <apex:repeat value="{!object1}" var="var1"> <tr onclick="call_clickedRow({!var1.Name}); alert({!selectedRow});"> //................................................. //................................................. </tr> <apex:repeat>
Controller:
public String selectedRow{ get; set; } public PageReference clickedRow(){ return null; }
I am however, getting a XmlHTTPSynchronous error that when expanded says that it is related to the onclick event shown above. I've tried several different methods of sending variables to the controller, but none have worked so far. I have also tried putting async=true in many places, but maybe not the right one. Any and all help would be appreciated. Thanks in advance.
https://success.salesforce.com/issues_view?id=a1p300000008XHaAAM
add rerender to actionfunction:
(reRender updates the result of display)
Best Regards!
Uncaught SyntaxError: Unexpected token :
Troubleshoot process I took:
1. Action: Commented out onclick event
Result: Error Remained
2. Action: emptied rerender quotations
Result: Error Remained
3. Action: changed value on param from "" to "null"
Result: Error Remained
4. Action: got rid of rerender attribute
Result: No Error; Original Issue persists
I looked into the chrome console and there seemed to be an error in the javascript code that was generated from the apex code.
<script id="j_id0:j_id2:j_id4:j_id11:j_id16" type="text/javascript">setSelectedRow=function(j_id0:j_id2:j_id4:j_id11:j_id17)..........
Error seems to occur Here ^