問題文
An airline maintenance team uses a Visualforce page where a technician picks a part number and the page shows its stock. Today the whole page reloads on each click and the technician loses the scroll position in a long list. What should the developer change?
選択肢
- Move the list into a static resource and rebuild it with JavaScript after the first load, because a Visualforce form always posts the whole page and cannot redraw a subset of its components.
- Set the immediate attribute on the button to true, because that keeps the page from being reloaded when the action runs, and the list stays where it was on the screen.
- Wrap the panel in an actionRegion so that the whole page is submitted but only that region is redrawn on the way back, and the scroll position survives.
- Give the command button a reRender attribute that names the output panel holding the stock figures, so only that panel is redrawn.