How to disable a button in oracle apex if another button is clicked.
I have buttons in a classic report.
btn1: Update
btn2: Delete
btn3: Save
I would like when one of the button is clicked, the others buttons should be disabled.
Pls advise how to do that
What happens when one of the buttons is clicked? Knowing this could provide a better way of doing what you want, such as with a server-side condition.
Not knowing this, you could do it with dynamic actions - on button click of particular button, disable / hide the other buttons (set multiple true actions). You would also want to specify when to reset them.
Related
Here's my use case:
I'd like to display the information about something first using django_tables2, with a button on the top right corner called "Edit", once a user hits "Edit", at the bottom of the table, display a button called "Add New Record", and once the user clicks that button, a bunch of input fields pop up to let users enter values for each field, also the user could continue to click "Add new Record" to keep adding new.
How can I achieve this in Django?
I've read a lot of examples on stackoverflow but didn't find anything tailored to this particular case.
Thanks a lot.
Let's dive right into listing out what you want to do and the requirements you'll need to do so.
You basically want to toggle hiding and showing some functionality for this web page. This is easily accomplished by including the "Edit" button, "Add New Record" button, and popup (most likely in its own <div> somewhere in the page). So the "Edit" button will have the display set to something, be it inline, block, etc., while the "Add New Record" and popup would have a display of "none" or however it is you wish to hide it.
You've got the stuff set up and ready to go but now you need to show it when you click the "Edit" button. This is generally accomplished through Javascript. Just find the "Add New Record" button and switch the visibility.
When you click on the "Add" button you want to display a popup. This can be done in a variety of ways with different libraries. One of my personal favorites is using jquery's blockUI. Why? It doesn't allow the user to click anywhere except in the popup so it's a quick way to handle users trying to reach outside the scope of the popup.
So you've got all the new rows added and you are done editing. Maybe you have a "Save" button or something like that where you can click. When you do, you'll want to push all those new rows you just added to the database. Django handles this well and you could do something like include the new rows in part of the POST request or however you care to implement this solution.
So there's a bit of work ahead of you to get this page up and running with the exact functionality you need but hopefully this starts steering you in the right direction of where you need to go.
Hello fellow developers!
I want to realize a "Action" QCombobox where the different options trigger an action instead of choosing an option. The combobox says something like "Add Property" and when the user clicks it, he gets the different properties to choose from. If the user clicks one of them, it is added to -whateverdoesntmatter-. The combobox than switches back to it's original state.
The problem is, that the first entry "Add Property" is shown on the combobox's drop down, causing a little bit of confusion for the user since it is not really an action.
Normal state:
[Add Property]
Drop-down state:
[Add Property]
Add Property
Length
Width
etc ...
Therefore, I want to hide the first option as soon as the combobox drops down to achieve this behavior:
[Add Property]
Length
Width
etc ...
I have already tried with subclassing the combobox and overwriting showPopUp() and hidePopUp() - but I could not figure out how to get my intended behavior.
Ideas? Thanks!
If you don't absolutely need a QComboBox you might be better/easier off using a QToolButton with a QMenu associated and then set the button's popupMode to an appropriate value.
You may even use a QToolBar. Simply add a QAction with your desired label (like Add Property), associate the menu to it via QAction::setMenu and at it to the toolbar. The toolbar will automatically create the tool buttons itself.
To access the popupMode property you can use QToolBar::widgetForAction and cast it to a QToolButton.
I'm trying to only enable my custom ribbon button when an item is selected, but it looks like you can't do JavaScript in O365 from everything that I've read. Is this true? Is there no way to enable/disable a button based on the item(s) selected?
You can use custom Page components to do that. There's an execellent article in DIWUG magazine issue 6 on how to do it. http://www.diwug.nl/DIWUG_SharePoint_eMagazine6.pdf
I have an application using UITabBarController. There are 5 tabs (tab1, tab2, cameraTab, tab3, tab4). When user taps on middle tab , the modal view will appear hiding the TabBar (in my case camera - UIImagePickerController). If user then taps on cancel button on that modal view, how do I make it to return to previously selected tab. For example: if i am on tab2 and I tap on the camera tab, modal view appears and then I tap on cancel, how do i return back to tab2 automatically. The same goes for all other tabs, if I'm on tab3 it should return to tab 3 and so on. Right now it remains on camera tab without modal view - just blank view with background image.
I'd really appreciate if you can help me with some examples. I've been searching in various ways - there must be a way that UITabBarController keeps a record of previously selected tab.
Thank you
Personally, I think you should create a custom view where the middle camera tab would not be a tab at all, it would actually just be a button that presents the modal view and then that view would have a button to dismiss it. I would do a little research in http://idevrecipes.com/ to see if there is anything there. If not, maybe github. The tab bar itself is looking for views to push, not present.
I am sorry I couldn't give you more of an answer, but I wanted to give you something for waiting so long.
is it possible to hide or deactivate a menu item in the file button called also jewel button? I´m able to hide completely the file button with javascript, but I want to hide or disable only some menu items in the flyout menu.
Thank you in advance
You will find these Jewel buttons within the application ribbon. You can choose to hide these buttons in your customizations.xml via some hide HideCustomActions. The names of some of the Jewel buttons you will find are:
- Mscrm.Jewel.NewMenu.NewActivity
- Mscrm.Jewel.NewMenu.NewRecord;
For example, within your appointment ribbondiffxml section within your customizations.xml, you could have a HideCustomAction like:
<HideCustomAction HideActionId="CustomHideAction.JewelMenu.NewActivity" Location="Mscrm.Jewel.NewMenu.NewActivity" />