• j-d
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 1
    Replies
I am trying to build a visual force email template that dynamically builds attachments. The template calls a component that in turn builds an attachment from a visual force page. The approach used is exactly as described here:
http://salesforce.stackexchange.com/questions/8847/passing-standard-controller-sobject-to-a-component-problem-with-custom-fields.

Ideally, I'd like to nest the messaging:attachment tag within a repeat tag. As soon as I add repeat anywhere in the component, the visualforce template itself returns not nothing. If I remove the repeat tag, it returns to normal.

Any advice or insight would be really appreciated.
 
  • March 02, 2015
  • Like
  • 0

I'm unable to pass a date param in a vf page ... am I doing something wrong or is this a bug? Below is an example of the page and controller. It works when passing it into a string field but not when going from date to date. 

 

<apex:page controller="testPage2Con">
    <apex:form id="mainForm">
        <apex:pageBlock >
            <apex:pageBlockSection >
                <apex:outputText value="{!date1}" label="date1"/>
                <apex:outputText value="{!date2}" label="date2"/>
                <apex:outputText value="{!dateString}" label="dateString"/>
                <apex:commandButton value="Set TRX Date" reRender="mainForm" action="{!setDateAction}">
                    <apex:param name="setDate" value="{!date2}" assignTo="{!date1}" />
                    <apex:param name="setDescription" value="{!TEXT(date2)}" assignTo="{!dateString}" />
                </apex:commandButton>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

public class testPage2Con {

    public Date date1{get{return date1;}set;}    
    public String dateString{get{return dateString;}set;}
    
    public Date date2;
    
    public Date getDate2(){
        if(date2 == null)
            date2 = system.today();
        return date2;
    }

    public void setDateAction(){
    
    }

}

 

  • July 25, 2012
  • Like
  • 0

Is this a bug ?

 

An issue seems to recently have surfaced in a visual force application developed by our organization. The issue pertains to table headers in a datatable where each iteration contains columns with a rowspan attribute greater than 1. In the datatable, table headers are being output for every column in the iteration, even for columns after the "breakbefore=true". This only surfaced in the past few weeks.

 

Below is an example of a simple visual force page I've created to illustrate the issue. In the example, there's a datatable where you would expect only 3 th tags to be output. Tthere are actually 5 th tags being output which adversely affects the layout of the table. In our affected application, there are 13 columns output which span 3 rows which means there 26 additional unneeded th tags being output.

 

 

<apex:page standardController="Account">
<apex:pageBlock >
<apex:pageBlockSection columns="1">
<apex:dataTable var="l" value="{!Account.Equipment__r}" styleClass="list" width="100%">
<apex:column value="{!l.Id}" headerValue="Id" rowspan="2" />
<apex:column value="{!l.Name}" headerValue="Name" />
<apex:column value="{!l.unit_desc__c}" headerValue="Desc" />
<apex:column value="{!l.supp_id__r.Name}" breakbefore="true"/>
<apex:column value="{!l.orig_nbv_amt__c}" />
</apex:dataTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:page>

 


 

  • June 17, 2009
  • Like
  • 0

Is there a way to add a custom attribute to an <apex:column> ? I have a little javascript function that I use to sort smaller tables on the client and the function utilizes an attribute called "sortkey" which is usually inserted into the <td> tag. As an example:

 

<td sortkey='1000' sorttype='num'>$1000.00</td>

 

The function uses the sortkey rather than the innerHTML between the td tags to sort. This simplifies the sort, especially when there is a lot of HTML between the td tags.

 

  • February 10, 2009
  • Like
  • 0
The following code in Visual Force seems to be repeating the headers for every row in my data table, effectively creating 7+6+6 = 19 header columns. It properly displays 1 header for column 1 presumably because of the rowspan="3", but not for the others. How would I prevent the headers from repeating for the second and third rows of columns 2 through 7?

<apex:page standardController="Account">
<apex:form >
<apex:pageBlock title="Vendor Budget">
<apex:pageBlockButtons location="top"><apex:commandButton value="Refresh"></apex:commandButton></apex:pageBlockButtons>
    <apex:pageBlockTable value="{!account.Budget__r}" var="budget" cellpadding="0" cellspacing="0" width="100%" columns="7">
        <apex:column rowspan="3">
            <apex:facet name="header">Sales Rep</apex:facet>
            <a href="/{!budget.Id}">{!budget.Owner.Name}</a>
        </apex:column>
        <apex:column >
            <apex:facet name="header">&nbsp;</apex:facet>
            Budget
        </apex:column>
        <apex:column >
            <apex:facet name="header">Q1</apex:facet>
            {!budget.Projected_Q1_Volume__c}
        </apex:column>
        <apex:column >
            <apex:facet name="header">Q2</apex:facet>
            {!budget.Projected_Q2_Volume__c}
        </apex:column>   
        <apex:column >
            <apex:facet name="header">Q3</apex:facet>
            {!budget.Projected_Q3_Volume__c}
        </apex:column>   
        <apex:column >
            <apex:facet name="header">Q4</apex:facet>
            {!budget.Projected_Q4_Volume__c}
        </apex:column>
        <apex:column >
            <apex:facet name="header">Total</apex:facet>
            {!budget.Projected_Annual_Volume__c}
        </apex:column>
        <apex:column breakBefore="True">
            Actual
        </apex:column>
        <apex:column >
            {!budget.Actual_Q1_Volume__c}
        </apex:column>
        <apex:column >
            {!budget.Actual_Q2_Volume__c}
        </apex:column>   
        <apex:column >
            {!budget.Actual_Q3_Volume__c}
        </apex:column>   
        <apex:column >
            {!budget.Actual_Q4_Volume__c}
        </apex:column>
        <apex:column >
            {!budget.Actual_Annual_Volume__c}
        </apex:column>
        <apex:column breakBefore="True" style="font-weight:bold;">
            Variance
        </apex:column>
        <apex:column style="font-weight:bold;">
            {!budget.Q1_Volume_Variance__c}
        </apex:column>
        <apex:column style="font-weight:bold;">
            {!budget.Q2_Volume_Variance__c}
        </apex:column>   
        <apex:column style="font-weight:bold;">
            {!budget.Q3_Volume_Variance__c}
        </apex:column>   
        <apex:column style="font-weight:bold;">
            {!budget.Q4_Volume_Variance__c}
        </apex:column>
        <apex:column style="font-weight:bold;">
            {!budget.Annual_Variance__c}
        </apex:column>     
    </apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>


Message Edited by j-d on 10-31-2008 12:54 PM
  • October 31, 2008
  • Like
  • 0
The following code in Visual Force seems to be repeating the headers for every row in my data table, effectively creating 7+6+6 = 19 header columns. It properly displays 1 header for column 1 presumably because of the rowspan="3", but not for the others. How would I prevent the headers from repeating for the second and third rows of columns 2 through 7?

<apex:page standardController="Account">
<apex:form >
<apex:pageBlock title="Vendor Budget">
<apex:pageBlockButtons location="top"><apex:commandButton value="Refresh"></apex:commandButton></apex:pageBlockButtons>
    <apex:pageBlockTable value="{!account.Budget__r}" var="budget" cellpadding="0" cellspacing="0" width="100%" columns="7">
        <apex:column rowspan="3">
            <apex:facet name="header">Sales Rep</apex:facet>
            <a href="/{!budget.Id}">{!budget.Owner.Name}</a>
        </apex:column>
        <apex:column >
            <apex:facet name="header">&nbsp;</apex:facet>
            Budget
        </apex:column>
        <apex:column >
            <apex:facet name="header">Q1</apex:facet>
            {!budget.Projected_Q1_Volume__c}
        </apex:column>
        <apex:column >
            <apex:facet name="header">Q2</apex:facet>
            {!budget.Projected_Q2_Volume__c}
        </apex:column>   
        <apex:column >
            <apex:facet name="header">Q3</apex:facet>
            {!budget.Projected_Q3_Volume__c}
        </apex:column>   
        <apex:column >
            <apex:facet name="header">Q4</apex:facet>
            {!budget.Projected_Q4_Volume__c}
        </apex:column>
        <apex:column >
            <apex:facet name="header">Total</apex:facet>
            {!budget.Projected_Annual_Volume__c}
        </apex:column>
        <apex:column breakBefore="True">
            Actual
        </apex:column>
        <apex:column >
            {!budget.Actual_Q1_Volume__c}
        </apex:column>
        <apex:column >
            {!budget.Actual_Q2_Volume__c}
        </apex:column>   
        <apex:column >
            {!budget.Actual_Q3_Volume__c}
        </apex:column>   
        <apex:column >
            {!budget.Actual_Q4_Volume__c}
        </apex:column>
        <apex:column >
            {!budget.Actual_Annual_Volume__c}
        </apex:column>
        <apex:column breakBefore="True" style="font-weight:bold;">
            Variance
        </apex:column>
        <apex:column style="font-weight:bold;">
            {!budget.Q1_Volume_Variance__c}
        </apex:column>
        <apex:column style="font-weight:bold;">
            {!budget.Q2_Volume_Variance__c}
        </apex:column>   
        <apex:column style="font-weight:bold;">
            {!budget.Q3_Volume_Variance__c}
        </apex:column>   
        <apex:column style="font-weight:bold;">
            {!budget.Q4_Volume_Variance__c}
        </apex:column>
        <apex:column style="font-weight:bold;">
            {!budget.Annual_Variance__c}
        </apex:column>     
    </apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>


Message Edited by j-d on 10-31-2008 12:54 PM
  • October 31, 2008
  • Like
  • 0