Questions tagged [commandbutton]

A button that is rendered as an HTML input element with the type attribute set to submit, reset, or image, depending on the <apex:commandButton> tag's specified values. The button executes an action defined by a controller, and then either refreshes the current page, or navigates to a different page based on the PageReference variable that is returned by the action.

Filter by
Sorted by
Tagged with
6
votes
1answer
1k views

Setting controller variables not reliable from apex:commandButton

I'm trying to set a variable inside my controller via an actionFunction, which is called by some Javascript, which is initially called by either by an actionPanel (with styleClass='btn') or a ...
2
votes
2answers
4k views

Passing Parameters Commandbutton

I don't know what is wrong with the code, I read a lot about the commandbutton and param, but it doesn't work. The Debug shows me that the value of the MS_Item is Null. 07:44:00.0 (8771917)|...
0
votes
2answers
3k views

Reset search results and clear the search text using a button click

I want to clear the inputtext used to search, and clear all search results using a commandbutton. I tried the following on the 'Reset' button I added but it only clears the inputtext and the search ...
9
votes
2answers
27k views

Calling apex:actionFunction on apex:commandButton's onclick event

Can we call apex:actionFunction on apex:commandButton's onclick event? Actually i am trying to do this but controller's method is not being called. i am doing something like below - <apex:...
6
votes
2answers
1k views

How does default command button of VF page work?

I created a wizard on VF page. Each step of the wizard has "back" and "next" buttons except for the first step which has only "next" button. When I was on the first step's page and pressed the enter ...
6
votes
1answer
3k views

How to associate Enter key to one of the many commandButtons on VF page

I have a Visualforce page with 3 buttons. One of button on clicking it will do a search and display the results on the same page. While other 2 buttons take the user to the next page. Also, I have a ...
4
votes
1answer
265 views

How to trigger an apex:actionFuction from an apex:commandButton without a page refresh?

How can I add an apex:commandButton to a page doing the following: Executing an apex:actionFunction ReRendering some parts of the page (with reRender="") NOT redirect to another page / refresh actual ...
3
votes
1answer
710 views

showOnEdit within commandButton not working when PageBlock section starts with rendered=false

On my visualforce page I have a pageblocksection that starts off hidden, this pageblock is shown when the user selects a value from a picklist. This feature works, but breaks the 'showOnEdit' ...
1
vote
2answers
12k views

Form reset after clicking a button?

vf page: <apex:page> <apex:form> <apex:inputtext value={!Value}/> <apex:commandButton value="Reset" onclick="this.form.reset();return false;" /> <apex:...
0
votes
3answers
4k views

How to change attribute value in javascript

<apex:commandButton value="Default View" action="{!showlist}" styleClass="input" id="hide1" disabled="true"/> <apex:commandButton value="Quote List" action="{!view}" styleClass="input" ...
0
votes
1answer
680 views

Toggle Command Button Value from Ascending to Descending

I have a command link Ascending. If I click on the link, immediately, the value of the button/link should change to Descending. <apex:commandLink action="{!Asc}" value="Ascending" reRender="block"...
0
votes
1answer
2k views

Problem with redirect with PageReference in iframe

I open a visualforce page in an iframe witch contain two commandButton. The buttons call functions on the class. At the end of my functions, i made a redirection with PageReference but the ...