Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [wrapper-class]

Used for organizing data to be 'Wrapped'. Typically allows for better manipulation or sorting of data.

0
votes
1answer
25 views

How SWAP(rows UP and DOWN) in Pageblocktable in Visualforce page using Apex method

Here I'm Trying to do swapping on Pageblocktable means I want my rows to be Up and down Right now it's happening through Javascript Now I want this through APEX method. Please look at the below ...
0
votes
0answers
46 views

How to copy data to text fields when checkbox is checked

I have a little challenge which I'm trying, I want whenever the checkbox is checked I want to copy the values into input text fields in visualforce page. So here I have multiple rows and ...
0
votes
1answer
28 views

deserializing of json using wrapper class in apex

I have following type of json { "itemsPerPage" : 1, "links" : { "next" : "" }, "list" : [ { "id" : "19623", "resources" : { "reports" : { "allowed" : [ "GET" ], ...
0
votes
1answer
33 views

How to define a class as get set variable in another class

I am trying to call a wrapper class which is written independently. I am trying to call the class as a get set variable in a apex class. But getting error while i try to define the class as get set ...
1
vote
1answer
75 views

Lightning Input on wrapper class not passing back the value

I am using a wrapper class so as not to have a glut of aura:attributes (this may be the problem in and of itself). I have a previous lightning component that has about 16 attributes and passing them ...
0
votes
1answer
33 views

Error : Attempt to de-reference a null object ; on map variable

Class.ResourceProfileController.__sfdc_mapSummary: line 137, column 1 Class.ResourceProfileController.__sfdc_listWrapperEmployee: line 162, column 1 --> Error on the Variable mapSummary Hello I'm ...
0
votes
1answer
27 views

Constructor not defined: [weather001.weatherresult].<Constructor>() while using wrapper class

I am getting error as Constructor not defined: [weather001.weatherresult].() at the time of creating instance for wrapper class. below is the code. public class weather001 { public string ...
0
votes
2answers
30 views

Boolean value set in a wrapper not showing correct

Hi I a trying to set a Boolean value in a wrapper based on a condition. Wrapper Class public class Wrapper{ public String pf {get; set;} public Boolean show {get; set;} public Wrapper (...
0
votes
1answer
78 views

Test Class for Comparable Wrapper class

I am trying to write a test class for a Comparable Wrapper with little success. The wrapper class pulls in two objects to make one single list. I have two issues... I don't know how to cover the ...
0
votes
1answer
164 views

How to serialize REST Request from Wrapper class for existing Salesforce data?

I am trying to format my SObject data within a wrapper class to POST data to another Salesforce org from a custom Work__c object, but I am having a hard time understanding how to add an instance of "...
0
votes
1answer
204 views

How to create JSON string for REST callout from Wrapper class

I have found a lot of different examples of this, but I'm still having troubles accomplishing this. Here is the webservice which is working: //WORKING Webservice in target org @RestResource(...
0
votes
2answers
145 views

Access child records without using wrapper in apex controller

I have Question__c(parent) and Option__c(child) Master detail relationship. On page load I am able to pass the data to lightning component without help of any warapper class. Now on submitting the ...
4
votes
3answers
135 views

Adding a Wrapper Class to an External Class

I am confused about what is happening in a small section of some code. I have a class that has a wrapper class inside it. There is an external class that calls this wrapper class Models.add(new ...
2
votes
1answer
91 views

Nested Wrapper data not being return in lightning component callback

I currently have this very nested wrapper class, public sharing class ResultWrapper { //This wrapper is contain more wrappers that goes as far as 5 level deep. @AuraEnabled public ...
2
votes
1answer
176 views

JSON.deserialize on custom sObject not parsing related fields from lookup relationship

I've got a map whose values are a wrapper class. The wrapper class holds a custom sObject list, and the sObject in turn was queried to include related fields from a lookup relationship. Problem is, ...
0
votes
1answer
46 views

Data binding issue with wrapper class

This is a continuation of another question with code pared down as much as possible. I'm trying to create a series of pageblocktables on a VF page, each displaying some number of empty rows which ...
0
votes
1answer
376 views

Rendering data from Wrapper Class into Lightning Data table

Hi I'm trying to render data from a wrapper class it's coming up with row but values are empty. Component: <aura:component implements="force:lightningQuickActionWithoutHeader,force:hasRecordId,...
2
votes
1answer
37 views

List Sort Using Wrapper Class

I created following Wrapperclass to sort quote based on ceratedDate global class QuoteCreateDateSortWrapper implements Comparable { public Quote quo; //Constructor public ...
1
vote
2answers
77 views

How to get code coverage on formula fields in a wrapper class

I need to get code coverage on UpgradeRate, PlusCount2, PremiumCount2 and PrestigeCount2, but what I have is not working. How do I get code coverage on these? In my custom controller, I have the ...
-1
votes
1answer
211 views

How to fix Wrapper class to insert/delete selected records?

When I use my Wrapper class to delete some records, my Select button doesn't work (without wrapper it works fine). So I even can't check, is my delete-code works or not. What is wrong here? Apex: ...
0
votes
1answer
101 views

JSON string unserialize to APEX using wrapper class [duplicate]

I'm not able to get rows list....it is coming null from below code. public class ParsingTest1 { public ParsingTest1() { String jsstring = '{"totalsForAllResults": {"users": "...
0
votes
1answer
25 views

Apex:param not calling method

Hi I have requirement of producing a list in home layout with number is records available in different conditions and on pressing a button redirecting to the specific list view I came up with the ...
0
votes
1answer
73 views

Does lightning:recordEditForm works for wrapper classes with an sObject?

I have a wrapper class which can hold a custom object record and some variables. However I want to leverage this out of the box lightning:recordEditForm for displaying the wrapper class records (...
0
votes
1answer
61 views

Maximum stack depth reached: 1001 inner class

I'm trying to export record on into a tab separated text file. In getting Maximum stack depth reached: 1001 in the inner class where i'm doing the piece of code and I have pasted full code in the ...
0
votes
1answer
2k views

Using wrapper Class in Lightning:Datatable

I am trying to set the data of the Lightning:Datatable from the wrapper class in server-side Controller. public class AccountWrapper{ @AuraEnabled public Account acct {get;set;} ...
0
votes
1answer
32 views

Using IF in a wrapper class

I have created a wrapper class which creates a record called Remittance_Advice_Line_Item__c, when a user selects a checkbox (called selected), and saves on a Visualforce page. The record(s) that are ...
0
votes
1answer
58 views

How can I dynamically add input fields in visual force on a button click?

I want to add a button "ADD NEW RECORD". When the button is clicked, a new row for input fields of accounts should be added along with the checkbox wrapped with it. How can this be done? EDIT: Also, ...
0
votes
1answer
272 views

How to Access Wrapper class variable in javascript?

Trying to access the wrapper class variable in javascript, but it's not serialized in apex controller. trying to get the value in for loop - mainly for validation purpose. function ...
0
votes
1answer
116 views

Lightning : Unable to update records displayed using wrapper class

Can anyone please help me in this? My initial Use Case Scenario was to display a list of records in a lightning component, and providing the ability for users to update the same records. This was a ...
2
votes
2answers
338 views

How to set inner class list as aura attribute? [closed]

I am in need of showing a list of records in a summarized format, say all records belonging to Type 1 are displayed first, followed by the records of Type 2, and so on. Usually in visualforce page, ...
0
votes
1answer
216 views

How to bind the wrapper class data into custom objects fields and display it in pageblocktable

I have created REST which fetching the data from pardot and displaying it on the vf page. It is working fine. But I need to store this data in the custom object's corresponding fields on the vf page. ...
-3
votes
1answer
59 views

facing issues with wrapper in wrapper class [closed]

I am trying to implement something like to display open carts and this repctive cart line items Something like Cart1 details Cartlineitem1 details Cartlineitemdetails2 Cart2 details ...
2
votes
1answer
28 views

Query related to DML Example for AccountWrapper

I am trying to implement below example shown in screenshot :- I want to check that for records where checkbox is selected, name field should not be null, then only insertion should happen, but name ...
0
votes
0answers
77 views

How to sort a wrapper class in client side javascript in lightning

I have a wrapper class (contains Opportunity object as a variable and other Integer and String variables) which is iterated inside a table in lightning component. Columns in table --> Opportunity ...
1
vote
2answers
140 views

Passing List<WrapperClass> as a parameter from Visualforce to Lightning and to iterate over the List<WrapperClass>

This is my VF code, which runs on onclick <script> function func(data) { $Lightning.use("c:testingFromVFtoLightningApp", function(){ $Lightning.createComponent("c:...
3
votes
1answer
183 views

How do I correctly cast List in wrapper class?

I am receiving the following error in my Apex runtime: JSONException: Expected List<ApexBatch.SFError> but found { It's do with how I'm assigning the response to my wrapper but I'm not sure ...
0
votes
2answers
83 views

Visualforce page resets wrapper fields during rerender

I have a wrapper class to that include opportunity line items and a selectlist value set. When the page is rerendered, the oli fields are maintained, but the selectlist values are reset. I can't see ...
2
votes
1answer
364 views

CompareTo - Sort order by date in Wrapper class

I have recently had help creating a Wrapper class to combine 2 separate objects, Delivery_Note__c and Remittance_Advice__c, into one list, both with their own date fields. The list is then rendered on ...
0
votes
1answer
12 views

Test button's action that adds OpportunityLineItem

I have a problem with one code's part. Controller (a part): public void click(){ for(WrapperClass wrp : wrapperRecordList){ if(wrp.isSelected){ ...
-1
votes
1answer
227 views

Combining two object's records and sort by date

I have 2 lists from different objects which I would like to combine into one in a Visualforce component. The objects are not directly related, but both have amounts and a date which i am trying to ...
0
votes
1answer
44 views

Test coverage for a wrapper class which has no methods and constructor in it

I have below kind of wrapper class which has no methods and constructor. public class PP_SI_Wrapper { public class checkBoxWrapper{ @AuraEnabled public String que; @AuraEnabled ...
0
votes
1answer
50 views

Null pointer exception when using {get; set;}

I'm trying to build a custom VF quick action on the Case object that allows users to update checkboxes for case fields and also lets them add some comments that will later be posted to chatter, but ...
1
vote
1answer
277 views

Sorting list by custom field multiple times

I am working on an apex trigger. I have a list that I need to sort by a date field, do some processing, then sort by another date field, and do more processing etc 5 times. When I do the initial SOQL ...
0
votes
0answers
102 views

InputHidden not working with actionFunction

I'm trying to pass the value of an html input tag to an wrapper class into my controller. I'm using input tag because I need the slds style and others validation that I can't with a simple apex:...
1
vote
1answer
55 views

Wrapper class Referencing?

How do I reference my wrapper class in my prepareshipment method? My goal was to set tNumber and location to = my fields on my shipment object. In my VF page I want tNumber and Location to display ...
1
vote
1answer
135 views

Save Redirects to blank page

When saving the visualforce page, it redirects to a blank page. Can anyone advise as to why it is not redirecting to the exact url for the current page cited in the PageRefrence at the bottom? When ...
2
votes
1answer
1k views

Creating Generic Related List Lightning Component

I am trying to create a simple, reusable component that allows me to list related records in an easy to read way. I want to be able to use this component a few times on a single record, and I would ...
0
votes
1answer
172 views

Muti check box using wrapper class is not working [duplicate]

I'm trying to display the selected checkbox row's values in vf page using wrapper class concept. But instead of the selected records, it is displaying all records values. here is my code. Controller: ...
0
votes
1answer
31 views

Adding a record from selected table row

I have a wrapper class which updates selected rows from the standard object orderItem, with details from a custom object called Delivery_Note__c. A change in requirements has meant that I have had to ...
-3
votes
1answer
76 views

To show the Opportunity table sorted by Amount field in ascending order in lightning [closed]

I am working on the requirement in Salesforce Lightning in which I have to display the table for Opportunity object with row sorted by amount field in ascending order. Apex class: Public class ...