You need to sign in to do that
Don't have an account?

Can any one help to solve that isssue on the popup window doesn't appeare properway
My controller:
It's produce the error :Compile Error: unexpected token: 'showPopUp' at line 61 column 8
And my Page:
I don't get any error but there is no pop up window is to be generated for the entering the billingcountry of the text box and the save / cancel button. so please help me to solve that case for answers thanks in advance.
public class AccountEditController { accountwrapper1 makeEdit; List<accountwrapper1> listAccount = new List<accountwrapper1>(); List<Account> selectableAccount = new List<Account>(); List<Account> selectableAccount2 = new List<Account>(); public Boolean showPopUp { get; set; } public AccountEditController() { showPopUp = False; } public List<accountwrapper1> getAccounts() { for(Account a: [SELECT Id, Name, BillingCountry, Phone FROM Account]) listAccount.add(new accountwrapper1(a)); return listAccount; } public PageReference showToPopUp() { showPopUp = True; selectableAccount.clear(); for(accountwrapper1 accwrapper : listAccount) if(accwrapper.selected == True) selectableAccount.add(accwrapper.acc); system.debug(selectableAccount); return Null; } public string BillingCountry { get; set; } public PageReference Savemeth() { for(account acc :selectableAccount ) { acc.BillingCountry = BillingCountry; selectableAccount2.add(acc); } update selectableAccount2; return Null; } public PageReference cancelmeth() { return Null; } public PageReference GetSelectedAccounts() { if(selectableAccount.size()>0) { system.debug(selectableAccount.size()); system.debug(selectableAccount); return Null; } else return Null; } public class accountwrapper1 { public Account acc{get; set;} public Boolean selected {get; set;} public accountwrapper1(Account a) { acc = a; selected = False; } } }
It's produce the error :Compile Error: unexpected token: 'showPopUp' at line 61 column 8
And my Page:
<apex:page controller="AccountEditController" applyHtmlTag="true"> <apex:form > <apex:pageBlock Title="List of Accounts" > <apex:pageBlockButtons > <apex:commandButton value="Get selected Records" action="{!showToPopUp}" rerender="Output" id="button"/> </apex:pageBlockButtons> <!-- {!showPanel}----> <apex:outputPanel id="Output" > <apex:outputPanel rendered="{!showPopUp}"> <!---{!showPanel}----------> <apex:outputLabel value="BillingCountry: "></apex:outputLabel> <apex:inputText id="BillingCountry" value="{!BillingCountry}" size="40" style="height:13px;font-size:11px;"/> <apex:commandButton value="save" action="{!Savemeth}"/> <apex:commandButton value="cancel" action="{!cancelmeth}"/> </apex:outputPanel> </apex:outputPanel> <apex:pageBlockSection Title="List of Available Accounts" columns="1" collapsible="false"> <apex:pageblockTable value="{!accounts}" var="a" > <apex:column headerValue="Select" width="60"> <apex:inputCheckbox value="{!a.Selected}" id="checkedone" /> </apex:column> <apex:column headervalue="Account Name" value="{!a.acc.Name}" width="200"/> <apex:column headervalue="Phone" value="{!a.acc.Phone}" width="300"/> <apex:column headervalue="Billing Country" value="{!a.acc.BillingCountry}" width="300"/> </apex:pageblocktable> </apex:pageBlockSection> </apex:pageblock> </apex:form> </apex:page>
I don't get any error but there is no pop up window is to be generated for the entering the billingcountry of the text box and the save / cancel button. so please help me to solve that case for answers thanks in advance.
All Answers
In order to get it as a "modal window" (not pop-up) you will have to play around with css, otherwise it is just another section on the document.
Kind regards
My controller:
Page: