Export the search results in .pdfs and Excel - oracle-adf

I have requirement to export search results in PDFs and Excel. Export is the command button is of drop down list PDFs and Excel how to achieve this.
I have already implemented by using report declarative component but its not take the data:
<report:reportDeclarative ButtonName="Export"
IteratorName="#{bindings.MChecklistVO1Iterator}"
ReportName="Checklist Instruction Template"
ReportType="EXCEL,PDF" TableId="tt1" id="rd1"
SerialColumnHeader="#{ngb_bizfile_e_portalBundle.SERIAL_NO}"
rendered="#{pageFlowScope.checklistInstructionBean.searchDetailsRender}" Pagination="true"
SerialNumber="false"/>
<af:spacer width="10" height="10" id="s3"/>

if you have a table or tree in your jsf page you can use Export Collection Action listener
in your button

Related

Is there a way to create an onClick event to a button within a sync fusion data grid?

I have the following code block in a blazor winform and i'm trying to add a button with an on click event to the id field to edit that row's data in a new form but after scouring documentation I cannot find a way to do this that isn't just changing the fields in the table directly.
<SfGrid DataSource="#Customers" RowHeight="20" AllowPaging="true" AllowSorting="true" AllowFiltering="true">
<GridPageSettings PageSize="50"></GridPageSettings>
<GridColumns>
<GridColumn Field=#nameof(Customer.Id) HeaderText="Id" Width="120"></GridColumn>
<GridColumn Field=#nameof(Customer.Name) HeaderText="Name" Width="120"></GridColumn>
<GridColumn Field=#nameof(Customer.Email) HeaderText="Email" Width="120"></GridColumn>
<GridColumn Field=#nameof(Customer.Password) HeaderText="Password" Width="120"</GridColumn>
</GridColumns>
</SfGrid>
I have only tried to accomplish this by creating an onclick event as you would in a traditional html table but I don't believe this can be accomplished within a data grid.
Using Template you can mainly fully customize the content of a GridColumn:
...
<GridColumn HeaderText="Actions" TextAlign="TextAlign.Center" Width="120">
<Template>
#{
Customer customer = (context as Customer);
<button #onclick="() => OpenEditCustomerForm(customer)">Edit</button>
}
</Template>
</GridColumn>
...
Documentation
As per your needs, I suggest using the grid column's column template feature, which allows you to customize your needs. Please refer to the UG documentation mentioned below for your reference.
Documentation: https://blazor.syncfusion.com/documentation/datagrid/column-template

How to reference a custom metadata in Aura component?

I have an Aura component that calls an external CSS thru <ltng:require> tags. I need to save the URLs in a custom metadata or maybe custom label in Salesforce rather than hardcoded URLs in the .cmp
Snippet of .CMP
<ltng:require scripts="{!join(',',
'https://simpleui-test-au.vixverify.com/df/javascripts/greenidConfig.js',
'https://simpleui-test-au.vixverify.com/df/javascripts/greenidui.min.js')}"
afterScriptsLoaded="{! c.onLoadScript }"/>
<ltng:require styles="https://simpleui-test-au.vixverify.com/df/assets/stylesheets/greenid-mobile.css"/> ```
H newbiedev,
You can access the value of a Custom Label in your Aura Component markup by using the following syntax inside an expression: (https://developer.salesforce.com/docs/atlas.en-us.232.0.lightning.meta/lightning/labels_value_provider_platform.htm)
$Label.c.labelName
So you could use it in your require tag as follows once the Custom Labels are created:
<ltng:require scripts="{!join(',',
$Label.c.MyLabel1,
$Label.c.MyLabel2)}"
afterScriptsLoaded="{! c.onLoadScript }"/>
<ltng:require styles="{!$Label.c.MyLabel3}"/> ```

Redirect from any component to another page in adf

Hello im new on af and I´m trying to redirect by clicking on any adf component to another page. But i dont want to use javascript only with adf and beans.
I have been looking for something similar to the onclick of javascript that you can use it on any html element and with a click you can invoke a function.
On my test i had tried to redirect to another page by clicking on a af:inputText like when i click on an af:link and execute the action with the name of the control flow case for navigate from one activity to another, looking on the documentation, the af:inputText doesn´t have any onclick/action event or something similar.
primera.jsff
<?xml version='1.0' encoding='UTF-8'?>
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<!--af:link When i click on it i get redirected to another jsff page on my project -->
<af:link text="link 1" id="link1" action="gonext"></af:link>
<!--I want a similar behavior here -->
<af:inputText label="Label 1" id="it1"/>
</ui:composition>
My task-flow has defined a control flow case from primera.jsff to a empty segunda.jsff named gonext
I just want the similar behavior on the af:inputText than on the af:link, but only using adf not javascript code. Thanks and sorry for the redaction.

how to export data to PDF from dynamic table in AngularJS

I want to export data to PDF from a dynamic table, all the plugins use static tables, I mean by dynamic tables that they are created when I make request to export data and the user can't see these tables .
I need this because the way that the users see the data is different from the way that I want to print .
I'm using AngularJs in front end side and Nodejs in backend side to build my application
I tried to use this package :
https://www.npmjs.com/package/angular-save-html-to-pdf
this is an example from the documentation :
<button pdf-save-button="idOne" pdf-name="someone.pdf" class="btn">Hello
Someone</button>
<!-- below block will be saved as pdf -->
<div pdf-save-content="idOne" >
Hello Someone
</div>
the solution I want is to create and print the data in side the div dynamically when the button is pressed.
now what is the best practice to solve this problem ?
You can use Angular-UI-Grid Export future... It handles dynamic data and has some export futures..

Add a custom link/button to a visualforce page?

I have a custom link on the opportunity object which points to an external site. Is it possible to add this custom link to a visualforce page?
The solution I came up with was to copy the url salesforce creates for this custom link, and paste it in the page. It looks something like this:
my custom link
This works fine, however, it won't work once it's in a managed package installed on other servers because the lid param will be different (the custom link id). Is there a solution for this?
Have you thought about putting the URL of the link in a field on the opportunity object and then creating an output link on your VF page?
Paul
Look under $Action. Buttons and links are available via that global variable. For example $Action.Opportunity.CustomLink
To build off the answer from danieljimenez, the $Action global variable provides access to the button/link objects. From there you need to use the URLFOR function to get it into a usable form. Then you can either put it into the action param of a command button, or use it as you'd like anywhere else in your markup.
<apex:commandButton action="{!URLFOR($Action.My_Obj__c.My_custom_link)}" value="My custom button"/>
or
My link
create New Contact (Salesforce button target _blank)
<apex:commandLink target="_blank"
styleClass="btn"
style="text-decoration:none;padding:4px;"
action="{!URLFOR($Action.Contact.NewContact)}"
value="Create New Contact" />

Resources