What's the deal with Deno? We talk with a major contributor to find out. Listen now.

Hot answers tagged

16

The problem was you misspelled currency. This works fine and avoids hard coding the currency symbol: <apex:outputText value="{0, Number, Currency}">


14

Building on the answer provided already by @sfdcfox, this following seems to be working for me and allows me to componentize the entire row (much easier to emit events this way). parent.html <table class="slds-table slds-table_bordered slds-border_left slds-border_right"> <thead> <tr class="slds-line-height_reset"> <th ...


13

As @MattLacey said, use the apex:facet inside of an apex:column. Once you do that, you can either write the implementation of the checkAll / uncheckAll to be strictly client side with JavaScript or you can use built-in Visualforce for everything. Client Side (JavaScript) You could use jQuery or just plain old JavaScript to implement a checkAll / ...


11

You need to use breakBefore and colspan parameters of the apex:column: <apex:pageBlock> <apex:pageblocksection title="Order Lines" showheader="true" collapsible="true" columns="1"> <apex:pageBlockTable value="{!accounts}" var="a"> <apex:column value="{!a.Name}"/> <apex:column value="{!a.Street__c}"/> ...


10

From my comment: <apex:outputText value="${0, number, ###,###,##0.00}"> works as well. The hashes display numbers in that position if they exist. So it will display $3.14 instead of $000,003.14 as in the example using ${0, number, 000,000.00}


10

You could use inner wrapper class as an abstraction of your vehicle object, create and populate list of those custom objects, and finally make the binding in the VF page to use the list of custom objects: Controller: public with sharing class YourController { public List<Vehicle> vehicles { get; set; } public YourController(ApexPages....


10

The SLDS table header row can be fixed using standard classes. There are two classes that are important slds-table–header-fixed_container and slds-cell-fixed and i created a working example on github please refer this link for sample code Github link The detailed explanation is on link SLDS framework data-table with fixed header without javascript Edited ...


9

I found an easy solution for the problem, no need to implement any logic for the same just included the following attribute -fs-table-paginate: paginate; in tables style tag and worked like a miracle.


8

Try this : SELECT Id, description, title, [...] FROM Product2 WHERE Id in (SELECT Product2Id FROM PricebookEntry) AND reference LIKE '%MyProductRef%');


7

Using CSS, you can specify :nth-child(odd) or :nth-child(even) in order to alternate colors per row. This is compatible with the PDF renderer. <style> table tr:nth-child(even) { background: #ccc; } table tr:nth-child(odd) { background: #aaa; } </style>


7

I would just use the apex:dataTable component. Yes, it goes slightly against your description, but it generates pretty clean HTML as opposed to other options. http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_dataTable.htm The other option is to utilize apex:repeat to generate your own table HTML such as: <table> <apex:...


7

You need to use <apex param> along with <apex:outputText> by specifying the proper parameters for it to be output in. Here's an example from the VF Developer's Guide: <!-- For this example to render properly, you must associate the Visualforce page with a valid account record in the URL. For example, if 001D000000IeChM is the account ID, the ...


7

You can pass a javascript function the Id of the record you are working with and then open a VF page with the Id as a URL parameter. This is assuming you are using a PageBlockTable to iterate over your records and you have a command button in a column in that table. I took some code that I have used in the past as an example <apex:column headerValue="...


6

One possible non-jQuery solution: <script> function findParent(el, tagName) { tagName = tagName.toLowerCase(); do { el = el.parentNode; if (el.tagName.toLowerCase() === tagName) { return el; } } while (el.parentNode); return null; } function highlight(...


6

I'm afraid we don't have a good news for you ;) http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_sosc_pagination.htm By default, a list controller returns 20 records on the page. To control the number of records displayed on each page, use a controller extension to set the pageSize. So you either display the previous / next ...


6

What you could do is loop over your records and write regular HTML. Count the rows you wish to show, and then check each cycle with a remainder division (where the divisor is the amount of columns you want) if you need to write a new tablerow. I was a bit bored, and decided to do this: My Controller/Extension: public with sharing class Tester { public ...


6

You need to use outputText instead of outputPanel. outputPanel is intended to be used as reRender targets, and to group content together. The documentation for outputPanel states: A set of content that is grouped together, rendered with an HTML <span> tag, <div> tag, or neither. Use an <apex:outputPanel> to group components together for ...


6

Just use a List<SObject> property. Your controller should look something like: public with sharing class MyController { public List<SObject> tasksAndNotes { get; private set; } public MyController() { tasksAndNotes = new List<SObject>(); tasksAndNotes.addAll([SELECT ... FROM Task WHERE ...]); ...


6

Ideally, you shouldn't use table; lightning-layout and lightning-layout-item work as tables for all practical purposes. If that doesn't work for you, then you'd want to simply apply the appropriate CSS to your components. Row Display :host { display: table-row; } Cell Display :host { display: table-cell; } I seem to be having a problem writing a ...


5

Sounds like a job for <apex:panelGrid>? <apex:page> <apex:panelGrid columns="3" id="theGrid"> <apex:outputText value="First" id="theFirst"/> <apex:outputText value="Second" id="theSecond"/> <apex:outputText value="Third" id="theThird"/> <apex:outputText value="Fourth" id="theFourth"/&...


5

Very first link from my google results has it all: <apex:facet name="header"> <table border="1" width="100%"> <tr> <td width="50%" rowspan="2">Other header</td> <td colspan="2">header group</td> </tr> <tr> <td width="25%">A</td> ...


5

I believe this is happening due to the table falling on a page-break-zone. You can add the following style style="page-break-inside: avoid;" to your div inside the apex:repeat, it will ensure no div is placed in the page-break-zone. <apex:repeat value="{!mapOfQuesToAnsToYearToMaleOrFemaleCount}" var="quesID" rendered="{!hasResults}"> <...


5

Create a wrapper class to represent the object they share in common. That seems to be the Commission__c field. public class CommissionWrapper { // May need to be lists public Commission_Setting__c min { get; set; } public Commission_Setting__c otc { get; set; } public CommissionWrapper(Commission_Setting__c min, Commission_Setting__c otc)...


4

You can't merge the cells. But you can play with columns parameter and nesting another panel grid into the first one, but with a different columns number. Here is my example: <style> .colClass{ width:50%; padding: 5px; } .myHeader { background: #cecece; font-weight: bold; } </style> <apex:panelGrid columns="1" width="500" ...


4

One simple way to give alternating colors for a table is to use <apex:dataTable classes="odd,even">. then add the below css code: <style> .odd { background-color:#FFFF66; } .even { background-color:#8F2400; } </style>


4

In order to create a layout like you want you can use a nested pageBlockSection element. The first "wrapper" section has only one column and the nested section - two. A simple combibation of those two sections results like this: Here is the code. Note that the CSS is used only to remove the unnecessary paddings so the columns looks like the same: <...


4

you may use tabindex to get index from Lighting:button <lightning:button tabindex="{!index}" class="deleteButtons" label="del" iconName="utility:delete" iconPosition="left" onclick="{!c.deleteRow}"/> In controller deleteRow:function (component, event, helper) { console.log("Check",event.getSource().get("v.tabindex")); }


4

Examples such as this one HTML rowspan Attribute reduce the number of td elements in the following rows (as rowspan is effectively saying use the content from the previous row). So you need to modify your code to only output these td elements once in every 3 rows: <td rowspan="3">{!fd.Business_Devision__c}</td> ...


4

You can use the Hyphenation from SLDS. The hyphenation class should be placed on text that might be served in narrow width containers and is not truncated. <div class="slds-grid slds-gutters"> <div class="slds-col slds-size_2-of-12"> <span>Docent(e):</span><br/> <span>Categorie:</span&...


4

Instead of e.g.: value="{!v.con.janTotal}" for your case it is just e.g.: value="{!con.janTotal}" Inconsistently, the v. prefix is required to access aura:attribute values but not to access the var of an aura:iteration.


Only top voted, non community-wiki answers of a minimum length are eligible