• kannapapi
  • NEWBIE
  • 70 Points
  • Member since 2013

  • Chatter
    Feed
  • 1
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 30
    Questions
  • 13
    Replies
Here I am trying to pass id value from first page (pageonepagetwo) to another page (pagetwo), by clicking the button in page one i want to pass the id value to the pagetwo, in pagetwo i am having the table, this table need to display the contacts based on the account id

page one:(pageonepagetwo)

<apex:page controller="PageOne">
<apex:form > 
  <apex:pageblock >
        <apex:pageblocksection >
            <apex:commandButton value="Show Table" action="{!showTable}"/>
           
        </apex:pageblocksection>
    </apex:pageblock>
</apex:form>
</apex:page>

******controller*******
public class PageOne
{
    public void showTable()
    {
    PageReference pr;
    pr = Page.pagetwo; // use the name of the second VF page
    pr.setRedirect(true);
    pr.getParameters().put('id','00190000015yBQ6');
    }
}


Second two: (pagetwo)

<apex:page controller="Secondtwo">
    <apex:pageblock title="TableData Based on another page">
        <apex:pageblocktable value="{!TableData}" var="data">
            <apex:column >{!data.name}</apex:column>
        </apex:pageblocktable>
    </apex:pageblock>
</apex:page>
******** controller***************
public class Secondtwo
{
    public list<contact> TableData{set;get;}
    public Secondtwo()
    {
        TableData=[select name from contact where accountid=:ApexPages.currentPage().getParameters().get('id')];  
    }
}


Hi I have a apex:page header like this:

<apex:page standardController="Opportunity" showHeader="true" extensions="SampleOpportunityControllerExt" action="{!if(isSampleRequest,
     null,
     urlFor($Action.Opportunity.Edit, Opportunity.Id, [retURL="/apex/OpportunityView?id="+Opportunity.Id], true))}" > 

When i login through Salesforce1 app redirection not working.

Could anyone help me how to achieve this for both desktop and salesforce1.

Thanks in Advance!
Hi,
When validating my changeset in production it throws an error on  static resources as:
An unexpected error occurred. - no other description apart from it.
Ans also showing errors on visualforce pages and components where ever we atre referring the static resources.
But the same changeset  we are able to validate in other sandboxes successfully.
 
hi
i want autocomplete functionality on lookup field.
So i wrote jquery for autocomplete.
when i tried to use in apex:inputField it is not working.
 In apex:inputText it is working.But the problem is it is displaying id of the record and not the name.
When using in apex:inputField the lookup is showing like this..
[User-added image]
Code Snipprt:
<script type="text/javascript">  
        var jq = jQuery.noConflict();   
        var apexACList =[];               
        <apex:repeat value="{!listAC}" var="ACList">          
            apexACList.push('{!ACList.WS_User__r.name}');         
        </apex:repeat> 
        jq(document).ready(function(){ 
            jq(".acautocomplete").autocomplete({
                source : apexACList 
            }); 
            
        }); 
<apex:inputField value="{!relList.Person__c}" styleClass="acautocomplete"   />
Can anybody help me on this..
hi
i want autocomplete functionality on lookup field.
So i wrote jquery for autocomplete.
when i tried to use in apex:inputField it is not working.
 In apex:inputText it is working.But the problem is it is displaying id of the record and not the name.
When using in apex:inputField the lookup is showing like this..
User-added image
Code Snipprt:
<script type="text/javascript">  
        var jq = jQuery.noConflict();   
        var apexACList =[];               
        <apex:repeat value="{!listAC}" var="ACList">          
            apexACList.push('{!ACList.WS_User__r.name}');         
        </apex:repeat> 
        jq(document).ready(function(){ 
            jq(".acautocomplete").autocomplete({
                source : apexACList 
            }); 
            
        }); 
<apex:inputField value="{!relList.Person__c}" styleClass="acautocomplete"   />
Can anybody help me on this..

Hi,

For creating events through vf page i am using Event Standard Controller. Also i am showing the attachment related list in the edit page. My requirement is,If the user is attaching files before event creation it should be successfully attached and should be shown in the related list. After event cration attachments should have event id as parentId. Can anybody help me on this?

Hi,
 In my visualforce page i am using getContentAsPDF() for generating feeditem.
After saving the data i am generating feeditem. At this point Feeditem is not having recently saved data.
i suspect getContentAsPDF() not getting the recent data.
Can anybody help me on this?

 
Hi All,
How to get photoURL from FeedItem object?
i have tried Createdby.smallphotourl but it's not working for FeedItem object...
Hi,
i am having rich text field in my visualforce page where i am entering the string like this:
The Value "Numaber" & 'Text' 
After saving the record the value in rich text field becomes like this: 
The Value &quot;Numaber&quot; &amp; &#39;Text&#39;
How to avoid this?
Hi,
i am having rich text field in my visualforce page where i am entering the string like this:
The Value "Numaber" & 'Text' 
After saving the record the value in rich text field becomes like this: 
The Value &quot;Numaber&quot; &amp; &#39;Text&#39;
How to avoid this?
Hi,
i am having 1*1 dimensional array like this
{1,2,3,4
5,6,7,8
9,10,11,12}
i need multi dimensional array(4* 4 matrix) by spliiting (,) like this:
{1 2 3 4
 5 6 7 8 
9 10 11 12}
Any help appreciated..
Hi,
i want to pass apex:repeat value to the controller..is there anyway?
<apex:repeat value="{!projectRolls}" var="r"> 
       <li class="{!r}">   {!r.Name__c}
        </li>
</apex:repeat>

here, i want  to pass {!r.Name__C} to controller.. how to do that?
hi,
i am having .csv file which i need to process columnwise in apex. Can anybody help me on this?
Thanks in advance
Hi all,
      I am having the rquirement like this:  i am in page 1 where i am entering the data in form and when pressing print button page 2 has to be printed. Page 2 have the values which i have entered in page 1. Can anyone help me on this?
Hi All,
i want  to create dynamic tab in visualforce. Under each tab i should have data table and apex:inputFile. The tab, datat table should have custom style.
how to achieve this? 

Visualforce:
<apex:dynamicComponent componentValue="{!myTabs}"/>

apex:

public Component.Apex.TabPanel getMyTabs()
{
//create parent panel
Component.Apex.TabPanel myTabPanel = new Component.Apex.TabPanel();
for (integer i=0;i<3;i++) //just a sample, this could easily be a SOQL loop
{
Component.Apex.Tab myTab = new Component.Apex.Tab();
myTab.Label = 'Tab ' + string.valueOf(i+1);
 //add child tabs to the parent myTabPanel.childComponents.add(myTab);
}
return myTabPanel;
}
Hi All,
i want  to create dynamic tab in visualforce. Under each tab i should have data table and apex:inputFile. The tab, datat table should have custom style.
how to achieve this? 

Visualforce:
<apex:dynamicComponent componentValue="{!myTabs}"/>

apex:

public Component.Apex.TabPanel getMyTabs()
{
//create parent panel
Component.Apex.TabPanel myTabPanel = new Component.Apex.TabPanel();
for (integer i=0;i<3;i++) //just a sample, this could easily be a SOQL loop
{
Component.Apex.Tab myTab = new Component.Apex.Tab();
myTab.Label = 'Tab ' + string.valueOf(i+1);
 //add child tabs to the parent myTabPanel.childComponents.add(myTab);
}
return myTabPanel;
}

 
Hi,
i am rendering visualforce page as pdf which contains image(rich text field) and text fields. Then i am posting the pdf in feeditem. In pdf the image is not getting displayed.
Can anyone help on this?
Hi,
i am rendering visualforce page as pdf which contains image(rich text field) and text fields. Then i am posting the pdf in feeditem. In pdf the image is not getting displayed.
Can anyone help on this?
Hi,
i am having rich text field in objext, there i am uploading image. Then i am rendering the page as pdf and posting in chatter.
i can able to see all the field values except richtext field in chatter post..
can anyone help on this?

                       PageReference PR=Page.ImagePDF;
                        PR.getParameters().put('id',i.Id);
                        blob pdf = PR.getContent();
                        feeditem a = new feeditem();
                        a.ContentData = pdf;
                        a.Type = 'ContentPost';
                        a.ContentFileName = 'image.pdf';
                        a.parentid = UserInfo.getUserId();
                        insert a;
For example, i am having Page A & B....Page A having export button...if i click this button it has to render Page B as pdf but it should not go to page B and has to stay with Page A. How to do this?

<script type="text/javascript">
        var jq = jQuery.noConflict();
        var apexAccountList =[];                
        <apex:repeat value="{!listofname}" var="namList">       
            apexAccountList.push('{!namList.Name__c}');      
        </apex:repeat>
        console.log(apexAccountList+'hi');
     
        //on Document ready
        jq(document).ready(function(){
            jq(".brandautocomplete").autocomplete({
                source : apexAccountList
            });
        }); 
    </script>
Hi All,
i want  to create dynamic tab in visualforce. Under each tab i should have data table and apex:inputFile. The tab, datat table should have custom style.
how to achieve this? 

Visualforce:
<apex:dynamicComponent componentValue="{!myTabs}"/>

apex:

public Component.Apex.TabPanel getMyTabs()
{
//create parent panel
Component.Apex.TabPanel myTabPanel = new Component.Apex.TabPanel();
for (integer i=0;i<3;i++) //just a sample, this could easily be a SOQL loop
{
Component.Apex.Tab myTab = new Component.Apex.Tab();
myTab.Label = 'Tab ' + string.valueOf(i+1);
 //add child tabs to the parent myTabPanel.childComponents.add(myTab);
}
return myTabPanel;
}
Hi,
For my business requirements, i need to create bubble chart with the values from controller class. Anybody having idea on this? i have already referred some article in http://peterknolle.com/analytics-api-in-apex-google-bubble-chart/ and in oyecode blog..but not that much helpful..

Hi,

For creating events through vf page i am using Event Standard Controller. Also i am showing the attachment related list in the edit page. My requirement is,If the user is attaching files before event creation it should be successfully attached and should be shown in the related list. After event cration attachments should have event id as parentId. Can anybody help me on this?

Hi All,
How to get photoURL from FeedItem object?
i have tried Createdby.smallphotourl but it's not working for FeedItem object...
Hi,
i am having rich text field in my visualforce page where i am entering the string like this:
The Value "Numaber" & 'Text' 
After saving the record the value in rich text field becomes like this: 
The Value &quot;Numaber&quot; &amp; &#39;Text&#39;
How to avoid this?
Hi All,
i want  to create dynamic tab in visualforce. Under each tab i should have data table and apex:inputFile. The tab, datat table should have custom style.
how to achieve this? 

Visualforce:
<apex:dynamicComponent componentValue="{!myTabs}"/>

apex:

public Component.Apex.TabPanel getMyTabs()
{
//create parent panel
Component.Apex.TabPanel myTabPanel = new Component.Apex.TabPanel();
for (integer i=0;i<3;i++) //just a sample, this could easily be a SOQL loop
{
Component.Apex.Tab myTab = new Component.Apex.Tab();
myTab.Label = 'Tab ' + string.valueOf(i+1);
 //add child tabs to the parent myTabPanel.childComponents.add(myTab);
}
return myTabPanel;
}
Hi All,
i want  to create dynamic tab in visualforce. Under each tab i should have data table and apex:inputFile. The tab, datat table should have custom style.
how to achieve this? 

Visualforce:
<apex:dynamicComponent componentValue="{!myTabs}"/>

apex:

public Component.Apex.TabPanel getMyTabs()
{
//create parent panel
Component.Apex.TabPanel myTabPanel = new Component.Apex.TabPanel();
for (integer i=0;i<3;i++) //just a sample, this could easily be a SOQL loop
{
Component.Apex.Tab myTab = new Component.Apex.Tab();
myTab.Label = 'Tab ' + string.valueOf(i+1);
 //add child tabs to the parent myTabPanel.childComponents.add(myTab);
}
return myTabPanel;
}

 
Here I am trying to pass id value from first page (pageonepagetwo) to another page (pagetwo), by clicking the button in page one i want to pass the id value to the pagetwo, in pagetwo i am having the table, this table need to display the contacts based on the account id

page one:(pageonepagetwo)

<apex:page controller="PageOne">
<apex:form > 
  <apex:pageblock >
        <apex:pageblocksection >
            <apex:commandButton value="Show Table" action="{!showTable}"/>
           
        </apex:pageblocksection>
    </apex:pageblock>
</apex:form>
</apex:page>

******controller*******
public class PageOne
{
    public void showTable()
    {
    PageReference pr;
    pr = Page.pagetwo; // use the name of the second VF page
    pr.setRedirect(true);
    pr.getParameters().put('id','00190000015yBQ6');
    }
}


Second two: (pagetwo)

<apex:page controller="Secondtwo">
    <apex:pageblock title="TableData Based on another page">
        <apex:pageblocktable value="{!TableData}" var="data">
            <apex:column >{!data.name}</apex:column>
        </apex:pageblocktable>
    </apex:pageblock>
</apex:page>
******** controller***************
public class Secondtwo
{
    public list<contact> TableData{set;get;}
    public Secondtwo()
    {
        TableData=[select name from contact where accountid=:ApexPages.currentPage().getParameters().get('id')];  
    }
}

hi,
i need to count the characters from all the fields in visualforce page. currently i am able to count the characters from single field. can anyone help me to count the characters from all fields?

<script>
        var i;
        function ShowCharCount(myTA, maxSize, SizeLabel) {
                i=maxSize-myTA.value.length;
                document.getElementById(SizeLabel).innerHTML =  'Word Count: '+ i + ' Characters Left';
                i= maxSize; 
        }
</script>


<apex:inputField value="{!c.name__c}"
                    onchange="ShowCharCount(this, 2000, '{!$Component.myTASize}');"
                    onmousedown="ShowCharCount(this, 2000, '{!$Component.myTASize}');"
                    onkeyup="ShowCharCount(this, 2000, '{!$Component.myTASize}');"
                    onkeydown="ShowCharCount(this, 2000, '{!$Component.myTASize}');"
                    onclick="ShowCharCount(this, 2000, '{!$Component.myTASize}');" />

<apex:inputTextarea value="{!c.address__c}"
                   onchange="ShowCharCount(this, 2000, '{!$Component.myTASize}');"
                    onmousedown="ShowCharCount(this, 2000, '{!$Component.myTASize}');"
                    onkeyup="ShowCharCount(this, 2000, '{!$Component.myTASize}');"
                    onkeydown="ShowCharCount(this, 2000, '{!$Component.myTASize}');"
                    onclick="ShowCharCount(this, 2000, '{!$Component.myTASize}');"  />

<apex:outputPanel id="myTASize"></apex:outputPanel>
Hi All,

We need this to be  working across all the browsers. Also tried windows.close() & windows.top.close() on line   but this code is working only in IE browser & incompatible with Chrome and Firefox.
Also the development mode is also switched off/turned off.
Please advise how to make it work in chrome & Firefox as well.


<apex:page showHeader="false" sidebar="false"  tabStyle="Account"  >
<apex:form >
<script language="javascript" >
   function Confirmation() {
    if (confirm("Are you sure you want to close the tab?") == true)
    window.top.close()
    else
     return false
   }

   </script>
<apex:PageBlock >
   <h1 align="center">Thank you for your participation</h1>
  <apex:pageBlockButtons location="Bottom" style="align=center"  >
   <apex:commandButton onclick="Confirmation()" value="Close" />
  </apex:pageBlockButtons>
</apex:PageBlock>
</apex:form>
</apex:page>

<apex:page name="Queue Criteria" tabStyle="Contact" id="Page"  title="Criteria"  standardController="Queue_Criteria__c" extensions="QueueCriteriaStdController">
    <apex:form id="Form" title="Criteria">
        <apex:sectionHeader title="Queue Criteria" subtitle="New Queue Criteria" id="PSHeader"/>
        <apex:pageBlock title="Queue Criteria Edit" id="PBlock" tabStyle="Contact" mode="edit">
            <apex:pageMessages >
            </apex:pageMessages>
            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!save}" />
                <apex:commandButton value="Save & New" />
                <apex:commandButton value="Cancel" action="{!cancel}" />
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="Information" columns="2" id="PBSection" collapsible="false">
                <apex:inputField value="{!Queue_Criteria__c.Name__c}" required="true"/>
                <apex:inputField value="{!Queue_Criteria__c.Contact_Name__c}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection columns="1"  collapsible="false" >
                <apex:selectList > value="{!Queue_Criteria__c.Operator__c}" required="true" >
                <apex:actionSupport event="onmouseover" reRender="UBV2"/>
                </apex:selectList>
                <apex:inputField value="{!Queue_Criteria__c.Bounded_Value__c}"/>
                <apex:inputField value="{!Queue_Criteria__c.UnBounded_Value1__c}" styleClass="hidden"/>
                </apex:pageBlockSection>
                                <apex:outputPanel id="UBV2"  >
                                <apex:pageBlockSection id="pbs" rendered="{!IF((Queue_Criteria__c.Operator__c=='Between'),true,false)}" >
              
                <apex:inputField value="{!Queue_Criteria__c.UnBounded_Value2__c}"  />                  
                               </apex:pageBlockSection>
                                </apex:outputPanel>

                    </apex:pageBlock>
    </apex:form>     
    <script>
    function callUBV()
    {
    var Opr=document.getElementById('Page:Form:PBlock:j_id32:j_id33').value;
           
    }
    </script>
</apex:page>

I need to rerender visualforce when a user selects an item from a picklist.  I only want to show the records related to the item chosen.

 

<apex:page standardController="Repository__c" extensions="PrinterDetails" >
    <apex:form >
        <apex:pageBlock id="thePageBlock" >
          <apex:actionRegion >
              <apex:pageBlockSection title="Printer Information" columns="1">
                  <apex:inputField value="{!Repository__c.name"/>
                  <apex:pageBlockSectionItem>
                      <apex:outputLabel value="Address Name"/>
                      <apex:outputPanel>
                          <apex:inputField value="{!Repository__c.Address_Name__c}">
                              <apex:actionSupport event="onchange" rerender="thePageBlock" status="status"/>
                          </apex:inputField>
                          <apex:actionStatus startText="applying value..." id="status"/>
                       </apex:outputPanel>
                  </apex:pageBlockSectionItem>
              </apex:pageBlockSection>
          </apex:actionRegion>
            <apex:pageblockTable value="{!PrinterDetails}" var="printers" id="table">
                <apex:column value="{!printers.name}" headerValue="Serial Number"/>
                <apex:column value="{!printers.Address_Name__c}" headerValue="Address Name"/>
            </apex:pageblockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>