You need to sign in to do that
Don't have an account?
MaggieSumit
Hi i am using my VF page to sites i am not getting Save Button, if i am using that VF page without sites force.com then save button will be shown?
Without using Sites Force.com
With Sites Force.com
<!--Page-->
<apex:page standardController="Lead" extensions="contollertest">
<apex:form >
<apex:pageblock id="pgb">
<apex:pageBlockButtons >
<apex:commandButton value="edit" action="{!editProcess}" rendered="{!Not(isEdit)}" reRender="pgb"/>
<apex:commandButton value="save" action="{!save}" rendered="{!isEdit}" reRender="pgb"/>
</apex:pageBlockButtons>
<!-- Display Account related Contacts -->
<apex:pageBlockTable value="{!lstQuestion}" var="val" rendered="{!Not(isEdit)}">
<apex:commandButton value="save" action="{!save}"/>
<apex:column value="{!val.Que1__c}"/>
<apex:column value="{!val.Que2__c}"/>
<apex:column value="{!val.Que3__c}"/>
</apex:pageBlockTable>
<apex:outputPanel rendered="{!Not(isEdit)}">
<apex:commandButton action="{!addQuestion}" value="Question" reRender="pgb"/>
</apex:outputPanel>
<apex:pageBlockTable value="{!lstQuestion}" var="val" rendered="{!(isEdit)}">
<apex:column headerValue="Q.What is budget?">
<apex:inputField value="{!val.Que1__c}"/>
</apex:column>
<apex:column headerValue="Q.When do you want?">
<apex:inputField value="{!val.Que2__c}"/>
</apex:column>
<apex:column headerValue="Q.Would like Video?">
<apex:inputField value="{!val.Que3__c}"/>
</apex:column>
</apex:pageBlockTable>
</apex:pageblock>
</apex:form>
</apex:page>
With Sites Force.com
<!--Page-->
<apex:page standardController="Lead" extensions="contollertest">
<apex:form >
<apex:pageblock id="pgb">
<apex:pageBlockButtons >
<apex:commandButton value="edit" action="{!editProcess}" rendered="{!Not(isEdit)}" reRender="pgb"/>
<apex:commandButton value="save" action="{!save}" rendered="{!isEdit}" reRender="pgb"/>
</apex:pageBlockButtons>
<!-- Display Account related Contacts -->
<apex:pageBlockTable value="{!lstQuestion}" var="val" rendered="{!Not(isEdit)}">
<apex:commandButton value="save" action="{!save}"/>
<apex:column value="{!val.Que1__c}"/>
<apex:column value="{!val.Que2__c}"/>
<apex:column value="{!val.Que3__c}"/>
</apex:pageBlockTable>
<apex:outputPanel rendered="{!Not(isEdit)}">
<apex:commandButton action="{!addQuestion}" value="Question" reRender="pgb"/>
</apex:outputPanel>
<apex:pageBlockTable value="{!lstQuestion}" var="val" rendered="{!(isEdit)}">
<apex:column headerValue="Q.What is budget?">
<apex:inputField value="{!val.Que1__c}"/>
</apex:column>
<apex:column headerValue="Q.When do you want?">
<apex:inputField value="{!val.Que2__c}"/>
</apex:column>
<apex:column headerValue="Q.Would like Video?">
<apex:inputField value="{!val.Que3__c}"/>
</apex:column>
</apex:pageBlockTable>
</apex:pageblock>
</apex:form>
</apex:page>
I thing there is a mistake on page :
<apex:pageBlockTable value="{!lstQuestion}" var="val" rendered="{!Not(isEdit)}">
<apex:commandButton value="save" action="{!save}"/>you are write save button with in apex table so you need to show button out side the table.
Then you code works fine . Or if you want to show button in table than crate it in <apex:column>.
Thanks.
Since, everything is working fine in VF, but not on Sites.
I think its because of access restrcitions on this object.
As you are using standard controller and method, its by default stopping any guest user from performing any action on the object
(Remember that sObjects are tightly bound with underlying Objects)
To help solve your problem, you need to give read & write access to guest users on all those objects which are exposed on the sites.
Dive deep into user level, object level and field level permissions to make sure that only those fields are exposed that the guest users on your sites need.
If this helps you out, please mark it as Best Answer
https://help.salesforce.com/HTViewHelpDoc?id=sites_public_access_settings.htm
If this helps you out, please mark it as Best Answer