function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Hi
How can i pass selected checkbox value from one page to other page using wizard.
I don't know whether I have understood your question correctly.
CheckBox value is a Boolean and you can pass this value between pages as you pass other variable values.
Following is an example.
Controller:
public class MyClass{
Boolean isSelected = true;
public void setIsSelected(Boolean b) { //this sets the selected value from your checkbox
this.isSelected = b;
}
public Boolean getIsSelected() { //this gets the selected value to the second page
return this.isSelected;
public PageReference goToNextPage() { //button action
PageReference pageRef = Page.Page2;
return pageRef.setRedirect(false);
Page1:
<apex:page Controller="MyClass">
<apex:form>
<apex:inputCheckbox value="{!isSelected}" />select me
<apex:commandButton action="{!goToNextPage}" value="Next Page" />
</apex:form>
</apex:page>
Page2:
<apex:page controller="MyClass">
Selected status = "{!isSelected}"
>> Instead of the above method you can pass the value as a URL parameter.
>> If you need to maintain a list of checkBox values, you may need to use an Inner Class.
I don't know whether I have understood your question correctly.
CheckBox value is a Boolean and you can pass this value between pages as you pass other variable values.
Following is an example.
Controller:
public class MyClass{
Boolean isSelected = true;
public void setIsSelected(Boolean b) { //this sets the selected value from your checkbox
this.isSelected = b;
}
public Boolean getIsSelected() { //this gets the selected value to the second page
return this.isSelected;
}
public PageReference goToNextPage() { //button action
PageReference pageRef = Page.Page2;
return pageRef.setRedirect(false);
}
}
Page1:
<apex:page Controller="MyClass">
<apex:form>
<apex:inputCheckbox value="{!isSelected}" />select me
<apex:commandButton action="{!goToNextPage}" value="Next Page" />
</apex:form>
</apex:page>
Page2:
<apex:page controller="MyClass">
Selected status = "{!isSelected}"
</apex:page>
>> Instead of the above method you can pass the value as a URL parameter.
>> If you need to maintain a list of checkBox values, you may need to use an Inner Class.