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]

The tag has no usage guidance.

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 ...
0
votes
1answer
160 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 "...
-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: ...
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
1answer
58 views

Assigning Custom Setting value to Custom object Field

/***********Custom setting **********/ Map<string, CountryCO__c> codes = CountryCO__c.getAll(); string pb; list<string> pb1=new list<string>(); for (...
2
votes
0answers
5k views

Binding wrapper class variable to the value of an ui:inputtext in Lightning?

A similar question has been asked here Binding behaviour on lightning components with ui:inputText/Checkbox components I have 2 attributes of 1) Type = Wrapper class 2) Type = Sobject My ...
0
votes
1answer
32 views

Combining Picklist Options

I have to create a picklist to replace a lookup to prevent my users from seeing all of the lookup records. It throws an error when it is blank when we go to edit it so I had to write it like this: ...
2
votes
3answers
326 views

SOQL Query Limits in Wrapper Class (using dlrs)

I have been trying to build a wrapper class which creates a junction Object (Delivery_Note_Line_Items__c) between two other objects (orderLine & Delivery_Note__c) depending on the Visualforce's ...
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 ...
-3
votes
1answer
282 views

Attempt to de-reference a null object — while querying OrderItem

I am creating a vf page where a user can create multiple orderitem for a order by adding dynamic rows. When a user selects any product from product lookup, i have an actionsupport which will query ...
0
votes
1answer
76 views

Make field Mandatory when corresponding record button is clicked

I have the following code in my Lightning Component <aura:iteration items="{!v.wrapAccountList}" var="arItem" indexVar="index"> <tr> <div class="slds-truncate"> <...
-2
votes
1answer
72 views

Wrapper class in Http getmethod

below is my code Created a wrapper class like below public class ResponseWrapper{ public list<Account> lstaccounts; public boolean isError ; public string errorCode; public ...
0
votes
1answer
92 views

How to use the wrapper class in HTTP getmethod [duplicate]

below is my code Created a wrapper class like below public class ResponseWrapper{ public list<Account> lstaccounts; public boolean isError ; public string errorCode; public ...
2
votes
2answers
125 views

Where/How can I store a variable and access while I build my wrapper? It's either null in wrapper itself or the scope isn't visible at top level

I have a set of ids called oppIdsInWrapper inner class. However while I build my wrapper, this is always null and empty. I want be able to reference this as I build my records to avoid duplicate ids. ...
2
votes
1answer
27 views

Wrapper class is having problems compiling. Not sure how to resolve? Incorrect signature when adding more rows to wrapper class

I'm trying to explore my options for rotating a VF table by mimicing the following post: http://bobbuzzard.blogspot.com/2010/09/rotating-visualforce-table.html However near the bottom I'm having ...
0
votes
1answer
426 views

apex:InputText value is not setting on the controller

I have a problem with a Visualforce and I am not being able to solve. In the VF I have a form with two sections: one to fill the fields I'll use in the controller to create a quote and a dataTable ...
1
vote
1answer
2k views

Adding to sub list/array within apex wrapper class

I am trying to figure out how to add to this wrapper class. public class Invoice { public String Type; public LineItem[] LineItems; public class LineItem { public String ItemCode; public ...
1
vote
0answers
31 views

Wrapper needed? Looking for assistance

I am attempting to display a VF page listing contacts under a Tier Level. Tier Level is a custom object that is a lookup field on the account record. For example, a contact belongs to an account. ...
-2
votes
1answer
42 views

How to generate VF page for the following wrapper class?

public class Employeewrapper { public string name{get;set;} public decimal salary{get;set;} public decimal exp{get;set;} public string technology{get;set;} } ==================== ...
1
vote
2answers
1k views

Sorting a list of sObjects

I have parent and child objects. now i want to perform sorting in child records list so Kindly suggest me how is it's possible. currently i am using wrapper class in which i have used "sobject" ...
-1
votes
1answer
165 views

Object lookup field not fetching values in wrapper class

I am using this below wrapper class in a method which is called from a action support from vf page. In debug log - @@@@offerId --> Id of the record But @@@@offervalue i am getting null. I am not ...
-1
votes
1answer
406 views

Sort Wrappers In JSON?

public with sharing class TableData { public String Id { get; set; } // hash modified public Decimal duration { get; set; } public String description { get; set; } public String name ...
0
votes
1answer
624 views

Unknown Property with a StandardController

I am having an issue with my standard controller. I have utilized the Salesforce wrapper class suggestions as a framework for this project. Within the project I am supposed to make a pageBlockTable ...
0
votes
1answer
152 views

Wrapper Class SOQL not retrieving dynamic values

I have created a Wrapper class to present data from different objects Event__c and Campaign. The class works fine when I hardcode the values for the SOQL statements but when I assign the dynamic ...
4
votes
2answers
161 views

Sorting of two different records referencing their dates

I just want to ask if comparing of each fields on separate object is possible in order to show first the most recent. Example, I have Object A and Object B, and Object A has Hired_Date__c , and ...
1
vote
3answers
318 views

How can I have 100% code coverage in wrapper class + meaningful testing

I'm learning programming and now I would like to have 100% code coverage + meaningful test. How can I test line: lstw.add(new wrapper(acc[i].name,acc[i].id,con[i].LastName,con[i].id)); and how can I ...
0
votes
1answer
39 views

Sorting of the 2 child records referencing each of their date fields (START DATE)

I have three objects, the Professional_Experience__c, Assignment__c, and Project__c. Professional Experience has two child (Assignment__c, and Project__c). Then the Assignment__c has also a child (...
0
votes
1answer
160 views

Sorting of fields of custom object inside a wrapper

We have a wrapper class which contains different list of custom object. We want to sort it through the field referenced by different custom object. How can we achieve this? The code below shows a ...
1
vote
1answer
169 views

Sorting of fields of custom object using comparable in a wrapper

I have a wrapper class which is sorted by the totalCount of the size of the three list (empSkillList, empTrainingList, and empCertificationList). Can I sort it also by the fields inside the list of ...
0
votes
1answer
393 views

How to get my data into javascript chart by parsing report data?

I have manged to collect all required data but not able to parse it into the list so that i can pass my data into a chart. for now i have added debug data in to chart as static to relate this chart ...
2
votes
0answers
213 views

Displaying the values of the wrapper class

I have a wrapper class inside a wrapper class which contains Assignment object and List of Projects. public class projWrapper{ public Professional_Experience__c peWrap {get;set;} public List&...
0
votes
0answers
27 views

Add another checkbox column while using Wrapper? [duplicate]

I'm using a wrapper to load a list of records into a VF page that I can select (to add to a related record). I'd like to add another column of checkboxes that the user can select for a different ...
0
votes
1answer
2k views

How to write a test class for a wrapper class [closed]

I have created a Class called "SalesMarketing" and i am writing the test class called "SalesMarketingTest" although the test class is passing the "SalesMarketing" class has 0% Code Coverage /*********...
0
votes
1answer
97 views

Test class coverage issue

The test class below is covering the class successfully but I am getting difficulty to cover my wrapper list. Coverage I added data for lstPayslip in test class. I want to cover listWrapper. ...
1
vote
1answer
1k views

Wrapper Class and Maps

I am trying to sort out the best direction to go in. I have a phone list with a department header and the employees under each department. I have done this with a map. My next task is to take the ...
0
votes
1answer
204 views

Wrapper class returns null

public class facebookuser{ public String id; //115020323424341 public String name; //XXXX public cls_picture picture; public String birthday; //09/12/1990 public String about; ...
0
votes
1answer
56 views

Need help with Visualforce in passing data from one page to other

I have finished the visual force page and the wrapper and now what I wanted to happen is that when a record/s has been Selected then the action page will redirect wherein users will be able to edit ...
2
votes
1answer
71 views

Cannot get aggregate result (or anything good) with SOQL on multiSelct picklist

I have a working aggregate result class with a wrapper. Have made a couple of data sets pulled from cases and campaigns to get aggregate results of participants of both by date and other fields. ...
0
votes
1answer
1k views

how to use JSON.serialize() on a wrapper class ?

I want to use AngularJs in a my page to filter a list of records, i found this article very helpful. the problem is in the article, the JSON.serialize is applied on a list like this public static ...
0
votes
1answer
198 views

Wrapper class has no binding with visualforce page

for a raison that i ignore, any changes in the visualofrce page on the wrapper input fields are not picked up bu the wrapper class in apex as if there is no binding between the two, all the fields are ...
3
votes
1answer
283 views

Set a inner wrapper value bound to an inputfield during “onchange” event

I currently have a complex but structured object for my visualforce page. The object itself has multiple wrapper objects within itself, currently about 3-4 deep. For example: public class ...
3
votes
1answer
1k views

Dynamically expanding a wrapper class for an object as custom fields are added.

I've reached a bit of a dead end in my latest programming endeavour. To give a brief overview I'm creating a console that houses data for four custom objects linked together loosely only by their ...
2
votes
2answers
399 views

Need to write a Wrapper Class

This is my first wrapper class and I think it is a hard one. I tried to put this all into one query and it failed because of a junction object. I then put it into 2 queries using components and it ...
1
vote
3answers
292 views

Picklist With Multipicklist

I have a requirement to make a picklist which contains all the objects and based on the selected objects the corresponding fields will come in second picklist which is a multiSelect picklist. This ...
0
votes
0answers
625 views

Displaying a Lookup/Reference field type on a Visualforce page

I'm struggling to find this answer due to the ambiguity surrounding the many scenarios the keyword Reference can fit in to. I have multiple Reference types in my custom object. They are lookup ...
0
votes
1answer
50 views

Not able get list of wrapper from constructor to pageref method

Not able to get CW list value in pageref method. public wrapperClassController1() { **List<ProductWrapper1> cw;** searchResultsWithWrapper = new List<ProductWrapper>(); ...
2
votes
1answer
51 views

Wrapper List Sort by 2 text values

I have a wrapper class with 2 text values. I sorted them using Comparable. It works fine for one value. Here, I have AreaName and ADName. With the below I'm able to successfully sort by AreaName. ...
0
votes
2answers
558 views

Show wrapperClass to visualforce page

Good day everyone, I have created a wrapper class which is something like this: public class wrapperClass { public Map<String,List<String>> selectedDefinitionList{get;set;} ...
2
votes
3answers
2k views

Whenever I run the test class I see this error: “Apex Error: Field is not writeable”

Public class OrderController{ Public Opportunity opp {get;set;} Public List<Opportunity> oppData {get;set;} Public List<Account> accountList{get;set;} Public List<...
1
vote
1answer
2k views

How to sort a wrapper class list which has a reference to another wrapper in it

I want to sort a wrapper class list which has a reference to another wrapper in it.I tried implementing Comparable interface for both of class but it is showing error One or more of the items in ...