How to implement pessimistic locking in Oracle Apex [closed] - oracle-apex

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I have link on ID column, when user click on link there is an EDIT button.
When click on EDIT user can make changes.
But, I want to ensure that two users can't edit in same time, and when one user click on edit that all users can't see edit button till save/commit record.
Also to leave message eg. Record is editing by another user, please try later.
I can add one column in table eg. editing number(1), but how to change this column to 1.
when user click on EDIT button?

To give an answer on you question:
You can create a dynamic action which will be triggered on pageLoad. That DA should then update the column to 1 or Y.
!! Warning:
But how will you make sure, that the column will be updated back to 0 or N? Buttons and actions which closes the modal, can update the column back to its initial state, but the X - Close Window button won't. And what if your browser closes or crashes?
In that case, you would be left with a record, which can't be edited anymore by anyone, since that record is still indicated as currently being edited.
I strongly advise not to go down that road!
Instead, trust Oracle APEX's Prevent Lost Updates and Lock Row mechanism's. These are available in the Settings part of the Automatic Row Processing process.

Related

bootstrap table and a form (inline formset factory) associated with each row in that table [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 days ago.
Improve this question
I have a bootstrap table and a form (inline-formset-factory) associated with each row in that table. That form should appear and disappear below the corresponding row when a button is clicked in that row.
i tried Bootstrap collapse option but while clicking the button(form submit) in the row to induce the inline formset factory form with specified parent model, the form opens in all the rows. But i wanted the from to appear in that corresponding row only.

Visual Studio MFC Radio Button error with variable [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I am a Visual Studio MFC newbie, and have been a bit perplexed by a problem over the last couple of days. When I create a radio button and assign it variable, I get a "Debug Assertion Failed". How should I make the radio button a variable?
You have to make sure that the first radio button in a sequence of radio buttons is of style WS_GROUP. It is a style you can set in the dialog editor by selecting the first radio button and setting its style to Group.
You want to use an int as the type to receive/set and only use DDX_Radio() on the first radio button on the group. It will return 0 if first radio selected, 1 if second, 2 if third, etc... Make sure the value you use, a member variable is initially set to 0 or another valid value.

One form across two pages django [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want to create a form that does the following: the user specifies the number of questions that they want to ask and then on the next page, the user is able to fill out the relevant details pertaining to the number of questions that they to ask. I was wondering if there is a simple way to do this using django forms?
My approach is as follows:
I use one form to record the number of questions that the user wants to ask with a general description, then when the user clicks submit/next, the next view would create a form with those number of questions; however, I'm running into a complication when trying to use this method. I want to link the first form to the second form, but not sure how to because I can't preserve any information in the view from each call.
Is there a better way of going about this problem?
You certainly can preserve information between views. Perhaps the easiest way to do this is in URL parameters; your first view can redirect to "/second_view/?number_of_questions=5" and the second view can access request.GET['number_of_questions'].
An alternative, which is particularly useful if you have a lot of data, would be to use the session; add the data to the session on submit in the first view, and pop it out in the second.
In Django 1.8, the django.contrib.formtools module was moved into a separate package, django-formtools. It includes the FormWizard, which is the standard tool you'd use to create a form that spans multiple pages and/or steps.

Sitecore item will not go into edit mode; any suggestions on how to troubleshoot?

I have several Sitecore items (whose template is connected to an approval workflow) that will not go into Edit mode when clicking "Edit" from the "Review" tab. The same workflow is used elsewhere on the site successfully (the site is more than 3 years old), but clicking Edit in this case doesn't seem to affect the workflow state.
I've turned on verbose logging, which provides a lot of detail, but nothing to indicate any error conditions. I've been comparing how this template is configured with other "working" templates for a couple of days and everything looks Kosher, but surely I'm missing something obvious.
EDIT: The item(s) in question are imported by a data provider, and I've confirmed that for some reason Sitecore is not setting the "Workflow" and "State" system standard fields with a default value. That appears to be at least part of the issue.
EDIT 2: Followed the steps in this thread http://sdn.sitecore.net/Forum/ShowPost.aspx?PostID=45991 to use Sitecore Rocks to update all of the items to the correct Workflow State, but the update did not stick. For some reason workflow changes are not persisted for imported items.
EDIT 3: Clicking the Edit dropdown button under the Home tab displays the message "The item is currently not part of a workflow."
Standard values set correctly? Only have one Standard Values item for this template?
Generally, almost every time I run into a situation where X works on certain items, but not on others... it's a permissions issue. You've tested this as an Administrator I hope?
Sorry my suggestions are so vague, but it's hard to be specific here. We need some more information from you... When you click on Edit what exactly are you expecting to happen? I'm not entirely sure what you mean by "Edit mode" here. In Content Editor, all items are essentially in edit mode all the time... In my configuration, when I click on Edit, I am just locking the item. It does not change workflow state or create a new version.
These items are coming from a data provider... is your data provider handling Lock/Unlock calls properly? I know it's possible to use a data provider without implementing the entire Item API.

Joomla template displaying in iframe [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have a site that requires an iframe for inserting a reservation widget into a Joomla article. I have no problems displaying the iframe in the article, but the problem is the template is also displaying in the article. It's as if the iframe wraps the entire site inside the article also. I only need the reservation widget to appear. You can see it here http://www.archersinn.com/reservations. The reservations widget is a third party my client uses so I just need to figure out how to display it properly. Any ideas?
You can show only the component using this parameter at the end of your joomla url
?tmpl=component
http://www.archersinn.com/reservations?tmpl=component
But you need to do this before this page.
In the page you insert your code for reservations you have style from Joomla, but is not joomla, I'm right?
In your iframe you are calling an external webpage. If you got control over the look and feel of the external widget site, you may configure that page to look like your current page - http://www.archersinn.com/reservations, with the introduction and title etc.
Instead of linking the menu item reservations to an article within your site, you may consider pointing the menu item to the external site - https://secure.rezovation.com/Reservations/CheckAvailability.aspx?s=H4LUxh0dk0&type=raw. Change the menu item type to External Link and set to open it in the parent window.
The iframe is pointing to https://secure.rezovation.com/Reservations/CheckAvailability.aspx?s=w36FN02v7M&type=raw but that site has made a custom template for you so that it matches the look and feel of your website.
So it's not supposed to be an iframe at all. Just change the URL of the Reservation button to the following and you should be sorted: https://secure.rezovation.com/Reservations/CheckAvailability.aspx?s=w36FN02v7M&type=raw
Many booking systems do it this way. They have the booking engine on their own system and redirect back to your website at the end of the transaction.