SlideShare uma empresa Scribd logo
1 de 17
Baixar para ler offline
Cloud Entwicklung
       mit Apex
Apex?
Apex Code extends the powerful and proven success of the Force.com platform by
introducing the ability to write code that runs on salesforce.com servers.
MVC
Use Case
 Beschwerde Managment




Anforderung: Konversationen sollen auf der Case-Seite möglichst
schnell editierbar sein.
GUI Prototype
Die "Conversation Page"
Views & Controller
Aufruf einer Visualforce Page über:

( https://emea.salesforce.com/apex/yourpage )

<apex:page controller="TestController">
    Hallo {!name}
</apex:page>


Class TestController{
    public String name { get; set; }
public TestController{
    this.name = UserInfo.getName();
    }
}
Controller Extensions
Für eine bessere Integration in SalesForce!
( https://emea.salesforce.com/5002000000MVOBr )

<apex:page standardController="Case" extensions="CaseControllerTest">
Hallo {!caseID} !
</apex:page>
Controller Extensions
Für eine bessere Integration in SalesForce!
( https://emea.salesforce.com/5002000000MVOBr )

<apex:page standardController="Case" extensions="CaseControllerTest">
Hallo {!caseID} !
</apex:page>




Class TestController{
     public String caseID { get; set; }
     public TestController(ApexPages.StandardController controller){
           if(controller != null){
                  caseID = controller.getId();
           }
     }
}
Add new Conversation
Was brauchen wir?




                        Formular für neues
                        Conversation-Object.




                    Save-Funktion
Add new Conversation
Controller Extension

  public class ConversationController {


      public ConversationController(ApexPages.StandardController controller){
         if(controller != null){
               caseID = controller.getId();
         }
      }

      public Conversation__c conversation{
         public get{
               if(conversation==null){
                      conversation = new Conversation__c( Case__c = caseID );
               }
               return conversation;
         }
         private set;
      }

  }
The Apex Tag-Library
<apex:form id="conversation_form">
<apex:pageblock>
     <apex:pageblocksection columns="1">
     <apex:pageblockSectionItem >
             {!$ObjectType.Conversation__c.Fields.Name.label}
             <apex:inputfield value="{!conversation.Name}"/>
     </apex:pageblockSectionItem>
     <apex:pageblockSectionItem >
             {!$ObjectType.Conversation__c.Fields.Type__c.label}
             <apex:inputfield value="{!conversation.Type__c}"/>
     </apex:pageblockSectionItem>
     <apex:pageblockSectionItem >
             {!$ObjectType.Conversation__c.Fields.Note__c.label}
             <apex:inputfield value="{!conversation.Note__c}"/>
     </apex:pageblockSectionItem>
     <apex:pageblockSectionItem >
             <apex:commandButton action="{!addConversation}" value="Add Conversation" rerender="conversation_form"/>
     </apex:pageblockSectionItem>
</apex:pageblocksection>
</apex:pageblock>
</apex:form>
The Action-Function
public class ConversationController {
  ......

     /**
     * Our ActionFunction to add a new Conversation to the Log:
     */
     public PageReference addConversation(){
         /* save conversation */
         insert(this.conversation);
         /* create a new one */
         conversation = new Conversation__c( Case__c = caseID );
         return null;
     }

    ......
}
Conversation List
public class ConversationController {
......

      public List<Conversation__c> conversations{
         public get{
                if(conversations==null){
                      conversations = getConverationsForCase(this.caseID);
                }
                return conversations;
         }
         private set;
      }
...

      public List <Conversation__c> getConverationsForCase(Id caseID){
         return [Select c.Type__c, c.SystemModstamp, c.Note__c,
                           c.Name, c.LastModifiedDate, c.LastModifiedById, c.IsDeleted, c.Id, c.CreatedDate,
                           c.CreatedById, c.Case__c
                           From Conversation__c c where c.Case__c = :caseID
                           order by c.CreatedDate desc];
      }

}
Conversation List


<apex:pageblock id="conversation" title="Conversation Log">
    <apex:pageblocksection >
     <apex:pageblockSectionItem id="coversation_table">
      <apex:dataTable value="{!conversations}" var="conv">
        <apex:column onclick="selectConversation('{!conv.id}');">
         <apex:facet name="header">
{!$ObjectType.Conversation__c.fields.Name.label}
 </apex:facet>
 <apex:outputField styleClass="taskdate" value="{!conv.Name}"/>
       </apex:column>
.....
Conversation List


.....
     </apex:dataTable>
      </apex:pageblockSectionItem>
      <apex:pageblockSectionItem >
        <apex:pageblock id="conversationdetail">
          <p>{!selectedConversation.Note__c}</p>
        </apex:pageblock>
      </apex:pageblockSectionItem>
     </apex:pageblocksection>
  </apex:pageblock>
  </apex:form>
Select a Conversation
public class ConversationController {
.......
    public String selectConversationID{ get; set; }

    public Conversation__c selectedConversation{ public get; private set; }

    public PageReference selectConversation(){
       if( selectConversationID != null ){
              /* find the conversation */
              for(Conversation__c c : this.conversations ){
                     if( c.id == (Id)selectConversationID ){
                             this.selectedConversation = c;
                             return null;
                     }
              }
       }
       return null;
    }

.....
Select a Conversation
 <apex:actionfunction action="{!selectConversation}" rerender="conversationdetail">
     <apex:param name="selectConversationID" assignTo="{!selectConversationID}" />
 </apex:actionfunction>
....

 <apex:pageblock id="conversation" title="Conversation Log">
     <apex:pageblocksection >
      <apex:pageblockSectionItem id="coversation_table">
       <apex:dataTable value="{!conversations}" var="conv" title="Conversations">
          <apex:column onclick="selectConversation('{!conv.id}');">
....

     <apex:pageblockSectionItem >
        <apex:pageblock id="conversationdetail">
          <p>{!selectedConversation.Note__c}</p>
        </apex:pageblock>
      </apex:pageblockSectionItem>
     </apex:pageblocksection>

Mais conteúdo relacionado

Mais procurados

Template syntax in Angular 2.0
Template syntax in Angular 2.0Template syntax in Angular 2.0
Template syntax in Angular 2.0Eyal Vardi
 
2013-06-25 - HTML5 & JavaScript Security
2013-06-25 - HTML5 & JavaScript Security2013-06-25 - HTML5 & JavaScript Security
2013-06-25 - HTML5 & JavaScript SecurityJohannes Hoppe
 
Apostrophe (improved Paris edition)
Apostrophe (improved Paris edition)Apostrophe (improved Paris edition)
Apostrophe (improved Paris edition)tompunk
 
Manipulating Magento - Meet Magento Netherlands 2018
Manipulating Magento - Meet Magento Netherlands 2018Manipulating Magento - Meet Magento Netherlands 2018
Manipulating Magento - Meet Magento Netherlands 2018Joke Puts
 
Unit testing after Zend Framework 1.8
Unit testing after Zend Framework 1.8Unit testing after Zend Framework 1.8
Unit testing after Zend Framework 1.8Michelangelo van Dam
 
Building Data Rich Interfaces with JavaFX
Building Data Rich Interfaces with JavaFXBuilding Data Rich Interfaces with JavaFX
Building Data Rich Interfaces with JavaFXStephen Chin
 
RichFaces: more concepts and features
RichFaces: more concepts and featuresRichFaces: more concepts and features
RichFaces: more concepts and featuresMax Katz
 
Php Unit With Zend Framework Zendcon09
Php Unit With Zend Framework   Zendcon09Php Unit With Zend Framework   Zendcon09
Php Unit With Zend Framework Zendcon09Michelangelo van Dam
 
Frameworks da nova Era PHP FuelPHP
Frameworks da nova Era PHP FuelPHPFrameworks da nova Era PHP FuelPHP
Frameworks da nova Era PHP FuelPHPDan Jesus
 
Synapseindia reviews sharing intro cakephp
Synapseindia reviews sharing intro cakephpSynapseindia reviews sharing intro cakephp
Synapseindia reviews sharing intro cakephpSynapseindiaComplaints
 
Paypal REST api ( Japanese version )
Paypal REST api ( Japanese version )Paypal REST api ( Japanese version )
Paypal REST api ( Japanese version )Yoshi Sakai
 
Gravity Forms Hooks & Filters
Gravity Forms Hooks & FiltersGravity Forms Hooks & Filters
Gravity Forms Hooks & Filtersiamdangavin
 
Storytelling By Numbers
Storytelling By NumbersStorytelling By Numbers
Storytelling By NumbersMichael King
 
Angular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.xAngular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.xEyal Vardi
 
Consuming Web Services with Swift and Rx
Consuming Web Services with Swift and RxConsuming Web Services with Swift and Rx
Consuming Web Services with Swift and RxGuillermo Gonzalez
 
sfDay Cologne - Sonata Admin Bundle
sfDay Cologne - Sonata Admin BundlesfDay Cologne - Sonata Admin Bundle
sfDay Cologne - Sonata Admin Bundleth0masr
 

Mais procurados (20)

Zero to SOLID
Zero to SOLIDZero to SOLID
Zero to SOLID
 
Template syntax in Angular 2.0
Template syntax in Angular 2.0Template syntax in Angular 2.0
Template syntax in Angular 2.0
 
2013-06-25 - HTML5 & JavaScript Security
2013-06-25 - HTML5 & JavaScript Security2013-06-25 - HTML5 & JavaScript Security
2013-06-25 - HTML5 & JavaScript Security
 
Apostrophe (improved Paris edition)
Apostrophe (improved Paris edition)Apostrophe (improved Paris edition)
Apostrophe (improved Paris edition)
 
Manipulating Magento - Meet Magento Netherlands 2018
Manipulating Magento - Meet Magento Netherlands 2018Manipulating Magento - Meet Magento Netherlands 2018
Manipulating Magento - Meet Magento Netherlands 2018
 
Unit testing after Zend Framework 1.8
Unit testing after Zend Framework 1.8Unit testing after Zend Framework 1.8
Unit testing after Zend Framework 1.8
 
Building Data Rich Interfaces with JavaFX
Building Data Rich Interfaces with JavaFXBuilding Data Rich Interfaces with JavaFX
Building Data Rich Interfaces with JavaFX
 
RichFaces: more concepts and features
RichFaces: more concepts and featuresRichFaces: more concepts and features
RichFaces: more concepts and features
 
Php Unit With Zend Framework Zendcon09
Php Unit With Zend Framework   Zendcon09Php Unit With Zend Framework   Zendcon09
Php Unit With Zend Framework Zendcon09
 
Frameworks da nova Era PHP FuelPHP
Frameworks da nova Era PHP FuelPHPFrameworks da nova Era PHP FuelPHP
Frameworks da nova Era PHP FuelPHP
 
Synapseindia reviews sharing intro cakephp
Synapseindia reviews sharing intro cakephpSynapseindia reviews sharing intro cakephp
Synapseindia reviews sharing intro cakephp
 
Paypal REST api ( Japanese version )
Paypal REST api ( Japanese version )Paypal REST api ( Japanese version )
Paypal REST api ( Japanese version )
 
MVC.net training in pune
MVC.net training in pune MVC.net training in pune
MVC.net training in pune
 
Gravity Forms Hooks & Filters
Gravity Forms Hooks & FiltersGravity Forms Hooks & Filters
Gravity Forms Hooks & Filters
 
QA for PHP projects
QA for PHP projectsQA for PHP projects
QA for PHP projects
 
Storytelling By Numbers
Storytelling By NumbersStorytelling By Numbers
Storytelling By Numbers
 
Angular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.xAngular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.x
 
Consuming Web Services with Swift and Rx
Consuming Web Services with Swift and RxConsuming Web Services with Swift and Rx
Consuming Web Services with Swift and Rx
 
Session1+2
Session1+2Session1+2
Session1+2
 
sfDay Cologne - Sonata Admin Bundle
sfDay Cologne - Sonata Admin BundlesfDay Cologne - Sonata Admin Bundle
sfDay Cologne - Sonata Admin Bundle
 

Destaque

Connected Products
Connected ProductsConnected Products
Connected ProductsAyumu Aizawa
 
Introduction Force.com-Platform / Salesforce.com
Introduction Force.com-Platform / Salesforce.comIntroduction Force.com-Platform / Salesforce.com
Introduction Force.com-Platform / Salesforce.comAptly GmbH
 
Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila - docker clusters (solit 2015)Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila - docker clusters (solit 2015)Artem Zhurbila
 
Introducing the Salesforce platform
Introducing the Salesforce platformIntroducing the Salesforce platform
Introducing the Salesforce platformJohn Stevenson
 
Secure Development on the Salesforce Platform - Part 3
Secure Development on the Salesforce Platform - Part 3Secure Development on the Salesforce Platform - Part 3
Secure Development on the Salesforce Platform - Part 3Mark Adcock
 
How Salesforce CRM works & who should use it?
How Salesforce CRM works & who should use it?How Salesforce CRM works & who should use it?
How Salesforce CRM works & who should use it?Suyati Technologies
 
Salesforce Intro
Salesforce IntroSalesforce Intro
Salesforce IntroRich Helton
 
Salesforce Presentation
Salesforce PresentationSalesforce Presentation
Salesforce PresentationChetna Purohit
 

Destaque (13)

Introduction to Force.com
Introduction to Force.comIntroduction to Force.com
Introduction to Force.com
 
Connected Products
Connected ProductsConnected Products
Connected Products
 
Introduction to Force.com Webinar
Introduction to Force.com WebinarIntroduction to Force.com Webinar
Introduction to Force.com Webinar
 
Introduction Force.com-Platform / Salesforce.com
Introduction Force.com-Platform / Salesforce.comIntroduction Force.com-Platform / Salesforce.com
Introduction Force.com-Platform / Salesforce.com
 
Salesforce1 Platform
Salesforce1 PlatformSalesforce1 Platform
Salesforce1 Platform
 
Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila - docker clusters (solit 2015)Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila - docker clusters (solit 2015)
 
Introducing the Salesforce platform
Introducing the Salesforce platformIntroducing the Salesforce platform
Introducing the Salesforce platform
 
Secure Development on the Salesforce Platform - Part 3
Secure Development on the Salesforce Platform - Part 3Secure Development on the Salesforce Platform - Part 3
Secure Development on the Salesforce Platform - Part 3
 
How Salesforce CRM works & who should use it?
How Salesforce CRM works & who should use it?How Salesforce CRM works & who should use it?
How Salesforce CRM works & who should use it?
 
Salesforce CRM
Salesforce CRMSalesforce CRM
Salesforce CRM
 
Introduction to salesforce ppt
Introduction to salesforce pptIntroduction to salesforce ppt
Introduction to salesforce ppt
 
Salesforce Intro
Salesforce IntroSalesforce Intro
Salesforce Intro
 
Salesforce Presentation
Salesforce PresentationSalesforce Presentation
Salesforce Presentation
 

Semelhante a Cloud Entwicklung mit Apex

AnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFacesAnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFacesAnkara JUG
 
PrimeTime JSF with PrimeFaces - Dec 2014
PrimeTime JSF with PrimeFaces - Dec 2014PrimeTime JSF with PrimeFaces - Dec 2014
PrimeTime JSF with PrimeFaces - Dec 2014cagataycivici
 
Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2Hugo Hamon
 
Primefaces Confess 2012
Primefaces Confess 2012Primefaces Confess 2012
Primefaces Confess 2012cagataycivici
 
How to Bring Common UI Patterns to ADF
How to Bring Common UI Patterns to ADF How to Bring Common UI Patterns to ADF
How to Bring Common UI Patterns to ADF Luc Bors
 
Cfml features modern coding into the box 2018
Cfml features modern coding into the box 2018Cfml features modern coding into the box 2018
Cfml features modern coding into the box 2018Ortus Solutions, Corp
 
Integrating SAP the Java EE Way - JBoss One Day talk 2012
Integrating SAP the Java EE Way - JBoss One Day talk 2012Integrating SAP the Java EE Way - JBoss One Day talk 2012
Integrating SAP the Java EE Way - JBoss One Day talk 2012hwilming
 
VPN Access Runbook
VPN Access RunbookVPN Access Runbook
VPN Access RunbookTaha Shakeel
 
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...Dan Wahlin
 
GHC Participant Training
GHC Participant TrainingGHC Participant Training
GHC Participant TrainingAidIQ
 
Architecting Alive Apps
Architecting Alive AppsArchitecting Alive Apps
Architecting Alive AppsJorge Ortiz
 
Summer - The HTML5 Library for Java and Scala
Summer - The HTML5 Library for Java and ScalaSummer - The HTML5 Library for Java and Scala
Summer - The HTML5 Library for Java and Scalarostislav
 
Python Code Camp for Professionals 4/4
Python Code Camp for Professionals 4/4Python Code Camp for Professionals 4/4
Python Code Camp for Professionals 4/4DEVCON
 
HTML5 New and Improved
HTML5   New and ImprovedHTML5   New and Improved
HTML5 New and ImprovedTimothy Fisher
 
Symfony2 Building on Alpha / Beta technology
Symfony2 Building on Alpha / Beta technologySymfony2 Building on Alpha / Beta technology
Symfony2 Building on Alpha / Beta technologyDaniel Knell
 

Semelhante a Cloud Entwicklung mit Apex (20)

AnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFacesAnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFaces
 
PrimeTime JSF with PrimeFaces - Dec 2014
PrimeTime JSF with PrimeFaces - Dec 2014PrimeTime JSF with PrimeFaces - Dec 2014
PrimeTime JSF with PrimeFaces - Dec 2014
 
Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2
 
Primefaces Confess 2012
Primefaces Confess 2012Primefaces Confess 2012
Primefaces Confess 2012
 
How to Bring Common UI Patterns to ADF
How to Bring Common UI Patterns to ADF How to Bring Common UI Patterns to ADF
How to Bring Common UI Patterns to ADF
 
Cfml features modern coding into the box 2018
Cfml features modern coding into the box 2018Cfml features modern coding into the box 2018
Cfml features modern coding into the box 2018
 
Integrating SAP the Java EE Way - JBoss One Day talk 2012
Integrating SAP the Java EE Way - JBoss One Day talk 2012Integrating SAP the Java EE Way - JBoss One Day talk 2012
Integrating SAP the Java EE Way - JBoss One Day talk 2012
 
VPN Access Runbook
VPN Access RunbookVPN Access Runbook
VPN Access Runbook
 
Practica n° 7
Practica n° 7Practica n° 7
Practica n° 7
 
How te bring common UI patterns to ADF
How te bring common UI patterns to ADFHow te bring common UI patterns to ADF
How te bring common UI patterns to ADF
 
Ruby - Design patterns tdc2011
Ruby - Design patterns tdc2011Ruby - Design patterns tdc2011
Ruby - Design patterns tdc2011
 
Broadleaf Presents Thymeleaf
Broadleaf Presents ThymeleafBroadleaf Presents Thymeleaf
Broadleaf Presents Thymeleaf
 
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
 
GHC Participant Training
GHC Participant TrainingGHC Participant Training
GHC Participant Training
 
Architecting Alive Apps
Architecting Alive AppsArchitecting Alive Apps
Architecting Alive Apps
 
Flask – Python
Flask – PythonFlask – Python
Flask – Python
 
Summer - The HTML5 Library for Java and Scala
Summer - The HTML5 Library for Java and ScalaSummer - The HTML5 Library for Java and Scala
Summer - The HTML5 Library for Java and Scala
 
Python Code Camp for Professionals 4/4
Python Code Camp for Professionals 4/4Python Code Camp for Professionals 4/4
Python Code Camp for Professionals 4/4
 
HTML5 New and Improved
HTML5   New and ImprovedHTML5   New and Improved
HTML5 New and Improved
 
Symfony2 Building on Alpha / Beta technology
Symfony2 Building on Alpha / Beta technologySymfony2 Building on Alpha / Beta technology
Symfony2 Building on Alpha / Beta technology
 

Último

Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...anilsa9823
 
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual serviceanilsa9823
 
Call Girls Anjuna beach Mariott Resort ₰8588052666
Call Girls Anjuna beach Mariott Resort ₰8588052666Call Girls Anjuna beach Mariott Resort ₰8588052666
Call Girls Anjuna beach Mariott Resort ₰8588052666nishakur201
 
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morcall Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morvikas rana
 
Pokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy TheoryPokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy Theorydrae5
 
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
CALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual serviceanilsa9823
 
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual serviceanilsa9823
 
LC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfLC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfpastor83
 
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)Delhi Call girls
 
CALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual serviceanilsa9823
 
call girls in candolim beach 9870370636] NORTH GOA ..
call girls in candolim beach 9870370636] NORTH GOA ..call girls in candolim beach 9870370636] NORTH GOA ..
call girls in candolim beach 9870370636] NORTH GOA ..nishakur201
 
Introducing to billionaire brain wave.pdf
Introducing to billionaire brain wave.pdfIntroducing to billionaire brain wave.pdf
Introducing to billionaire brain wave.pdfnoumannajam04
 
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girlsPooja Nehwal
 
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)Delhi Call girls
 
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female serviceanilsa9823
 
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,dollysharma2066
 
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...PsychicRuben LoveSpells
 
Lilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptxLilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptxABMWeaklings
 

Último (20)

Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
 
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual service
 
Call Girls Anjuna beach Mariott Resort ₰8588052666
Call Girls Anjuna beach Mariott Resort ₰8588052666Call Girls Anjuna beach Mariott Resort ₰8588052666
Call Girls Anjuna beach Mariott Resort ₰8588052666
 
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morcall Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
 
Pokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy TheoryPokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy Theory
 
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
CALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual service
 
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual service
 
LC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfLC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdf
 
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
 
CALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual service
 
call girls in candolim beach 9870370636] NORTH GOA ..
call girls in candolim beach 9870370636] NORTH GOA ..call girls in candolim beach 9870370636] NORTH GOA ..
call girls in candolim beach 9870370636] NORTH GOA ..
 
Introducing to billionaire brain wave.pdf
Introducing to billionaire brain wave.pdfIntroducing to billionaire brain wave.pdf
Introducing to billionaire brain wave.pdf
 
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
 
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
 
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
 
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
 
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
 
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
 
Lilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptxLilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptx
 

Cloud Entwicklung mit Apex

  • 1. Cloud Entwicklung mit Apex
  • 2. Apex? Apex Code extends the powerful and proven success of the Force.com platform by introducing the ability to write code that runs on salesforce.com servers.
  • 3. MVC
  • 4. Use Case Beschwerde Managment Anforderung: Konversationen sollen auf der Case-Seite möglichst schnell editierbar sein.
  • 6. Views & Controller Aufruf einer Visualforce Page über: ( https://emea.salesforce.com/apex/yourpage ) <apex:page controller="TestController"> Hallo {!name} </apex:page> Class TestController{ public String name { get; set; } public TestController{ this.name = UserInfo.getName(); } }
  • 7. Controller Extensions Für eine bessere Integration in SalesForce! ( https://emea.salesforce.com/5002000000MVOBr ) <apex:page standardController="Case" extensions="CaseControllerTest"> Hallo {!caseID} ! </apex:page>
  • 8. Controller Extensions Für eine bessere Integration in SalesForce! ( https://emea.salesforce.com/5002000000MVOBr ) <apex:page standardController="Case" extensions="CaseControllerTest"> Hallo {!caseID} ! </apex:page> Class TestController{ public String caseID { get; set; } public TestController(ApexPages.StandardController controller){ if(controller != null){ caseID = controller.getId(); } } }
  • 9. Add new Conversation Was brauchen wir? Formular für neues Conversation-Object. Save-Funktion
  • 10. Add new Conversation Controller Extension public class ConversationController { public ConversationController(ApexPages.StandardController controller){ if(controller != null){ caseID = controller.getId(); } } public Conversation__c conversation{ public get{ if(conversation==null){ conversation = new Conversation__c( Case__c = caseID ); } return conversation; } private set; } }
  • 11. The Apex Tag-Library <apex:form id="conversation_form"> <apex:pageblock> <apex:pageblocksection columns="1"> <apex:pageblockSectionItem > {!$ObjectType.Conversation__c.Fields.Name.label} <apex:inputfield value="{!conversation.Name}"/> </apex:pageblockSectionItem> <apex:pageblockSectionItem > {!$ObjectType.Conversation__c.Fields.Type__c.label} <apex:inputfield value="{!conversation.Type__c}"/> </apex:pageblockSectionItem> <apex:pageblockSectionItem > {!$ObjectType.Conversation__c.Fields.Note__c.label} <apex:inputfield value="{!conversation.Note__c}"/> </apex:pageblockSectionItem> <apex:pageblockSectionItem > <apex:commandButton action="{!addConversation}" value="Add Conversation" rerender="conversation_form"/> </apex:pageblockSectionItem> </apex:pageblocksection> </apex:pageblock> </apex:form>
  • 12. The Action-Function public class ConversationController { ...... /** * Our ActionFunction to add a new Conversation to the Log: */ public PageReference addConversation(){ /* save conversation */ insert(this.conversation); /* create a new one */ conversation = new Conversation__c( Case__c = caseID ); return null; } ...... }
  • 13. Conversation List public class ConversationController { ...... public List<Conversation__c> conversations{ public get{ if(conversations==null){ conversations = getConverationsForCase(this.caseID); } return conversations; } private set; } ... public List <Conversation__c> getConverationsForCase(Id caseID){ return [Select c.Type__c, c.SystemModstamp, c.Note__c, c.Name, c.LastModifiedDate, c.LastModifiedById, c.IsDeleted, c.Id, c.CreatedDate, c.CreatedById, c.Case__c From Conversation__c c where c.Case__c = :caseID order by c.CreatedDate desc]; } }
  • 14. Conversation List <apex:pageblock id="conversation" title="Conversation Log"> <apex:pageblocksection > <apex:pageblockSectionItem id="coversation_table"> <apex:dataTable value="{!conversations}" var="conv"> <apex:column onclick="selectConversation('{!conv.id}');"> <apex:facet name="header"> {!$ObjectType.Conversation__c.fields.Name.label} </apex:facet> <apex:outputField styleClass="taskdate" value="{!conv.Name}"/> </apex:column> .....
  • 15. Conversation List ..... </apex:dataTable> </apex:pageblockSectionItem> <apex:pageblockSectionItem > <apex:pageblock id="conversationdetail"> <p>{!selectedConversation.Note__c}</p> </apex:pageblock> </apex:pageblockSectionItem> </apex:pageblocksection> </apex:pageblock> </apex:form>
  • 16. Select a Conversation public class ConversationController { ....... public String selectConversationID{ get; set; } public Conversation__c selectedConversation{ public get; private set; } public PageReference selectConversation(){ if( selectConversationID != null ){ /* find the conversation */ for(Conversation__c c : this.conversations ){ if( c.id == (Id)selectConversationID ){ this.selectedConversation = c; return null; } } } return null; } .....
  • 17. Select a Conversation <apex:actionfunction action="{!selectConversation}" rerender="conversationdetail"> <apex:param name="selectConversationID" assignTo="{!selectConversationID}" /> </apex:actionfunction> .... <apex:pageblock id="conversation" title="Conversation Log"> <apex:pageblocksection > <apex:pageblockSectionItem id="coversation_table"> <apex:dataTable value="{!conversations}" var="conv" title="Conversations"> <apex:column onclick="selectConversation('{!conv.id}');"> .... <apex:pageblockSectionItem > <apex:pageblock id="conversationdetail"> <p>{!selectedConversation.Note__c}</p> </apex:pageblock> </apex:pageblockSectionItem> </apex:pageblocksection>