Salesforce visualforce页面呈现按钮
这是我的输出字段代码。当字段为空时,按钮被渲染,当字段具有值时,清除按钮将显示,并允许我清空字段并再次渲染按钮。但我无法在清除字段后再次渲染按钮,有人能建议修复吗Salesforce visualforce页面呈现按钮,salesforce,visualforce,Salesforce,Visualforce,这是我的输出字段代码。当字段为空时,按钮被渲染,当字段具有值时,清除按钮将显示,并允许我清空字段并再次渲染按钮。但我无法在清除字段后再次渲染按钮,有人能建议修复吗 <apex:pageBlockSectionItem > <apex:outputLabel value="Order:" for="callerorder"/> <apex:outputPanel id="callerorder"> <apex:outputField val
<apex:pageBlockSectionItem >
<apex:outputLabel value="Order:" for="callerorder"/>
<apex:outputPanel id="callerorder">
<apex:outputField value="{!newPhoneCallRecord.Order__c}" />
<apex:commandButton value="x" rendered="{!!ISBLANK(newPhoneCallRecord.Order__c)}" rerender="phoneRecordSection">
<apex:param name="orderRMV" value="" assignTo="{!newPhoneCallRecord.Order__c}"/>
</apex:commandButton>
</apex:outputPanel>
Lee
如果您希望它是动态的,您可能应该使用javascript启用/禁用该按钮。通过利用onChange
事件,您可以根据需要切换按钮的可见性
这就是说,在这种情况下,使用
指定一个空值似乎是一个比较左的字段。通过控制器清除此字段的更标准的方法是在控制器上实现如下清除方法:
public PageReference ClearOrder()
{
newPhoneCallRecord.Order__c = "";
return null;
}
然后从命令按钮调用此方法:
<apex:outputPanel id="callerorder">
<apex:outputField value="{!newPhoneCallRecord.Order__c}" />
<apex:commandButton value="x" rendered="{!!ISBLANK(newPhoneCallRecord.Order__c)}" rerender="phoneRecordSection" action="{!ClearOrder}"/>
</apex:outputPanel>
Lee
如果您希望它是动态的,您可能应该使用javascript启用/禁用该按钮。通过利用onChange
事件,您可以根据需要切换按钮的可见性
这就是说,在这种情况下,使用
指定一个空值似乎是一个比较左的字段。通过控制器清除此字段的更标准的方法是在控制器上实现如下清除方法:
public PageReference ClearOrder()
{
newPhoneCallRecord.Order__c = "";
return null;
}
然后从命令按钮调用此方法:
<apex:outputPanel id="callerorder">
<apex:outputField value="{!newPhoneCallRecord.Order__c}" />
<apex:commandButton value="x" rendered="{!!ISBLANK(newPhoneCallRecord.Order__c)}" rerender="phoneRecordSection" action="{!ClearOrder}"/>
</apex:outputPanel>
Hi Lacey,考虑到我们都在墨尔本,我可以请你喝一杯吗?Hi Lee,我们确实需要让当地社区更加活跃和社交,你参加过任何用户组会议吗?Hi Lacey,考虑到我们都在墨尔本,我可以请你喝一杯吗?Hi Lee,我们确实需要让当地社区更加活跃和社交,您是否参加过任何用户组会议?