【发布时间】:2015-01-13 09:53:12
【问题描述】:
我有两个这样的 jsf 组件:
<a4j:commandButton id="cmdtop"
disabled="#{ViewDocument.locked or !(documentAttachmentBean.canEditAttachment )}"
action="#{documentAttachmentBean.onCmdIncreaseAttachmentCodeClick}"
...
</a4j:commandButton>
<a4j:commandButton id="cmddown"
disabled="#{ViewDocument.locked or !(documentAttachmentBean.canEditAttachment )}"
action="#{documentAttachmentBean.onCmdDecreaseAttachmentCodeClick}">
...
</a4j:commandButton>
在我的带有 canEditAttachment() 方法的支持 bean 中,我想检查它是否已为 cmdtop 或 cmddown 调用? 像这样的东西:
public boolean getCanEditAttachment()
{
if (somecode.getElementId.equals"cmdtop")
//do something
return true ;
else if (somecode.getElementId.equals"cmddown")
//do something else
return false ;
}
我怎样才能找到 canEditAttachment() 是和谁一起调用的?
【问题讨论】: