MarkForDeletion or DeepDelete
Hi all
I would like to delete a record in the ADSAccountInADSGroup table.
Use MarkForDeletion() or DeepDelete()?
MarkForDeletion on IEntity works well.
Tags: Dell Tech
Similar Questions
-
LOV in richeTableau resets the value after the deletion of rows from the table
Hello. I'm on 11g R2
I have a table with columns in the box and a button in the toolbar that removes the lines checked
I have build it based on the following article in her string code
http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/index-101235.html
When I run the "delete" button I execute the following code (taken as is article)
public void deleteSelectedRows() {}
create a second line, the value do not affect all lines
used in ADF
Set of rows duplicateRowSet = this.createRowSet ("duplicateRowSet");
first row to avoid "the attempt to access the value of lines."
exception line was dead.
duplicateRowSet.first ();
retrieve the current row of the table for after
re-running the VO
Line currentRow = this.getCurrentRow ();
Boolean currentRowDeleted = false;
get all rows that have the transoent attribute
"MarkForDelete' set to true
Row [] rowsToDelete =
duplicateRowSet.getFilteredRows ("MarkedForDelete", true);
If (rowsToDelete.length > 0) {}
run only throizgh this code, if there is something to
delete
for (line rw: rowsToDelete) {}
If the row is marked as the current in VO, ts value
Boolean flag
If (rw.getKey () .equals (currentRow.getKey ())) {}
currentRowDeleted = true;
}
remove the line - do not yet commit
RW. Remove();
}
rerun VO
this.executeQuery ();
reset the current line if it has not been removed
If (! currentRowDeleted) {}
this.setCurrentRow (currentRow);
}
duplicateRowSet.closeRowSet ();
}
}
"MarkedForDelete" is a transient attribute used to mark the line delete
The lines are removed very well.
The problem is with lines that I do not delete.
For example I LOV column. I chose the value LOV in a few lines, and after that choose to delete several lines (not the same lines where I modified the LOV) but some other lines.
After I click "delete", the lines that I marked to remove deleted indeed, but the value of the LOV in other rows (I have not scored for delete) are disabled.
How to preserve value LOV so it will remain also after I deleted some lines?
P.S. I've tried autosubmit = "true" - it did not help
It is expected because I see that you rerun the query.
Once you re - run, it retrieves from the database again. Thus, your values are lost because they are not posted.
I don't think that run query is necessary, try to have a programmatic part trigger on the table after you remove all of the lines.
Thank you
Alisson.
-
I had another problem when I delete a row after row of selection...
javax.faces.el.EvaluationException: java.lang.NullPointerException at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130) at oracle.adf.view.faces.component.UIXComponentBase.__broadcast(UIXComponentBase.java:1079) at oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:204) at oracle.adf.view.faces.component.UIXCollection.broadcast(UIXCollection.java:94) at oracle.adf.view.faces.component.UIXTable.broadcast(UIXTable.java:205) at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
public void commandButton4_actionListener (ActionEvent action) {}
Add the code in the event here...
If (table1.getSelectionState () .getSize () == 0)
{
FacesContext ctx;
CTX = FacesContext.getCurrentInstance ();
FacesMessage fm = new FacesMessage (FacesMessage.SEVERITY_ERROR, "row SELCECT","" "");
ctx.addMessage (ctx.getViewRoot (.getViewId ()), fm);
Choose one of the following lines
Returns a null value. If it is an Action
If it's an ActionListener
}
else {}
Table coreTable = getTable1();
Selection of the iterator = table.getSelectionState () .getKeySet () .iterator ();
String oldKey;
oldKey = (String) table.getRowKey ();
System.out.println ("before the Loop");
While (Selection.hasNext ())
{
System.out.println ("after the loop");
String rowKey = next (m:System.NET.SocketAddress.ToString ());
System.out.println ("after casting");
table.setRowKey (rowKey);
TestcustomermasterViewRowImpl line = table.getRowData ((TestcustomermasterViewRowImpl));
-System.out.println ("Before Removing"); - the action when I click on Remove button, the code is executed until this statement only. not enter enter row.markForDeletion)
------------------------------------------------------------------------------------------------------------------------------------------------------
row.markForDeletion ();
System.out.println ("after delete");
}
restore the old key:
table.setRowKey (oldKey);
}Hello
See: http://kuba.zilp.pl/?id=121
Kuba
Maybe you are looking for
-
Https: / specific page does not load after udate to 38.05
https://my.albertahealthservices.cadoes not load after update of 38.05 on my desk. I tried it on my laptop and it will load BUT after having been undated to 38.05 also failed to load this page. Other secure pages (Bank) loading OK Works well in Chrom
-
Cancel button "impression" on the 8620
I don't see the button cancel anywhere on my screen. How I can interrupt or stop the printing on the printer? I've owned 100's of printers and there is always an 'X' to cancel quickly before losing time and paper. Thank you
-
I have a new laptop HP 8440 and I'm having a very strange mouse problem. The point of the mouse on the screen from time to time will crawl slowly towards the top of the screen. This occurs when you use the Touchpad mouse or when you use a USB optic
-
Activation error: "Invalid product key".
invalid product key message
-
Hello As the title says. I noticed this problem because as I tried to save a text file as C: and he said something like "you do not have permission... may save in your documents instead? And I thought, I'm the only user (and first account) on this l