• Pota
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies

Hi All,

 

I am trying to Logout current User in Custom Salesforce sites....but i am getting this error:  

 

"java.lang.IllegalArgumentException: Illegal view ID null/Logout. The ID must begin with /"

 

My Code is :

 

In VF page

<apex:page action="{!logoutCurrentUser}"  controller="SiteLoginController" standardStylesheets="false" title="Login" showHeader="false" sidebar="false">

 

and Controller:

 

public PageReference logoutCurrentUser(){
return UserInfo.getUserType() != 'Guest' ? new PageReference(Site.getCurrentSiteUrl() + '/Logout') : null ;
 }

 

Can any one help me out of this?

 

 

Thanks in advance  :)

 

  • February 26, 2013
  • Like
  • 0

Hi All,

 

I am trying to Logout current User in Custom Salesforce sites....but i am getting this error:  

 

"java.lang.IllegalArgumentException: Illegal view ID null/Logout. The ID must begin with /"

 

My Code is :

 

In VF page

<apex:page action="{!logoutCurrentUser}"  controller="SiteLoginController" standardStylesheets="false" title="Login" showHeader="false" sidebar="false">

 

and Controller:

 

public PageReference logoutCurrentUser(){
return UserInfo.getUserType() != 'Guest' ? new PageReference(Site.getCurrentSiteUrl() + '/Logout') : null ;
 }

 

Can any one help me out of this?

 

 

Thanks in advance  :)

 

  • February 26, 2013
  • Like
  • 0

Here's something that would have saved me some time if I had found it by searching. I have a pageBlockSection with two columns, and I wanted to include two fields in one column with a single label applied to both fields, just like the Contact Edit page where the label "First Name" appears before the Salutation and FirstName fields.

 

Only the label was not aligning with the other labels in the same column, until I tried the following. To my surprise, VF didn't recognize this as more than two child components. Hope it helps someone!

 

<apex:pageBlockSectionItem >
                  <apex:outputLabel value="First Name"/>
                  <apex:inputField value="{!Contact.Salutation}">
                      <apex:inputField value="{!Contact.FirstName}"/>
                  </apex:inputField>
</apex:pageBlockSectionItem>

How to write Validation rule using if condition can any one help