• KiloJ
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 6
    Replies

Hi there. I have created a site page that works fine. However I have a javascript popup that

appears after 7 seconds. It pops up but with the message - Authorization required.

I cannot seem to be able to fix this.

 

my vf page does not have any inputFields, nor does it use a controller of any kind.

It's just raw html/javascript/css.

 

I have added the page to the site and to the guest profile:

 

 

But what I get from my site page when the popup appears is:

 

Note: I have removed the URL from the screenshot.

 

Any ideas?
Many thanks

  • September 04, 2009
  • Like
  • 0

Hi There. I have a simple controller and VF page.

Here's my controller:

 

 

public class RepPlanningController { public String selectedSegmentation { get; set; } public String selectedStatus { get; set; } public String selectedRating { get; set; } public String selectedFilterLetter { get; set; } public Id idOfEventAccount { get; set; } public List<AccEventRecord> recordDataList { get; set; } private Map<Id,Event> cachedAccEventsMap { get; set; } public class AccEventRecord { public Account acc { get; set; } public Event ev { get; set; } //Each event field in each record in the VF pageBlockTable bind to this property. public AccEventRecord(Account acc) { this.acc = acc; this.ev = new Event(); } } public void queryForAccounts() { recordDataList = new List<AccEventRecord>(); cachedAccEventsMap = new Map<Id,Event>(); for(Account a : [Select Name, Id, Activity_Rating__c, Visit_Threshold_Rating__c From Account ORDER BY Name ASC]) recordDataList.add(new AccEventRecord(a)); } public PageReference saveSingleEvent() { if(idOfEventAccount != null) { for(AccEventRecord aer : recordDataList) { if(aer.acc.Id == idOfEventAccount) { System.debug('***** ACCOUNT TO ADD EVENT TO IS: ' + aer.acc.Name + ' : ' + aer.ev.ActivityDate + ' : ' + aer.ev.Subject + ' : ' + aer.ev.Type); break; } } } return null; } }

 and here's my VF page:

 

 

<apex:page controller="RepPlanningController" action="{!queryForAccounts}" tabStyle="Account" id="VFPage"> <apex:sectionHeader title="Cuenta" subtitle="Planificación" /> <apex:form style="padding-top:15px;"> <apex:pageBlock title="Todas Cuentas" id="accountTable"> <apex:pageBlockTable value="{!recordDataList}" var="accountRec" style="width:100%;"> <apex:column > <apex:facet name="header">Account Name</apex:facet> <apex:commandLink value="{!accountRec.acc.Name}" /> </apex:column> <apex:column > <apex:facet name="header">Event Date</apex:facet> <apex:inputField value="{!accountRec.ev.ActivityDate}" /> </apex:column> <apex:column > <apex:facet name="header">Event Subject</apex:facet> <apex:inputField value="{!accountRec.ev.Subject}" /> </apex:column> <apex:column > <apex:facet name="header">Event Type</apex:facet> <apex:inputField value="{!accountRec.ev.Type}" /> </apex:column> <apex:column style="padding-top:8px;"> <apex:commandLink action="{!saveSingleEvent}" value="Guardar" immediate="true" styleClass="btn" style="color:#FFF; padding:2px 5px 2px 5px; text-decoration:none;"> <apex:param value="{!accountRec.acc.Id}" assignTo="{!idOfEventAccount}" name="{!accountRec.acc.Id}" /> </apex:commandLink> </apex:column> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page>

 Unfortunately the system.debug in my controller method saveSingleEvent
 
always shows the Event fields as null for some reason even though there are inputFields binding

to the Event SObject in the class AccEventRecord. Has anyone got any ideas?
This is urgent!

 

many thanks

 

 

 

  • August 20, 2009
  • Like
  • 0

Hi there. I have created a site page that works fine. However I have a javascript popup that

appears after 7 seconds. It pops up but with the message - Authorization required.

I cannot seem to be able to fix this.

 

my vf page does not have any inputFields, nor does it use a controller of any kind.

It's just raw html/javascript/css.

 

I have added the page to the site and to the guest profile:

 

 

But what I get from my site page when the popup appears is:

 

Note: I have removed the URL from the screenshot.

 

Any ideas?
Many thanks

  • September 04, 2009
  • Like
  • 0

Hi There. I have a simple controller and VF page.

Here's my controller:

 

 

public class RepPlanningController { public String selectedSegmentation { get; set; } public String selectedStatus { get; set; } public String selectedRating { get; set; } public String selectedFilterLetter { get; set; } public Id idOfEventAccount { get; set; } public List<AccEventRecord> recordDataList { get; set; } private Map<Id,Event> cachedAccEventsMap { get; set; } public class AccEventRecord { public Account acc { get; set; } public Event ev { get; set; } //Each event field in each record in the VF pageBlockTable bind to this property. public AccEventRecord(Account acc) { this.acc = acc; this.ev = new Event(); } } public void queryForAccounts() { recordDataList = new List<AccEventRecord>(); cachedAccEventsMap = new Map<Id,Event>(); for(Account a : [Select Name, Id, Activity_Rating__c, Visit_Threshold_Rating__c From Account ORDER BY Name ASC]) recordDataList.add(new AccEventRecord(a)); } public PageReference saveSingleEvent() { if(idOfEventAccount != null) { for(AccEventRecord aer : recordDataList) { if(aer.acc.Id == idOfEventAccount) { System.debug('***** ACCOUNT TO ADD EVENT TO IS: ' + aer.acc.Name + ' : ' + aer.ev.ActivityDate + ' : ' + aer.ev.Subject + ' : ' + aer.ev.Type); break; } } } return null; } }

 and here's my VF page:

 

 

<apex:page controller="RepPlanningController" action="{!queryForAccounts}" tabStyle="Account" id="VFPage"> <apex:sectionHeader title="Cuenta" subtitle="Planificación" /> <apex:form style="padding-top:15px;"> <apex:pageBlock title="Todas Cuentas" id="accountTable"> <apex:pageBlockTable value="{!recordDataList}" var="accountRec" style="width:100%;"> <apex:column > <apex:facet name="header">Account Name</apex:facet> <apex:commandLink value="{!accountRec.acc.Name}" /> </apex:column> <apex:column > <apex:facet name="header">Event Date</apex:facet> <apex:inputField value="{!accountRec.ev.ActivityDate}" /> </apex:column> <apex:column > <apex:facet name="header">Event Subject</apex:facet> <apex:inputField value="{!accountRec.ev.Subject}" /> </apex:column> <apex:column > <apex:facet name="header">Event Type</apex:facet> <apex:inputField value="{!accountRec.ev.Type}" /> </apex:column> <apex:column style="padding-top:8px;"> <apex:commandLink action="{!saveSingleEvent}" value="Guardar" immediate="true" styleClass="btn" style="color:#FFF; padding:2px 5px 2px 5px; text-decoration:none;"> <apex:param value="{!accountRec.acc.Id}" assignTo="{!idOfEventAccount}" name="{!accountRec.acc.Id}" /> </apex:commandLink> </apex:column> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page>

 Unfortunately the system.debug in my controller method saveSingleEvent
 
always shows the Event fields as null for some reason even though there are inputFields binding

to the Event SObject in the class AccEventRecord. Has anyone got any ideas?
This is urgent!

 

many thanks

 

 

 

  • August 20, 2009
  • Like
  • 0