The Issue: We are running Maximo 7.6.1 or greater; I have a custom application (no java class customizations) that includes a custom dialog, and this dialog is used to update data in the app.
My application includes 4 main tables, where the selected row in table 1 filters table 2, the selected row in table 2 filters table 3, and so on... this allows the user to manage data that is structured in a basic hierarchy.
Based on the users settings in the dialog, rows are manipulated/added in the application, and the data is refreshed and saved when the user clicks ok.
The Problem: Although the data is updating correctly when the user clicks Ok and the dialog closes, all the table selections are reset... so whatever record the user was working on - although updated correctly - is no longer displayed. This seems to happen due to the "DialogOK" event being triggerd... however, without running this event, the data does not update in the UI.
How can I ensure Maximo does not reset the selections after the dialog closes and data is updated?
Alternatively, I actually found I was able to access the databeans for each of the tables within my Jython script, and was able to get the index of each currently selected row... How can I set the current row of each databean/table to it's previous value after the "DialogOk" event completes? This could be a solution to manually reset the selection.
Thanks!
Try something like this:
from psdi.common.context import UIContext
from psdi.webclient.system.controller \
import SessionContext, Utility, WebClientEvent
context = UIContext.getCurrentContext()
wcs = context.getWebClientSession()
control = wcs.findControl('name of table')
row = control.getCurrentRow()
#do stuff that breaks the row
control.setCurrentRow(row)
control.rowChanged()
Related
I have a very simple Oracle Apex app. I created a button on the home page. I also created a second page using the "Form" template, and the source for this form is a table in the local database.
I set the button to open the form, and I passed the value of the primary key of this form (it's a column called ID) from the home page to the form page, as this screenshot of the button's behavior shows (3 is the page number of the form, P3_ID is the page item in the form associated with the primary column "ID", and 1 is the value that I passed for P3_ID):
The table that the form references is empty, i.e. there is no row with ID equal to 1. Meaning I want to pass the value of 1 to this form so that it automatically create a row with ID of 1 after the user fills out the rest of the form. Here is the form page:
Now the error. When I run the app and press the button, I get this error:
The error says it's from the process called "Initialize form Warcraft Particulars". I searched everywhere and I couldn't find a process by that name anywhere in the app. What am I doing wrong?
Pre-rendering process (in a form) will try to execute query and fetch a row whose ID = 1; as it doesn't exist, Apex raises the no_data_found error. That's why you got it (the error).
Moreover, you're doing it wrong - don't pass ID you'd want to create, fill it in form's process (or use a database trigger which will put a sequence number into the ID column, or use an identity column if your Oracle database supports it (12c onward)).
Furthermore, I'd suggest a slightly different approach: don't create a form that's alone in the Universe. Approach that lets you both view existing data, update (or delete) it and insert new rows is to use a Wizard and choose a report with a form. Exact naming is different from one Apex version to another; for example, current apex.oracle.com Apex version is 22.2 and it offers "Interactive report", while the 1st Wizard page lets you choose whether you want (or not) to include a form page (you'd say "Yes").
Anyway: once you find the correct option, choose it and wizard will then create an interactive report page you'd use to
view current data
it has an edit icon at the beginning of each row which - when pressed - navigates to the form page where you can edit values or delete entire row
create new row (by pressing the "Create" button)
and a form page which does what I described a moment ago.
I have an Access app I wrote, to handle the data work a team needs to do, rather than working on a giant excel spreadsheet. The one annoying constraint is people are sharing this db over a wifi connection.
I have the db split, so users get a copy of the front end in runtime, when they run a bat file shortcut. The backend is on a hard drive, connected to a laptop, which is directly connected to the wifi router.
In this app, I have a form with a combo and some buttons to perform functions on dynamic queries, so the user can filter the records. Everything is in 1 table, and the table has about 75,000 records. When the users go to the form, on load, a sql string is constructed, to set the base recordsource for the form.
When a user clicks any column in the datasheet view subform object, the whole form freezes and you can see in the bottom right Access says "running query". The users like to click the drop down arrow by the column to filter based on values, and that usually isn't too bad, but clicking on the column seems to trigger a query to run and I don't know why. Can anyone help?
I just want to up the performance on this application as much as possible. These forms allow the users to filter to a set, select the rows they want, click a button, and a column gets tagged (assigning those records to someone). Then a button shows, they click it, and those results are exported to an excel formatted template. They send that to the person assigned the records. Later that comes back to us, and I have a button for our users to import that sheet and process what the assigned person entered on their records.
Thanks for any help anyone can give!
I'm new to APEX. When I create pages in my app the edit pages that generate automatically work for some pages but not for others - they are blank except for the Create, Delete, Cancel buttons and the PK item (but that one's "Hidden"). There are no other items. I tried to add them manually but they don't connect to the respective rows - when I try to edit a row in the app it displays empty lines
Consequentially, I also can't delete any rows. I tried to compare everything in the settings of pages that have working edit pages but nothing worked
From my point of view, the simplest option is to create either
a form on a table with report whose wizard will create
an interactive report you'd use to view data; enable you to modify existing records using the "edit" icon at the beginning of each row; create new records using the Create button
a form used to modify and create new records
a tabular form (or an interactive grid) that enables you do do everything (insert, update delete) on the same page
If you create a form by yourself, you should create required processes which do different actions. I'm lazy to do it manually, so I always let the Wizard do the dirty job.
From your description, it seems that you created a form, included several items, possibly set them to be database items, but Apex doesn't know how to retrieve existing records (something like execute query in Oracle Forms). Therefore, try to use one of options I suggested and see how they behave.
I have a blank page with a static content region (Template = Form Region). I select a project via a select list (there is only one project, so it automatically selects it). I then have a key popup lov (a popup lov that displays the description not the returned number value) from which I select a person to be in this project. I am trying to get the form to display the person I selected and saved previously when the form launches for the first time (since the project is chosen due to there being one). This works when you refresh the page, but it doesn't work if you log out and log back into the form. I tried using the default value with a sql query. I tried using a dynamic action that fires when the project changes; but neither approaches work. I fiddled with all the settings, but couldn't get anything to work. Does anyone know how to accomplish this in Oracle APEX?
I even added a refresh of the cascading popup lov to the dynamic action. I can see the hidden input item showing my defaulted value, but the popup lov does not display it on screen. Is this an Oracle bug?
Also in Javascript from the console
$s("P51_LINE_MANAGER1", "7104");
sets the hidden value, but doesn't display on screen.
$v("P51_LINE_MANAGER1");
does however return 7104.
I have the amazing SlickGrid configured to access data asynchronously and post user changes back to the server asynchronously. In general terms, the server may modify a few fields of a row based on the user's changes. As such, after the row is updated I would like SlickGrid to refresh only that row without changing the rest of the view.
Does anyone know how to do this?
In my case, the field that changes on the server is a timestamp associated with the record that is updated by a database trigger. If the timestamp is out of date, the user has an old copy of data, and if they submit changes, they may overwrite a new copy. Since I can't find a way to trigger a refresh, the user cannot modify their own changes without refreshing the browser window (forcing a complete refresh).
You should be able to do this using grid.invalidateRow() and grid.render(). SlickGrid will re-render the affceted rows (assuming they are displayed in the currently visible viewport) without refreshing the entire page.
// Mark row 42 as changed and re-render the display
grid.invalidateRow(42);
grid.render();
For an example check out SlickGrid Example 14. (Click the Start Simulation button to see it in action)
function updateSlickgrid() {
dataView.setItems(tableName);
grid.invalidate();
}
Note : tableName could be the array or id etc.
I prefer storing all the slickgrid data in the array ex tableName = [];
Keep using the above function when it comes to displaying the data in slickgrid