adf richtable duplicates column on page refresh - oracle-adf

I have jsf page opened as a new window in a dialog containing a table with 3 columns, the problem is that when I close the page and reopen it or refresh it, the columns are getting duplicated meaning i have col1,col2,col3,col1,col2,col3 in the reachtable and as soon as i insert a new row it gets back to normal.
my bean is in session scope and the table is defined in jsfxml doc

Related

Add/ Update / delete over large collection in angular application performance issue

I have a angular page which shows 1000 of nested record (parent- child up to n-level) and further user can add/edit/delete the record from UI at any location. Each row contains a button to add row above/below, based on that new row is created. This UI has also drag and drop functionality over each row so if any row is draged over another then parent child rows created. For this we have a json collection in nested way and in UI we have created a directive which is called recursively to show the nested record using ng-repeat.
We are facing performance issue here, if user try to add a new row at any specific point we are adding a new blank row in json data on specified index and based on this blank row a blank form is shown which renders very slowly.
Functionality is working but whenever a new add/update/deleted happens over row then it stuck and takes time to re-render the UI.
I cannot implement pagination here to restrict rows as user can create parent child relation by dragging over any row so all record should be shown.
Any one can suggest if other way around for this performance issue?

Listing and updating records in db

I have an Angular 4 front end that retrieves a list of records from a db and displays them to a user. I allow the user to edit each item by opening a popup dialog, making changes to the data, and clicking a Save button.
There are multiple users but I'm told that it will mostly be one user updating a given record at any one time.
when I load the records each record has all the data required, so I don't retrieve the record when the user opens the popup dialog (as all the data is already there).
when I save the data I return a status 200 on successful update and close the dialog - I don't refresh the list of items.
Does anyone see any issues with this approach? One thing I'm thinking is that if they have the initial screen open for a while, some of the records may have been updated by another user.
should I retrieve the record from the db when the user opens it in the popup dialog?
should I refresh the list of records after the user updates one and closes the popup dialog?
is there an easy way to check if a record has been updated in the background while a user was editing the same record
Just looking for best practice or typical approaches to this scenario - tia.

Sync up data in ADF table after update in DB table done outside ADF environment

I have a jsff page inside a bounded task flow. It displays a table. Each row of table has an edit icon. on click of which a new jsff page opens containing the information of the selected row ready to be edited.
Here user can update and save the information and check the information back on the first page by clicking a Done button on second page.Pretty much simple.
The problem is I have some complex implementation due to which I should not update the row information through ADF way. I take the information entered by the user and pass it to plane java file. There in the plane java file I instantiate an AM and update the information through this AM.
The problem with this approach is that when I click the Done button to come back on table page to check the saved data, the data on the table is stale.
This seems as If the table is being updated outside the ADF framework and so it is not aware of the underlying the data change hence the ADF UI table is not synced with physical table automatically.
JDev : 11.1.1.7.11
Options tried : Upon click of Done button I tried to requery the VO of ADF table by
1) Clearing the VO cache row and repopulating it
2) Re executing the iterator binding
3) Re executing the iterator binding programatically.
Thanks

How to update values to the Dataset

I'm working on windows form project, added service based library and created a table in it.
Just by dragging the table from the DataSources window i get the textboxes which show the values in the table.
When i start debugging, the form window appears and i enter values and click the save button on the top.
Sometimes it thrown exception.(Db is read-only). After changing permission, now when i click save button, nothing happens and in the table i find no new values.
Where is the problem?

Inline add/edit/delete data in views in Drupal 7

I am trying to create a content type (say Meter). Each Meter consists of a "Meter Reading". This meter reading content contains three fields, say title, date range and usage. I have a Panel page where I display all the Meter Readings related to a parent Meter. I have displayed the Meter Readings in a tabular format.
I want the user to be able to add new Meter Readings without going to the default Meter Readings creation page. Rather than the default form kind of page, the user should be able to enter the data in the table view provided and it should be automatically saved into the project itself.
So, I want the functionality to be like:-
Display all the meter readings with two links, i.e., Edit and Delete,
When the user clicks on Edit link, the meter reading row should become editable and the user should be able to make the changes inline in the same table,
In the footer there should be a link for adding a new meter reading and when the user clicks on it, a new blank row should be added dynamically to the table and the user should be able to make a new entry into it.
Is there a module in Drupal 7 for doing so?? I have already tried out several modules for this such as SlickGrid, jQGrid and jEditable
Any help would be great. Thanks in advance.
Am afraid am not aware about a module that does all that out of the box. But in case you carry on with custom coding you can have a look at the following:
Edit and Delete options per row in views
Use Views Megarow. For working example you can have a look at how its used in commerce backoffice. Please note that you need to write the form structure ( FORM api ) for the quick edit form in a custom module. The Views Megarow takes care of ajax populating the edit form, its submission in client side, and refreshing the original row after the response from server.
When the user clicks on Edit link, the meter reading row should become editable and the user should be able to make the changes inline
in the same table.
Views Megarow doesn't support inline editing. But another module as suggested by #nmc does it. Its editablefields. But it doesn't have any edit/delete button. You click on the text directly ( provided user has appropriate permission to edit the field data ) in view.
In case you are going to use editablefields, then you would have to add another delete button in view, which one confirmation would redirect to the page that triggered delete action.
Since delete button would redirect to a default confirmation page, you may want to code a custom delete action which may override this.
In the footer there should be a link for adding a new meter reading and when the user clicks on it, a new blank row should be
added dynamically to the table and the user should be able to make a
new entry into it.
I suggest creating a small ajax form. Create a "Add Meter Reading" button in it, which on submission would create a meter reading node in the server. The ajax form should have parent information in a hidden field ( i.e. the Meter id). The ajax response for this form could be another script to load/refresh the view on client side.
Client side code to refresh the view can be found in Views Autorefresh submodule in Views Hacks.
If using views megarow you would have to add another jquery function on ajax response after view is refreshed - Trigger edit button.
Otherwise you may have to add some classes or theme to newly created rows in view to bring them to focus.
It is important that the entire views refreshes, so that drupal behaviours are attached to the newly created entry in table.
I don't know if there is one module which will meet all your needs but you may be able to use some in combination.
Views Bulk Operations (VBO) - has Drupal 7 support
This module augments Views by allowing bulk operations to be executed
on the displayed rows. It does so by showing a checkbox in front of
each node, and adding a select box containing operations that can be
applied. Drupal Core or Rules actions can be used.
editablefields - Drupal 7 version in dev
This module allows CCK fields to be edited on a node's display (e.g.
at node/123), not just on the node edit pages (e.g. node/123/edit). It
also works within views etc. Anywhere a 'formatter' can be selected,
you can select editable (or click to edit).
editview - no Drupal 7 support yet but I thought I would mention it in case you're able to adapt the code yourself
Editview is a plugin for the Views module. It allows you to create a
view in which the nodes are editable, and new nodes can be created.

Resources