You need to sign in to do that
Don't have an account?
Sugandhi Verma
Urgent Help!!! How to show selected checkbox item on another visualforce page.
Hi,
Please help me with the below scenario, I have Visualforce page through which I can select different checkbox value and display the selected item on another visualforce page without storing it in the object. My Requirment is when the multiple checkboxes are selected and Save botton is clicked, then the checked values need to be display on another page.
Selected Checkbox values should be store in Cookie.
Please help me on this scenario. ThankYou.
Below is my Visualforce Page.
Please help me with the below scenario, I have Visualforce page through which I can select different checkbox value and display the selected item on another visualforce page without storing it in the object. My Requirment is when the multiple checkboxes are selected and Save botton is clicked, then the checked values need to be display on another page.
Selected Checkbox values should be store in Cookie.
Please help me on this scenario. ThankYou.
Below is my Visualforce Page.
<apex:page controller="TourHomeContrllr1" standardStylesheets="false" showHeader="false"> <apex:repeat value="{!naamClicked}" var="t"> <div class="row"> <div class="col-md-12 maincol" data-toggle="modal" data-target="#myModal" id="id1" > <div style="float:right;margin-top:5px;" class="img-responsive"> <apex:outputField value="{!t.Tour_Place_Images__c}" style="width:200px;height:200px;" > </apex:outputField></div> <br></br> <apex:form > <div style="float:right;"><apex:inputField value="{!t.Select__c}"></apex:inputField> </div><br></br> </apex:form> </div> </div> </apex:repeat> <apex:pageBlock > <apex:form > <apex:pageBlockSection > <apex:commandButton action="{!addToCart}" value="Book Place" styleClass="btn btn-primary" rerender="select_places"/> </apex:pageBlockSection> </apex:form> </apex:pageBlock> <apex:pageBlock title="Your Places" id="select_places"> <apex:outputText value="{!cartContents}" escape="true"/> </apex:pageBlock> </apex:page>
Use the following code.
There may be some unused code which you can remove.
Page
Class
Mark it as solution if this solves your problem.
All Answers
You can achieve using a wrapper class,
All you need to do is to create a new list of checked records and display it in the new page.
Here is one example where from you can take some code.
https://developer.salesforce.com/forums/ForumsMain?id=906F0000000B2zCIAS
Mark it as solution if this solves your problem.
Hi Sugandhi,
In the wrapper we are using selected checkbox.
Once you select the records in the first page you can make another list of those selected records by checking the value of selected and use the new list on your new page.
Use the following code.
There may be some unused code which you can remove.
Page
Class
Mark it as solution if this solves your problem.
Save the page and controller in your org.
go to the visualforce page and you can see all records with checkboxes.
There is a button on the top left of page just select some checkboxes and click on that button you can see only those selected contacts are displayed.
Let me know if you have any Question.
Please mark this as solution if this helps.
Sugandhi any update whether code works or not.
If it works please select the reply as best answer which solves your problem.
So that out efforts may not be wasted
Thanks for the answer. I am using wrapper in my code. I want to know how to show the selected list on another page.
Also I want to know the requiremet is
First you need to show all records in one page and after selecting some checkboxes you will show those records on another page right.
See my code of the below function
Here I am seperating the records whose checkbox is selected in your case what i understood is that you will check
Tour_Places__c.Select__c instead of selected.
My Second Page
And in the class use the following code just an updated function is used
Update the class as I have created a new action and added the new page URL and
pageRef.setRedirect(false);
My First Page
Mark it as solution if this solves your problem.
The Problem is solved. I was doing it with cookies but learnt the use of wrapper also.Thanks alot for your valuable time and helping me.
Thanks and Regards,
Sugandhi