I have the following code in sandbox. Created a Site with the following visualforce page as the "Active Site Home Page" and given read access to the Case object.
But when i visit the SiteURL, i only get a result '0'.
When i access to the visualforce page directly, it gives me the right Case count in the sandbox.
Tested with showHeader=false or true is also the same. What did i missed?
APEX:
global class testtPageController {
public static Case[] testCaseList { get; set; } public testPageController() { } // empty constructor
@RemoteAction global static Case[] getTestCaseList() {
Could you please provide your code, It would be helpfull to figure out the issue.
hi if you look here this is similar
http://boards.developerforce.com/t5/Force-com-Sites/Apex-webservice-from-ajax-on-sites-page-not-working/td-p/290173
No Issues in javascript remoting from Sites just used it , working fine. Please provide your code.
did u do it with showHeader=false
I have the following code in sandbox. Created a Site with the following visualforce page as the "Active Site Home Page" and given read access to the Case object.
But when i visit the SiteURL, i only get a result '0'.
When i access to the visualforce page directly, it gives me the right Case count in the sandbox.
Tested with showHeader=false or true is also the same. What did i missed?
APEX:
global class testtPageController {
public static Case[] testCaseList { get; set; }
public testPageController() { } // empty constructor
@RemoteAction
global static Case[] getTestCaseList() {
String querycase = 'select Id from Case';
testCaseList = database.query(querycase);
return testCaseList;
}
}
Visualforce Page:
<apex:page controller="testtPageController" showHeader="false" sidebar="false" standardStylesheets="true">
<script type="text/javascript">
Visualforce.remoting.Manager.invokeAction(
'{!$RemoteAction.testPageController.getTestCaseList}',function(result, event){
if (event.status && event.result) {
alert(result.length);
}
else{
alert(event.message);
}
},{escape:false});
</script>
Hi
I am also facing the same probelm. If any body provides the solution would be great helpful
Thanks,
Swarnaja