How to grayed out the button in Xpage

一个人想着一个人 提交于 2019-12-25 02:29:09

问题


Please help me out in the below case:

When we clicked on the button in the current window (which has Cancel and OK button in the title bar). then it should display the small pop up with Two buttons. (Apply defaults and cancel button)

When we clicked on the Apply defaults in the small pop up, then the pop up should be closed and then display the previous window with disable(grayed out) the cancel button in the title bar.

Please let me know how to grayed out the cancel button


回答1:


subbu,

Make your "Cancel" button in the title bar a dijit.form.Button. When the user clicks the "Apply defaults" button in the popup, you can then call a clientside script to disable it:

dijit.byId("#{id:yourCancelsButtonId}").setDisabled(true);



回答2:


If you don't want to do it client side you should be able to accomplish the same thing server side like:

var buttonComp = getComponent("IdOfButtonToDisable");
buttonComp.setDisabled(true);

I'm not sure if you'll have to do a partial refresh to make it show up but that should work.



来源:https://stackoverflow.com/questions/9258858/how-to-grayed-out-the-button-in-xpage

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!