We are developing VF pages that will ultimately be integrated into the service console. One of the requirements is that the VF pages always be in edit mode, and on clicking the save button (or alternatively pressing ctrl+s), the fields should be saved without refreshing the page or the form. Edit mode is achieved using

<apex:pageBlock title="Edit Case" mode="edit">

Is it possible to implement the save functionality while still using the standard controller save method since it always returns a page reference? If not, what would be the best way to proceed?

有帮助吗?

解决方案

You should be able to leverage QuickSave while specifying the rerender attribute to skip the page redirect/refresh:

<apex:commandButton action="{!quicksave}" value="Save" rerender="null" />

If you want to rerender a specific portion of the page after the save has occured, replace null with the appropriate VF component ID.

其他提示

Would using the quicksave action on the Standard Controller be an option?

For example:

<apex:commandButton action="{!quicksave}" value="Save" />

In this way, the save would still occur but there would be no redirect.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top