Not working: Javascript to select all checkboxes from Header checkbox in Visualforce page

I am displaying a table with checkboxes using wrapper class. Now I want to add a checkbox to the header, when selected it should select all row-checkboxes and when deselected it should deselect all row-checkboxes, when I deselect one row-checkbox, Headercheckbox should get deselected (not working) AND When selected any checkbox should Enable button and … Read more

How to send an arrayList from Apex to Javascript and then to HTML?

I’m new in JS and can’t understand, what is wrong here (this is my test value, but then I want to send an arraylist’s elements): Apex: public String test{get;set;} public String myApexMethod(){ test = ‘Hello!’; return test; } JS and HTML: <apex:actionFunction action=”{!myApexMethod}” name=”getResult” rerender=”script_block”/> <apex:outPutPanel layout=”block” id=”script_block”> <script> var res = “{!test}”; window.onload=func function … Read more

apex:param get just last element. How to fix that?

I create delete-button to remove records from my list. First I choose records and add them to this list. Then I can delete some records, but it removes just last one. How to delete only selected record from the list? public void deleteObject() { for (Integer i=0; i < someList.size(); i++){ Job_Advertisement__c j = someList[i]; … Read more

Style apex select option in Bootstrap theme

Please help me to style custom picklist in bootstrap theme. So I have a controller with code: public List<selectOption> getSettings() { List<SelectOption> options = new List<selectOption>(); options.add(new SelectOption(‘Market/OTC’,’Market/OTC’)); options.add(new SelectOption(‘Margin Lending’,’Margin Lending’)); options.add(new SelectOption(‘Other Services’,’Other Services’)); return options; } And also the vf page with row: <div class=”form-group”> <label for=”Setting”>Setting</label> <apex:selectOption value=”{!SelectedSetting}” id=”Setting” > <apex:selectOption … Read more

Site profile doesn’t appear to have access to FirstName or LastName on Leads

I have created a public site to create Lead records. It seems as though the site’s profile has access to the composite Name field but not the FirstName or LastName fields. Eg: //This doesn’t Work Lead l = [SELECT Name FROM Lead LIMIT 1]; this.firstName = l.FirstName; //This works Lead l = [SELECT Name FROM … Read more

community view report via a VF page

Could a report exposed to a SF community (Not Plus), via a VF page? as below; <apex:page id=”ccs” title=”Customer Case Summary” cache=”false” showHeader=”false” sidebar=”false” standardStylesheets=”false”> <body> <div>Customer Case Summary<br/> <apex:iframe src=”00O90000009FCKe”/> </div> </body> </apex:page> I tried this and gave the permission to the VF via profile, it is still giving me no access error, According … Read more

When immediate=”true” values in list does not persist

What i am simply trying here is to add one blank wrapper object in wrapperList on click of add another button. Issue is when i set immediate=true in commandLink or in actionFunction, code adds one blank object but other values also get blank, Simply speaking my previous values which i filled in the form get … Read more

Site.com visualforce page refresh

I want to refresh a site.com visualforce page on submission of a form, adding an additional query string parameter, but when I try and get the current page url it returns the /apex/controllerName route rather than the name of the page on the public facing site. private String hostName = ApexPages.currentPage().getHeaders().get(‘Host’); private String url = … Read more