• vipin indora
  • NEWBIE
  • 0 Points
  • Member since 2015

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

this is paginationComponent

<apex:component controller="contactcloudcontroller" >
  <apex:form id="pgBlock">
 <apex:pageBlock >
 <apex:actionFunction action="{!search}" name="callFunc{!paginations}"/>
 <style> 
     #t:hover{
                background-color: #87cefa;
                cursor: pointer;
            }
   </style> 
    <table width="100%" style="font-size: 12pt; border: 1pt solid black;">
        <tr bgcolor="#87cefa">
            <th>First Name</th>
            <th>Last Name</th>
            <th>Email</th>
            <th>Phone</th>
            <th>State</th>
            <th>City</th>
        </tr>
          <apex:repeat value="{!clist}"  var="cont">
            <tr id="t">
                  <td><apex:outputText value="{!cont.firstname}" /></td>
                  <td><apex:outputText value="{!cont.lastname}"/></td>
                  <td><apex:outputText value="{!cont.email}"/></td>
                  <td><apex:outputText value="{!cont.phone}" /></td>
                  <td><apex:outputText value="{!cont.mailingstate}"/></td>
                  <td><apex:outputText value="{!cont.mailingCity}"/></td>
             </tr>
        </apex:repeat>
    </table>
    
     <apex:pageblockButtons >
        <apex:commandButton value="First Page" rerender="pgBlock" action="{!FirstPage}" disabled="{!prev}" immediate="true"/>
        <apex:commandButton value="Previous" action="{!Previous}" immediate="true" rerender="pgBlock" disabled="{!prev}" />
        <apex:commandButton value="Next" action="{!Next}" immediate="true" rerender="pgBlock" disabled="{!nxt}"/>
        <apex:commandButton value="Last Page" rerender="pgBlock" action="{!LastPage}" disabled="{!nxt}" immediate="true"/>
        
   </apex:pageblockButtons>
   </apex:pageBlock> 
</apex:form>
</apex:component>

 

this is searchComponent

<apex:component controller="contactcloudcontroller" allowDML="true">
 <apex:form id="pgBlock">
  <apex:pageMessages />
  
  <apex:pageBlock >
      <apex:pageBlockSection columns="2" collapsible="true">
          <apex:inputField value="{!con.firstname}"/>
          <apex:inputField value="{!con.lastname}" required="false"/>
          <apex:inputField value="{!con.email}"/>
          <apex:inputField value="{!con.phone}"/>
          <apex:inputField value="{!con.MailingState}"/>
          <apex:inputField value="{!con.MailingCity}"/>
          <apex:inputField value="{!con.Accountid}"/>
      </apex:pageBlockSection>
      
      <apex:commandButton value="save" action="{!save}"/>
      <apex:commandButton value="search" action="{!search}" reRender="pgBlock"/>
      
   </apex:pageBlock>
   
  </apex:form>
</apex:component>

 

this is my page

<apex:page controller="contactcloudcontroller" showHeader="true" tabStyle="contact">
  <c:searchComponent />
  <c:paginationComponent />
</apex:page>

i want to display the custom error  message .how to solve the above solution please give any ideas.

Hi,

 

  I want to display the account and related contacts in the same visual force page. Actually i am achieved this like,

i am displayed the account names in first page block and am kept the command link for that account names if we click on that command link that will displayed the contacts related to that particular account in another pageblock. But, Now i want to display the account name first and all related contacts line by line. like that  i want to displat the contacts for all accounts. please any one help me how to solve this...

 

 

example

Maple Lawn Office III
8161 Maple Lawn Blvd
Fulton, MD 20759

Contact: Lydia Chandlee
G & R Management
840 First Street, NE
Washington, DC 20002

Phone: 301-807-0271
Fax: 202-898-0053
Email: 

Contract: No
Inspection Date: 4/6/2010
Inspection Type: Annual
5 Year Test: 2012
Reg/Serial #: HO1863
Service Company: Kone
Equipment Type: Passenger Hydraulic
Annual Price (per unit): $180
Semi-Annual Prince (per unit): $80

Maple Lawn Office III
8161 Maple Lawn Blvd
Fulton, MD 20759

Contact: Lydia Chandlee
G & R Management
840 First Street, NE
Washington, DC 20002

Phone: 301-807-0271
Fax: 202-898-0053
Email: 

Contract: Yes
Inspection Date: 4/6/2010
Inspection Type: Annual
5 Year Test: 2012
Reg/Serial #: HO1863
Service Company: Kone
Equipment Type: Passenger Hydraulic
Annual Price (per unit): $180
Semi-Annual Prince (per unit): $80

 

 

 

thanks,

yamini

  • March 29, 2011
  • Like
  • 0