• Shane_CR
  • NEWBIE
  • 0 Points
  • Member since 2008

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

Hi All,

 

We are building a customize application and entire team is new to visualforce. So please help and guide us.

 

We have set of questions and request everyone to answer.

 

  1. Where should we keep application images, either in static resources or images folder (creating new folder under documents).
  2. Where should we keep common JavaScript, either in static resources or script folder (creating new folder under documents).
  3. Where should we keep stylesheets, either in static resources or CSS folder (creating new folder under documents).
  4. We want to create a data access layer similar like sqlhelper.cs (.NET). This data access layer will perform insert, delete, update and select operations on custom objects. Is there any sample code or example?
  5. Is there is naming convention document which is given by salesforce.
  6. We have a requirement for uploading documents from client browser to salesforce. Can we have the sample code or example?
  7. How can we implement paging (like 1, 2, 3, 4, etc) while displaying thousands of records?
  8. Can we have error handling code sample which we can use in apex classes and custom controller classes.
  9. Architecture of the application is like Presentation layer (Containing visualforce pages and Custom controller classes), Business layer (customize Apex classes) and data layer (one single class like sqlhelper.cs in .NET). So please suggest
  10. Write now we have some understanding of Apex Data Loader, Apex explorer, eclipse, visualforce pages in-line editor. Please suggest if there any other tools which can be used by our team for rapid development

 

THANKS IN ADVANCE

 

Regards

Shane
Hi All,
 
I have created DFC account using http://wiki.apexdevnet.com/events/regular/registration.php?d=70130000000DJmf link.  I want to create sample page using visualforce.com.
 
I am not able to see Developer Mode Checkbox option Edit screen (Click Setup - My Personal Information - Personal Information, and click Edit.)
 
Please tell me the settings, through which visualforce.com is enabled in my DFC account.
 
Regards
Shane

Hi All,

 

We are building a customize application and entire team is new to visualforce. So please help and guide us.

 

We have set of questions and request everyone to answer.

 

  1. Where should we keep application images, either in static resources or images folder (creating new folder under documents).
  2. Where should we keep common JavaScript, either in static resources or script folder (creating new folder under documents).
  3. Where should we keep stylesheets, either in static resources or CSS folder (creating new folder under documents).
  4. We want to create a data access layer similar like sqlhelper.cs (.NET). This data access layer will perform insert, delete, update and select operations on custom objects. Is there any sample code or example?
  5. Is there is naming convention document which is given by salesforce.
  6. We have a requirement for uploading documents from client browser to salesforce. Can we have the sample code or example?
  7. How can we implement paging (like 1, 2, 3, 4, etc) while displaying thousands of records?
  8. Can we have error handling code sample which we can use in apex classes and custom controller classes.
  9. Architecture of the application is like Presentation layer (Containing visualforce pages and Custom controller classes), Business layer (customize Apex classes) and data layer (one single class like sqlhelper.cs in .NET). So please suggest
  10. Write now we have some understanding of Apex Data Loader, Apex explorer, eclipse, visualforce pages in-line editor. Please suggest if there any other tools which can be used by our team for rapid development

 

THANKS IN ADVANCE

 

Regards

Shane
Hello experts,
 
I want to know the way of using condition in visualforce page. I have a custom object 'Person__c' having few fields. Two of them are:
Name, Active(Checkbox), Birthday, Age(Numberic)
 
What I want to do is list values in these fields in visualforce page. While displaying, I want to display:
 'Minor' if Age<16, otherwise 'Adult'
 
I want to be able to do this in any of the following 3 ways:
 
1. By using If clause in apex page
2. By passing 'Age' as a parameter to my extended controller
3. And using case (or similar) in SOQL
 
Below is my code:
 
Code:
<apex:page standardController="Person__c" extensions="PersonExtension">
 <apex:form>
  <apex:pageblock title="My Persons Infos">
   <apex:pageblockList value="{!PersonList}" var="p">
    <apex:column value="{!p.Name}"/>
    <apex:column value="{!p.Active__c}"/>
    <apex:column value="{!p.Birthday__c}"/>
    <apex:column value="{!p.Age__c}"/>
    <apex:column value="{!anystring}"/>
    <apex:column value="{!IF((p.Age__c>16),'Adult','Minor')}"/>
   </apex:pageblockList>
  </apex:pageblock>
 </apex:form>
</apex:page>


public class PersonExtension{

  private final Person__c person;

  public PersonExtension(ApexPages.StandardController stdController){
    this.person= (Person__c)stdController.getRecord();
  }

  public Person__c[] getPersonList(){
    return [Select p.Id, p.Name, p.Age__c, Birthday__c, p.Active__c from Person__c p];
  }

  public String getAnyString(){
    return 'Anything';
  }
}

The error I get is: Error: Syntax error. Missing ')'
 
If I change the if condition to: <apex:column value="{!IF((p.Age__c<16),'Minor','Adult')}"/>
The error will be: Error: Syntax error. Found 'lt'
 
Even a simple clause is not working:

<apex:column value="{!IF(CONTAINS({!anystring}, 'Anything'),True, False)}"/>
 
1. What is wrong in my code? Can I use IF condition in this way?
2. Can I pass a parameter (Age in above case) to my controller and return a string based on parameter supplied to it? If so, how?
3. Can I use case...when clause (or similar like in sql) in my SOQL? If so, how can I do so?
 
Thanks
Hi All,
 
I have created DFC account using http://wiki.apexdevnet.com/events/regular/registration.php?d=70130000000DJmf link.  I want to create sample page using visualforce.com.
 
I am not able to see Developer Mode Checkbox option Edit screen (Click Setup - My Personal Information - Personal Information, and click Edit.)
 
Please tell me the settings, through which visualforce.com is enabled in my DFC account.
 
Regards
Shane