• simha
  • NEWBIE
  • 50 Points
  • Member since 2009

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 11
    Replies
While I still haven't solved the problem of cloning a none-existing "Customer Portal User" profile (re: http://community.salesforce.com/sforce/board/message?board.id=general_development&thread.id=31323 ), I managed to get past it by cloning the "Customer Portal Manager" instead (since this is presumably a manager, I'm sure doing this in a professional environment is probably a formula for trouble, but that's not what this message is about).

I set up the custom portal to accept registrations, but something seems to be wrong.

I go to my portal and try to create a new user. When I submit the details, I get the following error:


Error:
Your request cannot be processed at this time. The site administrator has been alerted.

The e-mail I get states:

The default new user profile is not assigned to the portal. Registration from chapter_14 is not able to create portal users.


How do I assign the default new user profile to the portal? (Shouldn't selecting it as the default be enough?)

Hi ,

        Im creating an application in flex and using salesforce as backend. In the application When the user logs in the data is checked in the salesforce contacts object(log in details are stored in contact object for each contact) and contactid is sent back to flex if the user exist. and we are passing the salesforce contactid through eachpage url until he logs out. but the problem is when some one copies the url (ex:www.example.com/module?id=xxx00012145454) after contact has loged in they can access the remaining part of the website . I need to restrict this how can i do this. Im not using any server side scripting, im using only salesforce and flex 3.

  • November 20, 2009
  • Like
  • 0

Hi every one,

 

       I wrote a code when page loads, which checks the todays date and time if today date is 9th nov and time is 12.30 pm the code returns null and do rest of the thing else if today is not 9th nov and time is not 12.30  pm it will return to an error message page displaying pleaseopen it on 9 th nov 12.30 pm  to 1 pm.

 

and here is my code.

 

<apex:page showHeader="false" controller="checkmailid" action="{!checkdate}">      

 

APex class 

public PageReference checkdate()
    {      
        PageReference pageRef;
        DateTime t = DateTime.now();        
        if('11-9-2009'!=t.month()+'-'+t.day()+'-'+t.year())//checks today date    
        {                        
            pageRef = new PageReference('http://free-12415f14c3a-124c73aaa62.force.com/registerfor/errormsg?error=dates');                                 
            pageRef.setRedirect(true);                    
            return pageRef;         
        }        
        else //if today date is equal to given date       
        {            
            if(t.Hour()==12)     //this checks if time is equal to 12.30 or not.      
            {                
                if(t.Minute()>=30 )                
                {                        
                    return null;                
                }                
                else                
                {                    
                    pageRef = new PageReference('http://free-12415f14c3a-124c73aaa62.force.com/registerfor/errormsg?error=dates');                                 
                    pageRef.setRedirect(true);                    
                    return pageRef;                 
                }            
            }            
            else            
            {                
                pageRef = new PageReference('http://free-12415f14c3a-124c73aaa62.force.com/registerfor/errormsg?error=dates');                             
                pageRef.setRedirect(true);                
                return pageRef;             
            }        
      }
        return null;
    }

 

when i wrote and tested it on developer edition its working perfectly and when i made it as a package and uploaded it to free edition this time  functionality is not working.

 

 

can any one know what is  wrong with it? why is it not workingin free edition public sites.

 

 

  • November 09, 2009
  • Like
  • 0

Hi ,

 

     Im New to salesforce i just want  to know is there any library files in apex

i.e like

    using system.web; in .net is there any  posibilities like this?

   

  • September 15, 2009
  • Like
  • 0

Hi,

  Im using  webservice to connect to .NET then im passing an array of records to the .net for that im planing to pass through the 2-dimensional array string, but im getting errors while declaring the 2-d array strings.

 

IS there any possibility to do this please guide me,

 

Thank you,

 Saran

 

  • August 25, 2009
  • Like
  • 0

Hi,

 

        Im developing a visualforce page where  i have zipped the images and scripts in "Application Form.Zip" file and uploaded it in static resources with "Application" as its name .

 

Then  in my visual force page  i tried to call the java script and image using {!URLFOR($Resource.---,'......')}

but i cant able to access either JAva script or the images From the Static Resource

 

here is the part of the Code(not able to access)

<apex:image value="{!URLFOR($Resource.Application,'Application Form/Images/Application/Activites Page.jpg')}"/>

 

<apex:includeScript value="{!URLFOR($Resource.Application,'/Application Form/scripts/PopBox.js')}"/>   

 

 If iupload the each file separetly instead of doing Zip i can able to acess the files like (i can access this)

 

 <apex:includeScript value="{!$Resource.popboximage}"/>  

<apex:image value="{!$Resource.crsedtls}" />

 

 

IF any body knows how to do it can u please help me....

 

 

thanks.

 

Regards,

simha.

  • August 03, 2009
  • Like
  • 0

Hi ,

         Impresently working on google maps where my requirement is " if i click on any area on the map then it want to display the info window with + symbol(maximize option if i  click the maximize symbol the page want to be maximized" But imunable to get it

 

Here is my code

 

 <apex:page showheader="false">
<script type="text/javascript"
            src="http://www.google.com/jsapi?key=ABQIAAAArtg5_f2MTnCS3zqk-6m8fhQLWOUk26jSql-xn4eioGKHI4q3YhQGvHVkFrDClwasaob_g_gPqZDjlw"></script>   
    
    <script type="text/javascript">    
      function initialize() {

        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(37.4419, -122.1419), 4);
        var marker = new GMarker(map.getCenter());
        map.addOverlay(marker);
        GEvent.addListener(marker, 'click', function() {
          var maxContentDiv = document.createElement('div');
          maxContentDiv.innerHTML = 'Loading...'
          marker.openInfoWindowHtml("<div style='padding:5px'>Click maximize button for more info about the Google Bar!</div>",
            {maxContent: maxContentDiv,
             maxTitle: "More Info"});

          var iw = map.getInfoWindow();
          GEvent.addListener(iw, "maximizeclick", function() {
            GDownloadUrl("ajax_content.html", function(data) {
              maxContentDiv.innerHTML = data;
            });
          });
        });
      
    }

      google.setOnLoadCallback(initialize);
    </script>

 <body onunload="GUnload()">
    <div id="map" style="width: 500px; height: 500px"></div>
    <div id="searchcontrol"></div>
 </body>
</apex:page>

 

 

the example is in this adress and  i used the same code 

 

http://gmaps-samples.googlecode.com/svn/trunk/megawindow/maxcontent_ajax.html

 

 

 

 

  • July 09, 2009
  • Like
  • 0

Hi

          Im practicing on the Customer portal, Using developer guide 14 chapter i able to create a login page for customer portal and users can able to sign up every thing is going on correctly , but when a new user Register for a customer account he is not able to reciving the email about his registration has successfully completed, but if the forgot password is used they are able to recive the mail alert. If anyonehaveidea about this please help me

  • July 02, 2009
  • Like
  • 0

Hi

    In a java script i have done some callculations and i  want to pass dat value to the apex class .

 

 for this i just used the apex function tag but how can i pass the parameter for a function?

 

this is my Visualforce code 

 

<script>

....

...

..

Age = CDateArr[3] - BDateArr[3];
document.getElementById('ageop').value = Age; 

agesend();

....

....

....

</script>

<apex:actionFunction name="agesend" action="{!age}"/>

 

 

 

apex code is

 

string ageval;

 ...

....

public void age(ages)
{
    this.ageval=ages;
}

 

if any one know the solution please help me

  • June 23, 2009
  • Like
  • 0

Hi I have a small problem in Visual Force development

 

Im creating an application in which I used Tabpanel in which each tab contains Some fields  Where when the user enters the value and click Next Button It must check the Values for validation and Displays an error message if any thing is wrong and if every thing is Correct it should Redirect To Next Page .  For this Validations I used Java Script in the Visual Force Code and for navigate to next Page i used Apex Code . Where in java script If everything is Correct im calling the action function to navigate to the Next page . Every thing is going correct But at the time to navigate to next page its going to next page and again coming back to the previous page for 2 to 3 times after several button clicks on NEXT BUTTOn its going and staying in the next page. For other tabs where i dint givn any javascript its directly redirecting to next page with out any problem.

 This Problem is occuring in Mozilla firefox but its navigating corectly some times in IE and Opera

Here is the Code VF code

 

 


           <apex:tab id="PDetails" label="Personal Details" title="Personal Details" disabled="{!istab1disabled}">

           <apex:pageBlockSection title="Personal Details">
                    <apex:form >    

                         <p><apex:outputLabel value="Date Of Birth"/></p>
                         <apex:inputField value="{!Application__c.Date_Of_Birth1__c}" id="dobid" />
                         <script>
                             function check() {
                                var nation = document.getElementById('{!$Component.nationality}').value;
                        
                                if(nation!="INDIAN")
                                {
                                    alert("U MUST BE AN INDIAN");                                   
                                }         
                                else
                                {
                                    nextpage();
                                }
                            }
                         </script>

                        <p><apex:outputLabel value="Nationality"/></p>
                        <apex:inputField value="{!Application__c.Country_Of_Citizenship__c}" id="nationality"/>
                       <apex:actionFunction name="nextpage" action="{!enabletab2}" reRender="maintab"/>
                        <Apex:commandButton value="NEXT"  onclick="check()" reRender="maintab" />

                        <Apex:commandButton value="PREVIOUS"  action="{!enabletab0}" rerender="maintab" />
                        <apex:commandButton value="Cancel"  action="{!nothing}"  />                       
                   </apex:form>
               </apex:pageBlockSection>
            </apex:tab>   

             <apex:tab id="CDetails" label="Contact Details" title="Contact Details" disabled="{!istab2disabled}">
                <apex:pageBlockSection title="Mailing Address">
                    <apex:form >

                            ................

                              ................

                     </apex:tab>

 

 

Apex CODE

 

 

public void enabletab1()  
{
selectedtab = 'Personal Details';
}
public void enabletab2()
{
selectedtab = 'Contact Details';
}

public void enabletab3()
{
selectedtab = 'Education information';
}

 

  • June 13, 2009
  • Like
  • 0

Hello everybody,

 

                Im Creating an application form where i have Application__c object in force.com and i break that into several pages in visualforce like  courses offered in one page personal details in one page, Educational details in one page and my targt is when i select a course  and click the next button i want to get the Personal Details page  but im unable to getting it i tried alot but its displaying the current page it self if any body aware of this can u pls help me 

 

Courses offerd page :

 

 

(courses url              :https://..... /apex/appcrses)

( personaldetails url :https://..... /apex/sample1)

 

<apex:page standardController="Application__c" showHeader="false" sidebar="false" tabStyle="Application__c" extensions="appext1" >
    <style>
        .activeTab {background-color: #236FBD; color:white; background-image:none}
        .inactiveTab { background-color: lightgrey; color:black; background-image:none}
    </style>
      <u><font style="Verdana" size="6" color="green"> <b>COURSE DETAILS</b> </font></u><br></br><br></br>
    <apex:tabPanel switchType="client" selectedTab="Streams" id="theTabPanel">
        <apex:tab label="B.Tech" name="B.Tech" id="tabdetails" >
            <apex:form style="align=Center">
                <apex:selectRadio value="{!btech}" layout="pageDirection">
                <apex:selectOptions value="{!items}" rendered="true"/>
                </apex:selectRadio>
            </apex:form>
        </apex:tab>
        <apex:tab label="M.Tech" name="M.Tech" id="tabContact">
            <apex:form style="align=Center">
                <apex:selectRadio value="{!mtech}" layout="pageDirection">
                <apex:selectOptions value="{!items}" rendered="true"/>
                </apex:selectRadio>
            </apex:form>
        </apex:tab>
        <apex:tab label="Pharmacy" name="Pharmacy" id="tabOpp">
            <apex:form style="align=Center">
                <apex:selectRadio value="{!pharma}" layout="pageDirection">
                <apex:selectOptions value="{!pitems}" rendered="true"/>
                </apex:selectRadio>
            </apex:form>   
        </apex:tab>
        <apex:tab label="Arts" name="Arts" id="tabOpenAct">
            <apex:form style="align=Center">
                <apex:selectRadio value="{!arts}" layout="pageDirection">
                <apex:selectOptions value="{!artitems}" rendered="true"/>
                </apex:selectRadio>
            </apex:form>
        </apex:tab>
        <apex:tab label="Other" name="others" id="tabNoteAtt">
            <apex:form style="align=Center">
                <apex:selectRadio value="{!other}" layout="pageDirection">
                    <apex:selectOptions value="{!otheritems}" rendered="true"/>
                </apex:selectRadio>              
            </apex:form>
        </apex:tab><apex:form >
        <apex:commandButton value="SAVE and NEXT " action="{!next}" /></apex:form>       
    </apex:tabPanel>
</apex:page>

 

 

 

class

 

public class appext1
{
    Application__c application;
//   ApexPages.StandardController Controller = new ApexPages.StandardController(application);          
    public appext1(ApexPages.StandardController controller)
    {
        this.application=(Application__c)controller.getRecord();       
    }
    string courses;
    public string lastcourses;
    public string laststreams;

    ......

    .......

    .........

    public pageReference next()
    {    
        lastcourses=courses;     
       /* String newPageUrl = '/apex/sample1';

            PageReference newPage =new PageReference(newPageUrl);

       */
        PageReference newPage = page.sample1;
        newPage.setRedirect(true);
        return newPage;   
    }

}

 

 

  • May 22, 2009
  • Like
  • 0

Hello every body im creating an application using force.com

First of all i created Application tab in which i have inserted the DateOfBirth field with date data type , every thing is going well but the problem is  in dateof birth field calender is .(1) i want the values from 1950 to present year and (2)want to increment a year when the new year comes .

 

Can u pls help me if any body know how to do it

 

 

 

 

Message Edited by simha on 05-13-2009 12:36 AM
  • May 13, 2009
  • Like
  • 0

Hello Every body,

                    Im creating an App in which i want to select  a value from  a selectedlistoptins  which want to change the values in other selected list

 

i.e if i selected "Engineering" option in streams selected list i want to display "IT, CSE,ECE, MECH, .." in Course selected list .

 

 

 Visual Force code is

 

 

<apex:actionRegion>
         <apex:pageBlockSectionItem >
             <apex:panelGrid columns="2">
                 <apex:outputLabel value="Streams" for="app"></apex:outputLabel>
                 <apex:outputText value="{!Application__c.Streams__c}" >                
                     <apex:selectList id="app" value="{!streamid}" size="1" >
                         <Apex:selectOptions value="{!streamvals}" />                        
                     </apex:selectList>
                     <apex:actionSupport event="onchange" status="status123" reRender="dependentcoursedetails" action="resetcourse"/>
                     <apex:actionStatus id="status123" startText="Fetching course Details . . . ."/>
                 </apex:outputText>                
             </apex:panelGrid>
         </apex:pageBlockSectionItem>
          </apex:actionRegion>
      </apex:pageBlockSection>
    
      <apex:pageBlockSection id="dependentcoursedetails">
          <apex:pageBlockSectionItem>
              <apex:panelGrid>
              <apex:outputLabel value="Course" for="courses" style="Center"/>
                  <apex:outputText value="{!Application__c.Course_Applied_For__c}" >
                  <apex:selectList id="courses">
                      <apex:selectOptions value="{!coursevals}">                         
                      </apex:selectOptions>
                  </apex:selectList></apex:outputText>
              </apex:panelGrid>
          </apex:pageBlockSectionItem>
         
      </apex:pageBlockSection>

 

 

 

Apex code is

 

 

public class appext
{
    private final Application__c application;
    list<selectoption> streams=new list<selectoption>();
    list<selectoption> courses=new list<selectoption>();
    public appext(ApexPages.StandardController controller)
    {
       this.application=(Application__c)controller.getRecord();
    }
    public list<selectoption> streamvals
    {
        get
        {
            streams.add(new selectOption('--NONE--','--NONE--'));
            streams.add(new selectOption('Arts','Arts'));
            streams.add(new selectOption('Engineering','Engineering'));
            streams.add(new selectOption('Medicine','Medicine'));
            streams.add(new selectOption('Science','Science'));
            return streams;
        }
        set;                       
    }
    public string streamid
    {
        get;set;
    }
    public list<selectoption> coursevals
    {
        get
        {

            if(streams.option.value()=='Arts'){}

              /* here im not able to select the values of the selectlist 1 which is key to select values of    

                    select list 2  */
             return courses;
        }
        set;
    }

}

    

  • May 11, 2009
  • Like
  • 0

 Hello EveryBody,

                 

                      Im Creating an Apex page where  i have selectList whose options want to be  taken from a query

In this im Getting Error as

 

System.NullPointerException: Argument 1 cannot be null 

 

 

and my APEX CODE IS 

 

public class posi
{
    LIST<selectoption> statusoptns =new list<selectoption>();
    string valuename;
    public void setvaluename(string valuename)
    {
        this.valuename='manager';
    }
    public string getvaluename()
    {
        return valuename;
    }
    string s='SELECT A VALUE';
    public void setvalus()
    {
        for(Position__c ptr: [SELECT Position__c.Status__c from Position__c])
        {

// This if statement is just to check where error is getting but i cant done it 
            if(ptr.Status__c==' ')
            {
                 s='abc';
            }
            else
            {           


             //If i remove the add options in this else area im getting output only 'SELECT A VALUE'

                     statusoptns.add(new selectoption(ptr.Status__C,ptr.Status__c));
            }
        }
    }
    public list<selectoption> getvalus()
    {       
        statusoptns.add(new selectoption(s,s));
        setvalus();
        return statusoptns;
    }
}

 

 

and my Visual force page code is

 

 

<apex:page controller="posi">
<apex:form >
<apex:pageBlock ><apex:pageBlockSection >
    <apex:outputLabel value="VALUES" for="sel">
    <apex:selectList value="{!valuename}" size="1" id="sel">
        <Apex:selectOptions value="{!valus}">       
        </Apex:selectOptions>
    </apex:selectList></apex:outputLabel>
</apex:pageBlockSection></apex:pageBlock>
</apex:form>   
</apex:page>

 

 

If any Body knows how to solve it help me as soon as possible

Message Edited by simha on 05-08-2009 05:23 AM
  • May 08, 2009
  • Like
  • 0

Hi im New to Force,

                

                 Actually I have to display a list of records that come under particular category by selecting an option 

from Picklist staus Field. Can any one tell me how to do this 

  • April 29, 2009
  • Like
  • 0

Hi,

  Im using  webservice to connect to .NET then im passing an array of records to the .net for that im planing to pass through the 2-dimensional array string, but im getting errors while declaring the 2-d array strings.

 

IS there any possibility to do this please guide me,

 

Thank you,

 Saran

 

  • August 25, 2009
  • Like
  • 0

Hi,

 

        Im developing a visualforce page where  i have zipped the images and scripts in "Application Form.Zip" file and uploaded it in static resources with "Application" as its name .

 

Then  in my visual force page  i tried to call the java script and image using {!URLFOR($Resource.---,'......')}

but i cant able to access either JAva script or the images From the Static Resource

 

here is the part of the Code(not able to access)

<apex:image value="{!URLFOR($Resource.Application,'Application Form/Images/Application/Activites Page.jpg')}"/>

 

<apex:includeScript value="{!URLFOR($Resource.Application,'/Application Form/scripts/PopBox.js')}"/>   

 

 If iupload the each file separetly instead of doing Zip i can able to acess the files like (i can access this)

 

 <apex:includeScript value="{!$Resource.popboximage}"/>  

<apex:image value="{!$Resource.crsedtls}" />

 

 

IF any body knows how to do it can u please help me....

 

 

thanks.

 

Regards,

simha.

  • August 03, 2009
  • Like
  • 0

 Could somebody please explain to my why this fails?

 

public static ID[] GetAccountContacts(String AccountId)

 {

ID[] iddata = [select id from contact where AccountId];

 

return iddata;

 

}

Which method is the fastest to retrieve an account with that account's ID, using query, search, or retrieve?  What is the difference between the three options?

Hi

          Im practicing on the Customer portal, Using developer guide 14 chapter i able to create a login page for customer portal and users can able to sign up every thing is going on correctly , but when a new user Register for a customer account he is not able to reciving the email about his registration has successfully completed, but if the forgot password is used they are able to recive the mail alert. If anyonehaveidea about this please help me

  • July 02, 2009
  • Like
  • 0
While I still haven't solved the problem of cloning a none-existing "Customer Portal User" profile (re: http://community.salesforce.com/sforce/board/message?board.id=general_development&thread.id=31323 ), I managed to get past it by cloning the "Customer Portal Manager" instead (since this is presumably a manager, I'm sure doing this in a professional environment is probably a formula for trouble, but that's not what this message is about).

I set up the custom portal to accept registrations, but something seems to be wrong.

I go to my portal and try to create a new user. When I submit the details, I get the following error:


Error:
Your request cannot be processed at this time. The site administrator has been alerted.

The e-mail I get states:

The default new user profile is not assigned to the portal. Registration from chapter_14 is not able to create portal users.


How do I assign the default new user profile to the portal? (Shouldn't selecting it as the default be enough?)

Hi To all,

How to call External(.net) webservice from Salesforce???

& how to use that webservices in APEX classes & triggers????

Thanks,

Krishna.

Hello Friends ,

 

               Im Creating an application where  ihave a tabpannel in which having 3 ot 4 tabs where my logic is if i enter the details in the tab and click next button next tab should be displayed. and remaining all the other tabs should become disabled. andtheremaining tabs is also follows the same proceedure where  i should navigate through the tabs using next and previous buttons only. If  any body knows how to do it can pls explain me . i went through almost all the codes that are in discussion board but i dint get it. 

 

-----------------------------------------------------------

THIS IS MY visuial force code

 

<apex:page standardController="Application__c" showHeader="false" sidebar="false" extensions="appex2">
   <script>
        .activeTab
        {
            background-color: #861515;
            color: white;
            background-image: none;
        }
        .inactiveTab
        {
            background-color: #E8E8E8;
            color: black;
            background-image: none;
        }

/*        function nexttab(tabid)
        {
           document.getElementById(maintab).selectedTab='Contact_details';
        }*/
      
    </script>

    <apex:pageblock title="EduForce" mode="edit">

    <!--Creating Tabs For Personal Details-->
        <apex:tabPanel switchType="client" id="maintab" tabClass="activeTab" inactiveTabClass="inactiveTab" value="{!TabInFocus}" >
            <apex:tab id="pdtab" label="Personal Details" rendered="true" name="Personal_Details">
            <apex:pageBlockSection title="Personal Details">
    <apex:form >
           
                </p><apex:outputLabel value="First Name"/></p>
                <apex:inputField value="{!Application__c.First_Name__c}"/>
               
                <p><apex:outputLabel value="Middle Name"/></p>
                <apex:inputField value="{!Application__c.Middle_Name__c}"/>
               
                <p><apex:outputLabel value="Last Name"/></p>
                <apex:inputField value="{!Application__c.Last_Name__c}"/>
               
                <p><apex:outputLabel value="Age"/></p>
                <apex:inputField value="{!Application__c.Age__c}"/>
               
                <p><apex:outputLabel value="Gender"/></p>
                <apex:inputField value="{!Application__c.Gender__c}" required="true"/>
               
                <p><apex:outputLabel value="Nationality"/></p>
                <apex:inputField value="{!Application__c.Country_Of_Citizenship__c}"/>
               
                <Apex:commandButton value="NEXT"  action="{!nexttab}"  />
                <apex:commandButton value="Cancel"  action="{!nothing}" />

/* HERE I DINT UNDERSTAND Whether Javascipt "onclick=nexttab(contact_Details) "to use or apex code  and  what to do next*/

           </apex:form>
           </apex:pageBlockSection>
            </apex:tab>
           
            <!--Creating a tab for Contact Details-->
            <apex:tab id="cdtab" label="Contact Details" name="Contact_Details">
            <apex:pageBlockSection title="Mailing Address">
            <apex:form >          
                <apex:outputLabel value="Address Line 1"/>
                <apex:inputfield value="{!Application__c.Address_Line_1__c}"/></br>              
                <apex:outputLabel value="Address Line 2"/>
                <apex:inputfield value="{!Application__c.Address_Line_2__c}"/></br>              
                <apex:outputLabel value="Address Line 3"/>
                <apex:inputfield value="{!Application__c.Address_Line_3__c}"/></br>               
                <apex:outputLabel value="City / Town"/>
                <apex:inputfield value="{!Application__c.City_Town__c}"/></br>              
                <apex:outputLabel value="State / Province"/>
                <apex:inputfield value="{!Application__c.State_Province__c}"/></br>               
                <apex:outputLabel value="Country"/>
                <apex:inputfield value="{!Application__c.Country__c}"/></br>              
                <apex:outputLabel value="Postal Code / Zip Code"/>
                <apex:inputfield value="{!Application__c.Zip_Code__c}"/></br>           
            </apex:form>
            </apex:pageBlockSection>           
            <apex:pageBlockSection title="Email Contact">
            <apex:form >          
                <apex:outputLabel value="Email Address"/>
                <apex:inputfield value="{!Application__c.E_Mail_ID__c}"/></br>           
            </apex:form>
            </apex:pageBlockSection>
            </apex:tab>

.......

.

.

 

.

.

</apex:page>

 

 

--------------------------------------------------------

my Apex code

 

String TabInFocus = System.currentPageReference().getParameters().get('tab');
    public void nexttab()
    {
        string x=System.currentPageReference().getParameters().get('Contact_Details');
        TabinFocus=x;
        //document.getElementById('{!$Component.maintab}').selectedTab='Contat_details';

    }
    public String getTabInFocus()
    {
            // System.debug(' *****Current Selected tab is :' + TabInFocus);
       return TabInFocus;
    }     
    public void setTabInFocus( String s )
    {
        this.TabInfocus = s;
    }

 

----------------------------------------------

IF ANY BODY KNOW PLEASE HELP ME 

  • May 28, 2009
  • Like
  • 0

Hello everybody,

 

                Im Creating an application form where i have Application__c object in force.com and i break that into several pages in visualforce like  courses offered in one page personal details in one page, Educational details in one page and my targt is when i select a course  and click the next button i want to get the Personal Details page  but im unable to getting it i tried alot but its displaying the current page it self if any body aware of this can u pls help me 

 

Courses offerd page :

 

 

(courses url              :https://..... /apex/appcrses)

( personaldetails url :https://..... /apex/sample1)

 

<apex:page standardController="Application__c" showHeader="false" sidebar="false" tabStyle="Application__c" extensions="appext1" >
    <style>
        .activeTab {background-color: #236FBD; color:white; background-image:none}
        .inactiveTab { background-color: lightgrey; color:black; background-image:none}
    </style>
      <u><font style="Verdana" size="6" color="green"> <b>COURSE DETAILS</b> </font></u><br></br><br></br>
    <apex:tabPanel switchType="client" selectedTab="Streams" id="theTabPanel">
        <apex:tab label="B.Tech" name="B.Tech" id="tabdetails" >
            <apex:form style="align=Center">
                <apex:selectRadio value="{!btech}" layout="pageDirection">
                <apex:selectOptions value="{!items}" rendered="true"/>
                </apex:selectRadio>
            </apex:form>
        </apex:tab>
        <apex:tab label="M.Tech" name="M.Tech" id="tabContact">
            <apex:form style="align=Center">
                <apex:selectRadio value="{!mtech}" layout="pageDirection">
                <apex:selectOptions value="{!items}" rendered="true"/>
                </apex:selectRadio>
            </apex:form>
        </apex:tab>
        <apex:tab label="Pharmacy" name="Pharmacy" id="tabOpp">
            <apex:form style="align=Center">
                <apex:selectRadio value="{!pharma}" layout="pageDirection">
                <apex:selectOptions value="{!pitems}" rendered="true"/>
                </apex:selectRadio>
            </apex:form>   
        </apex:tab>
        <apex:tab label="Arts" name="Arts" id="tabOpenAct">
            <apex:form style="align=Center">
                <apex:selectRadio value="{!arts}" layout="pageDirection">
                <apex:selectOptions value="{!artitems}" rendered="true"/>
                </apex:selectRadio>
            </apex:form>
        </apex:tab>
        <apex:tab label="Other" name="others" id="tabNoteAtt">
            <apex:form style="align=Center">
                <apex:selectRadio value="{!other}" layout="pageDirection">
                    <apex:selectOptions value="{!otheritems}" rendered="true"/>
                </apex:selectRadio>              
            </apex:form>
        </apex:tab><apex:form >
        <apex:commandButton value="SAVE and NEXT " action="{!next}" /></apex:form>       
    </apex:tabPanel>
</apex:page>

 

 

 

class

 

public class appext1
{
    Application__c application;
//   ApexPages.StandardController Controller = new ApexPages.StandardController(application);          
    public appext1(ApexPages.StandardController controller)
    {
        this.application=(Application__c)controller.getRecord();       
    }
    string courses;
    public string lastcourses;
    public string laststreams;

    ......

    .......

    .........

    public pageReference next()
    {    
        lastcourses=courses;     
       /* String newPageUrl = '/apex/sample1';

            PageReference newPage =new PageReference(newPageUrl);

       */
        PageReference newPage = page.sample1;
        newPage.setRedirect(true);
        return newPage;   
    }

}

 

 

  • May 22, 2009
  • Like
  • 0

 Hello EveryBody,

                 

                      Im Creating an Apex page where  i have selectList whose options want to be  taken from a query

In this im Getting Error as

 

System.NullPointerException: Argument 1 cannot be null 

 

 

and my APEX CODE IS 

 

public class posi
{
    LIST<selectoption> statusoptns =new list<selectoption>();
    string valuename;
    public void setvaluename(string valuename)
    {
        this.valuename='manager';
    }
    public string getvaluename()
    {
        return valuename;
    }
    string s='SELECT A VALUE';
    public void setvalus()
    {
        for(Position__c ptr: [SELECT Position__c.Status__c from Position__c])
        {

// This if statement is just to check where error is getting but i cant done it 
            if(ptr.Status__c==' ')
            {
                 s='abc';
            }
            else
            {           


             //If i remove the add options in this else area im getting output only 'SELECT A VALUE'

                     statusoptns.add(new selectoption(ptr.Status__C,ptr.Status__c));
            }
        }
    }
    public list<selectoption> getvalus()
    {       
        statusoptns.add(new selectoption(s,s));
        setvalus();
        return statusoptns;
    }
}

 

 

and my Visual force page code is

 

 

<apex:page controller="posi">
<apex:form >
<apex:pageBlock ><apex:pageBlockSection >
    <apex:outputLabel value="VALUES" for="sel">
    <apex:selectList value="{!valuename}" size="1" id="sel">
        <Apex:selectOptions value="{!valus}">       
        </Apex:selectOptions>
    </apex:selectList></apex:outputLabel>
</apex:pageBlockSection></apex:pageBlock>
</apex:form>   
</apex:page>

 

 

If any Body knows how to solve it help me as soon as possible

Message Edited by simha on 05-08-2009 05:23 AM
  • May 08, 2009
  • Like
  • 0