You need to sign in to do that
Don't have an account?
Fan Yang
What's wrong with apex:repeat ?
When using repeat in my visulaforce page as follows, I'm having "Authorization Required" error:
<apex:repeat value="{!MyListData}" var="l">
<c:MyCustomComponent ... />
</apex:repeat>
if I hard code <c:MyCustomComponent ../>, which works fine. What's wrong? can anybody help? TVM.
Have you ensured that you've given permission to the guest user profile to see the custom objects and fields?
All Answers
Can you please post your controller/extension code.
--Sarah
I'm assuming you are using this VF page in a site, as I can't see how else you'd get an authorization required.
One thing to be aware of is that you'll end up on the authorization page if an error occurs in your controller, as the standard behaviour is to direct you to a platform error page.
Its worth turning debug logging on to see if there is an error generating your list.
My page has:
The debugger (monitor) logged:
in system log window:
Which works fine; however put them into visualforce page:
Empty table shows up, #of empty rows matched #of records; but all td are empty; what could be wrong?
Are you running the Visualforce as the same user that you are executing the code in the system log?
Also, your controller is declared as "with sharing", which means that you won't be able to see records that haven't been shared with you. When you run this is the system log, it will be without sharing which will show you everything.
Try changing your controller declaration to:
and see if that helps.
Yes, I used same use to execute the code in system log. I tried "without", which didn't help. Here are the monitor log (created for Site Guest user). You can see the there are correct row count returned. BTW, how to "share" my custom object in VF? Thanks!!
Have you ensured that you've given permission to the guest user profile to see the custom objects and fields?
It must be permission issue. How to grant "Site guest users" permission to Read or Write my custom object?
Figured out how to grant guest user RO permission to my custom object from the wiki: http://wiki.developerforce.com/index.php/Authenticating_Users_on_Force.com_Sites. TVM, Bob!!
Unfortunately you can't access the site guest profile through the regular profile setup pages.
On your site configuration page, there is a button entitled 'Public Access Settings'. If you click that it will take you through to the profile.