• atifmohd
  • NEWBIE
  • 0 Points
  • Member since 2012

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

how to connect to different objects in visualforce page which is tagged inside an tabs

 

this is my first custom object code

<apex:page standardController="Provider_Group__c" showHeader="true" sidebar="true">
<apex:form >
<apex:detail relatedList="true"/>
<apex:tabpanel switchType="client" selectedTab="tabdetails" id="AccountTabPanel" tabClass="activeTab" inactiveTabClass="inactiveTab" style="Account">
<apex:tab name="Provider Group" label="Provider Group" id="provider">

<apex:pageBlock title="Basic Information" mode="edit" id="providergroup" >
<apex:pageBlockSection columns="1">



<apex:inputfield value="{!Provider_Group__c.Provider_Group__c}" />
<apex:inputfield value="{!Provider_Group__c.Status__c}" />
<apex:inputfield value="{!Provider_Group__c.Type__c}" />
<apex:inputfield value="{!Provider_Group__c.Company_name__c}" />
Notifications*<apex:inputfield value="{!Provider_Group__c.Use_Members_to_Broadcast__c}" />
<apex:inputfield value="{!Provider_Group__c.Group_Worklist__c}" />
<apex:inputfield value="{!Provider_Group__c.Group_Worklists__c}" />
<apex:inputfield value="{!Provider_Group__c.Preferred_Notification__c}" />
<apex:inputfield value="{!Provider_Group__c.Email_Address__c}" />
<apex:inputfield value="{!Provider_Group__c.Comments__c}" />
<apex:inputfield value="{!Provider_Group__c.Currency_Code__c}" />
</apex:pageBlockSection>




</apex:pageBlock>
</apex:tab>

<apex:tab name="Schedule" label="Schedule" id="providerr">
</apex:tab>
</apex:tabpanel>
</apex:form>

</apex:page>

 

i want to connect next program to the tab of schedule which is der in first page

<apex:page StandardController="Schedule__c" standardStylesheets="true">
<apex:form >

<apex:pageBlock title="Schedule">

<apex:pageblockButtons location="bottom" >
<apex:commandButton action="{!Quicksave}" value="save" />
</apex:pageblockButtons>

<apex:pageBlockSection columns="1">

<apex:inputfield value="{!Schedule__c.Time_Zone__c}" />
<apex:inputfield value="{!Schedule__c.Holiday__c}" />

</apex:pageBlockSection>
<apex:pageBlock title="Hours of Operation">
<apex:pageBlockSection >

<apex:pageBlockTable value="{!Schedule__c}" var="opp" cellpadding="5" border="l" headerClass="red" columnsWidth="2" >

<apex:column headerValue="Monday">
<apex:pageBlock title="Hours on Monday">
<apex:pageBlockSection columns="1" >
<apex:inputField value="{!Schedule__c.Monday__c}"/>
<apex:inputField value="{!Schedule__c.Start_Time1__c}"/>
<apex:inputField value="{!Schedule__c.End_Time1__c}"/>
</apex:pageBlockSection>

</apex:pageBlock>
</apex:column>

</apex:pageBlockTable>


<apex:pageBlockTable value="{!Schedule__c}" var="opps" cellpadding="5" border="l" headerClass="red" columnsWidth="5" >
<apex:column headerValue="Tuesday">
<apex:pageBlock title="Hours on Tuesday">
<apex:pageBlockSection columns="1" >
<apex:inputField value="{!Schedule__c.Tuesday__c}"/>
<apex:inputField value="{!Schedule__c.Start_Time2__c}"/>
<apex:inputField value="{!Schedule__c.End_Time2__c}"/>

</apex:pageBlockSection>

</apex:pageBlock>
</apex:column>
</apex:pageBlockTable>

<apex:pageBlockTable value="{!Schedule__c}" var="oppss" cellpadding="5" border="l" headerClass="red" >
<apex:column headerValue="Wednesday">
<apex:pageBlock title="Hours on Wednesday">
<apex:pageBlockSection columns="1" >
<apex:inputField value="{!Schedule__c.Wednesday__c}"/>
<apex:inputField value="{!Schedule__c.Start_Time3__c}"/>
<apex:inputField value="{!Schedule__c.End_Time3__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:column>
</apex:pageBlockTable>

<apex:pageBlockTable value="{!Schedule__c}" var="oppsss" cellpadding="5" border="l" headerClass="red" >
<apex:column headerValue="Thursday">
<apex:pageBlock title="Hours on Thursday">
<apex:pageBlockSection columns="1" >
<apex:inputField value="{!Schedule__c.Thursday__c}"/>
<apex:inputField value="{!Schedule__c.Start_Time4__c}"/>
<apex:inputField value="{!Schedule__c.End_Time4__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:column>
</apex:pageBlockTable>
<apex:pageblockTable value="{!Schedule__c}" var="oppssd" cellpadding="5" border="l" headerClass="red" >
<apex:column headerValue="Friday">
<apex:pageBlock title="Hours on Friday">
<apex:pageBlockSection columns="1" >
<apex:inputField value="{!Schedule__c.Friday__c}"/>
<apex:inputField value="{!Schedule__c.Start_Time5__c}"/>
<apex:inputField value="{!Schedule__c.End_Time5__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:column>
</apex:pageblockTable>
<apex:pageblockTable value="{!Schedule__c}" var="oppsse" cellpadding="5" border="l" headerClass="red" >
<apex:column headerValue="Saturday">
<apex:pageBlock title="Hours on Saturday">
<apex:pageBlockSection columns="1" >
<apex:inputField value="{!Schedule__c.Saturday__c}"/>
<apex:inputField value="{!Schedule__c.Start_Time6__c}"/>
<apex:inputField value="{!Schedule__c.End_Time6__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:column>
</apex:pageblockTable>
<apex:pageblockTable value="{!Schedule__c}" var="oppssu" cellpadding="5" border="l" headerClass="red" >
<apex:column headerValue="Sunday">
<apex:pageBlock title="Hours on Sunday">
<apex:pageBlockSection columns="1" >
<apex:inputField value="{!Schedule__c.Sunday__c}"/>
<apex:inputField value="{!Schedule__c.Start_Time7__c}"/>
<apex:inputField value="{!Schedule__c.End_Time7__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:column>
</apex:pageblockTable>

 

</apex:pageBlockSection>
</apex:pageBlock>
</apex:pageBlock>

</apex:form>

</apex:page>

 

 

Can u tell me how to add two custom objects tabs in same visual force page

Hi - 

 

I found this really cool gantt chart, but for some reason I'm having problem embedding it into my Visual Force page. The link of the gantt chart is the following:

 

http://dhtmlx.com/docs/products/dhtmlxGantt/index.shtml

 

I was wondering if anyone can help me figure out what's wrong with the below code? I'm not really getting any error message but the inspect element has "Uncaught TypeError: Cannot call method 'addEventListener' of null". 

 

 

<apex:page >

    <apex:stylesheet value="{!URLFOR($Resource.Timeline, 'codebase/dhtmlxgantt.css')}"/>
    <script type="text/javascript" language="JavaScript" src="{!URLFOR($Resource.Timeline, 'codebase/dhtmlxcommon.js')}"></script>
    <script type="text/javascript" language="JavaScript" src="{!URLFOR($Resource.Timeline, 'codebase/dhtmlxgantt.js')}"></script>


    <head>


    <script language="JavaScript" type="text/javascript">
        function createChartControl(htmlDiv1)
        {
            //project 1
            var project1 = new GanttProjectInfo(1, "Applet 11redesign", new Date(2010, 5, 11));
    
            var parentTask1 = new GanttTaskInfo(1, "Old code review", new Date(2010, 5, 11), 208, 50, "");
            parentTask1.addChildTask(new GanttTaskInfo(2, "Convert to J#", new Date(2010, 5, 11), 100, 40, ""));
            parentTask1.addChildTask(new GanttTaskInfo(13, "Add new functions", new Date(2010, 5, 12), 80, 90, ""));
    
            var parentTask2 = new GanttTaskInfo(3, "Hosted Control", new Date(2010, 6, 7), 190, 80, "1");
            var parentTask5 = new GanttTaskInfo(5, "J# interfaces", new Date(2010, 6, 14), 60, 70, "6");
            var parentTask123 = new GanttTaskInfo(123, "use GUIDs", new Date(2010, 6, 14), 60, 70, "");
            parentTask5.addChildTask(parentTask123);
            parentTask2.addChildTask(parentTask5);
            parentTask2.addChildTask(new GanttTaskInfo(6, "Task D", new Date(2010, 6, 10), 30, 80, "14"));
    
            var parentTask4 = new GanttTaskInfo(7, "Unit testing", new Date(2010, 6, 15), 118, 80, "6");
            var parentTask8 = new GanttTaskInfo(8, "core (com)", new Date(2010, 6, 15), 100, 10, "");
            parentTask8.addChildTask(new GanttTaskInfo(55555, "validate uids", new Date(2010, 6, 20), 60, 10, ""));
            parentTask4.addChildTask(parentTask8);
            parentTask4.addChildTask(new GanttTaskInfo(9, "Stress test", new Date(2010, 6, 15), 80, 50, ""));
            parentTask4.addChildTask(new GanttTaskInfo(10, "User interfaces", new Date(2010, 6, 16), 80, 10, ""));
            parentTask2.addChildTask(parentTask4);
    
            parentTask2.addChildTask(new GanttTaskInfo(11, "Testing, QA", new Date(2010, 6, 21), 60, 100, "6"));
            parentTask2.addChildTask(new GanttTaskInfo(12, "Task B (Jim)", new Date(2010, 6, 8), 110, 1, "14"));
            parentTask2.addChildTask(new GanttTaskInfo(14, "Task A", new Date(2010, 6, 7), 8, 10, ""));
            parentTask2.addChildTask(new GanttTaskInfo(15, "Task C", new Date(2010, 6, 9), 110, 90, "14"));
    
            project1.addTask(parentTask1);
            project1.addTask(parentTask2);
    
            //project 2
            var project2 = new GanttProjectInfo(2, "Web Design", new Date(2010, 5, 17));
    
            var parentTask22 = new GanttTaskInfo(62, "Fill HTML pages", new Date(2010, 5, 17), 157, 50, "");
            parentTask22.addChildTask(new GanttTaskInfo(63, "Cut images", new Date(2010, 5, 22), 78, 40, ""));
            parentTask22.addChildTask(new GanttTaskInfo(64, "Manage CSS", null, 90, 90, ""));
            project2.addTask(parentTask22);
    
            var parentTask70 = new GanttTaskInfo(70, "PHP coding", new Date(2010, 5, 18), 120, 10, "");
            parentTask70.addChildTask(new GanttTaskInfo(71, "Purchase D control", new Date(2010, 5, 18), 50, 0, ""));
            project2.addTask(parentTask70);
    
            var ganttChartControl = new GanttChart();
            ganttChartControl.setImagePath("{!URLFOR($Resource.Timeline, 'codebase/imgs/')}");
            
            ganttChartControl.setEditable(true);
            
            ganttChartControl.addProject(project1);
            
            ganttChartControl.create(htmlDiv1);
        }
    </script>
    
    <style>
        body {font-size:12px}
        .{font-family:arial;font-size:12px}
        h1 {cursor:hand;font-size:16px;margin-left:10px;line-height:10px}
        xmp {color:green;font-size:12px;margin:0px;font-family:courier;background-color:#e6e6fa;padding:2px}
        .hdr{
            background-color:lightgrey;
            margin-bottom:10px;
            padding-left:10px;
        }
    </style>

    </head>

    <body onload="createChartControl('GanttDiv');">
        <div style="width:950px;height:620px;position:absolute;" id="GanttDiv"></div>
    </body>



</apex:page>