在visualforce页面中,单击第一个按钮激活第二个按钮

时间:2018-04-25 17:32:08

标签: javascript visualforce

在我的visualforce页面中有2个按钮(插入和继续)。单击“继续”按钮后,“插入”按钮应显示在页面中,否则应隐藏“插入”按钮。

<apex:pageBlockButtons Id="buttonContainer">
<apex:commandButton value="Insert" rerender="mainForm"rendered= 
{!showInsertButton}" onClick="javascript:fnInsertCompany();return false;" />
<apex:commandButton action="{!continue}" value="Continue" 
</apex:pageBlockButtons>

1 个答案:

答案 0 :(得分:0)

您已使用呈现属性进入“插入”按钮。您可以在条件逻辑中轻松渲染此按钮。

继续按钮中,操作为continue,即您的控制器中有一个名为continue()的方法。

因此,全局制作showInsertButton = false AND continue()方法,制作

showInsertButton = true  

多数人。

相关问题