How to grayed out the button in Xpage - xpages

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

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);

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.

Related

Send to back ActiveX button

I got group of ActiveX buttons (small keyboard) and it looks like this:
Everything is ok, but when I miss click any button and I just click button on the background (button_back), this button will bring on top:
Only when I move pointer out of the button, other keys appears.
I want to disable button in the background in a way that nothing happens when it's clicked.
I tired:
- button_back.Enabled = False
- button_back.SendToBack
- .bringToFront the rest of the buttons
- button_back.TakeFocusOnClick = False
I also tried replace ActiveX with Shapes. I have no idea hot to do non clickable background for keyboard.

How to use background activity while dialog is pop-up

I make a activity that shows progress after clicking button. and I shows that progress Bar in dialog using Theme.Dialog. so, my question is how can I use that button continuously to shows progress. In my case at 1st click dialog gone and then I can use button. I want to make background activity activate.

Button on Popup form with few more user defined fields

When I cilck on a button on main toolbar, I am displaying a popup form (PXSmartPanel) with few fields on it. Whenever I click on the main toolbar button, I want first the control should go to the popup form and based on buttons on popup form (Ok/Cancel), it should perform the action.
However, I tried that but eventually when I click on button on main toolbar, it first executes the code behind for that button and then shows popup.
Any suggestions?
Found the solution. You can use AskExt method of your DAC class to show popup first and then execute your code.
You can also use px:PXSmartPanel with AskExt. With help of PXSmartPanel you can customize your screen, and even add some buttons to your pop up. Here I wrote "short" manual how to do it.

How to click on radio button which is on Popup using Coded UI

I m automating a page where there is a popup and on that there is radio button and a submit button, when i click on radio button my test fail giving error that hidden object cannot be performed action like click but its visible (not hidden) where as when i click on submit button on same popup is click. i have checked its properties but there is nothing which i can change it just have simple id,name,value which is changing dynamicly and for that i have even used regex
please help me out
Thanks
It's possible that there is another radio button on the page with similar properties. Is this a recorded object? Is the popup window listed as the parent?
Can you post the Regex you are using, the control's properties, and the properties of the popup window?
if your are using IE whose version is > 9.0.19 then there was a patch release by Microsoft to overcome this issue
http://blogs.msdn.com/b/visualstudioalm/archive/2013/09/17/coded-ui-mtm-issues-on-internet-explorer-with-kb2870699.aspx

LiveCode: how to dismiss a popup button

If I instantiate a popup button, I can dismiss it by selecting one of the options or by clicking somewhere else. Is there a good way to dismiss it from a script? I tried setting the menuHistory, but it doesn't seem to have any effect.
Mark - if you check the openStacks is the first line empty while the popup menu is displayed? I think it is and then you could test that way.
Answering my own question:
I haven't found a good way to determine whether a popup menu button is displayed yet - none of the usual property checks seem to work. But I sidestepped the issue thusly:
in my scrollwheel handler I
dispatch "menuPick" to button "PluginMenu"
Then in the menuPick handler of the PluginMenu button I have
if pItemName is empty then
lock screen
put word 2 of the selectedline of field "xyzzy" into tLine
select after line tLine of field "xyzzy"
click at the selectedloc
unlock screen
end if
where pItemName is the normal menuPick parameter.
If I could determine when the popup was visible I could limit the menuPick call to just the times when it's on screen, but otherwise the effect is just to click at the end of the line, deselecting the popup if it's on top.
Edit: the scrollwheel handler mentioned above is in the rawKeyUp handler of field "xyzzy".
Edit 2: as mentioned, that should be "rawKeyDown" instead of "rawKeyUp".
And as Trevor mentioned, checking line 1 of the openStacks makes it even better:
if line 1 of the openStacks is empty then
dispatch "menuPick" to button "PluginMenu"
end if
It may be that you need to fake your popup menu with a palette stack which closes on suspendStack. That way there's no blocking involved and you can close it whenever you like. You would need to mess with the focus of the field I think after opening the palette so it still has the focus.
I just tried clicking a button containing the following script then clicking on a popup button.
on mouseUp
set the uActive of me to not the uActive of me
if the uActive of me then send "test" to me in 2000 millisecs
end mouseUp
on test
put the millisecs
if the uActive of me then send "test" to me in 2000 millisecs
end test
The popup seems to be modal and blocks the timed routine in the button script. I'm thinking that Monte's idea of faking the popup might be a good one ;)
You can't access already open menus by script. However, on Windows, if you open the popup menu with the popup command in a mouseDown handler, the mouseDown handler will run till the end instantly. If you use a stack panel instead of a regular popup menu, you might be able to close the stack panel by script (I haven't tried this). I don't think that this is possible on Mac OS X because menus block any currently running scripts until the menu closes.

Resources