Same page for insert/update
Hi there,
Do someone knows about JSF patterns for using the same page/form for inserting and updating the same entities information ?
2 use cases:
1 --> the user browses a list of objects (DataTable), let's say Employees, clicks on one line and gets redirected to the employee details page so he can update the information;
2 --> the user wants to create a new employee and goes to the same page which is empty.
The way I am actually doing it: I have an employeeForm page and an EmployeeForm managed bean (session scope) which contains an instance of Employee. This Employee is initialized when an empty form is needed or sent by DataTable controller when employee details' are requested.
This is not really nice to my point of view since the EmployeeForm controller has to re-initialize it's Employee instance after each usage.
Does someone has a link or can provide a comment for a "best practise" on that topic?
Thanks in advance,
Fabrice.
I think you should consider using the request scope of the employee bean, when navigating from dataTable to employeeForm overwrite the bean with the value from datatable
otherwise the bean is created on every request.
Similar Messages
-
Creation of new button on same page after insert command
Hello All,
I have an application running on apex.oracle.com where my workspace name is shruti_work,username is [email protected] and password is buwigi. The application name inside this is "app2"
I am trying to achieve one functionality there but unable to get it so felt like seeking an help from experts here. I have two forms there one page1 form which is simplly made on an html region with go button which is navigating the page 1 items value to page 2 but simply passing their address witout updting the database table.
In Page 2 i created page on a table or view, which made some extra buttons which i dont want like applychanges ,delete button, cancel button. I created a create button even which is updating my database with insert sql command. What i am seeing is after my create button is pressed i got navigated to same page 2 which i want to but the applychange button, cancel and delete button got appeared. I dont get the idea why it is so. i have checked the buttons even i didnt found anything there.
All i want is when i press create button in page 2, my database get update and at the same page (2) a new button get appears which i have to use for other things. Approaching to this solution i created a button with giving databse action update and condition to this button "value of item in expression 1 is not null" and in expression 1 i passed p2_id...... but my new button is not getting created.
Any help on this?Hi Jeff,
I dont want applychanges button and delete button in my page 2. But when i created form on a table or view this but got created and i cannot delete it even. When i am navigating my page from page 1 to page 2 and filling the fields in page 2 and clicking create button, at that time i want after updating my table and running my plsql process which i have created which you can see in page processing, my button at same page get generate which i will use to navigate to other form. This button which i want to generate after clicking my create button will be meaningful only if my record get inserted in table. so that is why i want it at that time.
I dont want any report so i am not creating form on a table or view -
CQCs for inserts/updates only where newValue != oldValue?
I want two producer apps placing identical data in my cache for redundancy but I don't want listeners advised twice of the insert/update. Is there a way so CQCs only receive events if the data put in the cache is different than the existing value?
Thanks,
AndrewHello Andrew,
I think what you would want to use is the [ MapEventTransformer|http://download.oracle.com/otn_hosted_doc/coherence/350/].
If you compare the new and the old value and they are the same then return null which will not send the event.
Hope that helps,
-Dave -
Search criteria for insert/update bdoc
Hi All,
In our set up we have ecc to crm replication of BP. If one goes and checks the extension data of a stuck bdoc it has an Object Task- Insert or Update.
Can someone help me with search criteria so that i can pull out bdocs which have an Insert as the Object task ??
We have search criteria for errored/intermediate state bdocs; for inbound vs outbound; bdoc type etc etc..
Need one based on Insert/Update Task so that any new data replication if stuck with its very first bdoc( Insert type) can be immediately queried.
Regards
AbhinavHello Abhinav,
I do not think that we have such a search criteria to search for BDocs based on the Task Type, which comes under the
data part of the BDoc.
One alternative way is to find out in which table these data gets stored and write a program to fetch the revelent Bdocs.
Hope thisl helps!
Best Regards,
Shanthala Kudva -
RFC enabled function module for insert update and delete in a Ztable..
friends..
Is there any standatd RFC enabled function module to insert , update and delete data in a custom database-table (Ztable)? if not how can we create it? plz give me the details steps..
what are the import, export parameters and how to develop and process it.. (for example: suppose fields in the table is Emp_Id, Name, Address)
Thanks and RegardsHi,
Try this code.
REPORT ZMMC071Z_RMV.
TYPE-POOLS : ABAP.
FIELD-SYMBOLS: <DYN_TABLE> TYPE STANDARD TABLE,
<DYN_WA>,
<DYN_FIELD>,
<LV_CONDI>.
DATA: DY_TABLE TYPE REF TO DATA,
DY_LINE TYPE REF TO DATA,
XFC TYPE LVC_S_FCAT,
IFC TYPE LVC_T_FCAT.
SELECTION-SCREEN BEGIN OF BLOCK F1 WITH FRAME TITLE TEXT-001.
PARAMETERS: P_TABLE LIKE DD02L-TABNAME OBLIGATORY.
SELECTION-SCREEN END OF BLOCK F1.
Evento: At Selection Screen *
START-OF-SELECTION.
PERFORM GET_STRUCTURE.
PERFORM CREATE_DYNAMIC_ITAB.
PERFORM GET_DATA.
END-OF-SELECTION.
*& Form get_structure
text
FORM GET_STRUCTURE.
DATA : IDETAILS TYPE ABAP_COMPDESCR_TAB,
XDETAILS TYPE ABAP_COMPDESCR.
DATA : REF_TABLE_DES TYPE REF TO CL_ABAP_STRUCTDESCR.
DATA VL_LENGHT(30).
Get the structure of the table.
REF_TABLE_DES ?=
CL_ABAP_TYPEDESCR=>DESCRIBE_BY_NAME( P_TABLE ).
IDETAILS[] = REF_TABLE_DES->COMPONENTS[].
LOOP AT IDETAILS INTO XDETAILS.
CLEAR XFC.
XFC-FIELDNAME = XDETAILS-NAME .
XFC-DATATYPE = XDETAILS-TYPE_KIND.
XFC-INTTYPE = XDETAILS-TYPE_KIND.
XFC-INTLEN = XDETAILS-LENGTH.
XFC-DECIMALS = XDETAILS-DECIMALS.
APPEND XFC TO IFC.
ENDLOOP.
ENDFORM. "get_structure
*& Form create_dynamic_itab
text
FORM CREATE_DYNAMIC_ITAB.
Create dynamic internal table and assign to FS
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = IFC
IMPORTING
EP_TABLE = DY_TABLE.
ASSIGN DY_TABLE->* TO <DYN_TABLE>.
Create dynamic work area and assign to FS
CREATE DATA DY_LINE LIKE LINE OF <DYN_TABLE>.
ASSIGN DY_LINE->* TO <DYN_WA>.
ENDFORM. "create_dynamic_itab
*& Form get_data
text
--> p1 text
<-- p2 text
FORM GET_DATA .
*Get data from p_table into internal table <DYN_TABLE>
SELECT * INTO TABLE <DYN_TABLE>
FROM (P_TABLE)
Here you can implemente function DELETE, INSERT.
ENDFORM. " De_para -
Interfaces used for insert/update data in tables
for providing security the procedures are not allowed to directly insert/update the values in tables.some one suggested that use interfaces for this .i want infomation about this interfaces. how this works and how to use
An interface is an intermediate set of procedures/functions that do the job for you.
You haven't explained what it is you're trying to achieve exactly, but here's an example scenario.
We don't want to allow our developers to query, or write to the tables directly so they are set up with certain database users that have no permissions granted on the tables for such things.
Instead they have been granted permission to call procedures and functions belonging to another schema, and it is those procedures and functions that do the required table access and/or pass information/data back or write to the tables.
The developers have to write their applications to call these procedures to do any access to the tables. This means that they are limited to the functionality provided by these interface procedures so, if there is internal auditing or columns of data etc. on the tables then it may be that they can't access this data, but only the "user facing" data.
The interface can also ensure that data meets certain requirements before being written to tables, allowing for business or technical level restrictions to be implemented. -
Different datatypes for insert/update
Hi All
In our design currently we recieve all the data for different
tables in 1 stand by table.
the column datatype in which we recieve the data is varchar2
from this table we insert / update data into the actual tables
where column datatypes can be of numeric, varchar2, date etc
Will updating /inserting into columns of different datatypes from
the varchar2 column will result in any error
RgrdsFor general sanity, you probably want to explicitly cast things (i.e. to_date, to_number, etc). If the varchar2 data is really always numeric when it is being inserted into a NUMBER column, you'll be fine. On the other hand, this sounds like a process that would be quite a maintenance headache if your data is the least bit dirty.
Justin
Distributed Database Consulting, Inc.
www.ddbcinc.com/askDDBC -
Query on Correct Toplink Usage for insert/update
Hi,
I have a JSF based web application where-in my backing bean is having the Toplink generated enities as managed properties. i.e. the Toplink entity is being populated by the JSF value binding.
Now when I want to insert/update this entity, what approach should be followed(keeping in mind that the entities are detached entities).
I am using Toplink ORM v 10.1.3. I was thinking that I would have to call mergeClone for the update and registerObject for insert. But can I use mergeClone for both insert and update ?
Also mention the performance implications of the suggested option.
Regards,
Ani1. The main concern is will it work with the telecom carriers in India?
It will work in India. The N9 is not released in the US either, so its certainly not tuned to work with specific carriers there.
2. Do I need it to get it unlocked if I buy it from USA?
The N9 is not released in the US, hence you will not be able to buy a locked phone from there. So no question of unlocking it.
3. Will I be able to update the phone's software from India?
I bought the phone in UK, where the N9 is not released. I was able to update the software without problems.
4. What are the chances it will give problems as there would be no warranty/support on it when I bring it here in India.
No idea. Depends on your luck, as with any other phone.
5. Should I go ahead and buy Lumia 800 as it is readily available in India and its support too.
I believe the N9 is a better phone than the Lumia 800. But if you have concerns on the support and warranty, better to be safe than sorry.
A better bet would be to buy from Singapore, if you have someone who could send you the phone from there, or buy it in India from some dealer, who also promises some support. -
API for inserting/updating system profile option values
Hi,
Is there any API that I can use to insert/update system profile option values via PL/SQL?
Regards,
Santhosh JoseHi Santosh,
You can think of using the FNDLOAD utility to download the values from one instance and upload to other instance.
## Now lets have a look at the profile option using oracle's FNDLOAD
FNDLOAD apps/$CLIENT_APPS_PWD O Y DOWNLOAD $FND_TOP/patch/115/import/afscprof.lct POR_ENABLE_REQ_HEADER_CUST.ldt PROFILE PROFILE_NAME="POR_ENABLE_REQ_HEADER_CUST" APPLICATION_SHORT_NAME="ICX"
## Note that
## POR_ENABLE_REQ_HEADER_CUST is the short name of profile option
## We aren't passing the user profile option name in this case. Validate using ...
########----->select application_id, PROFILE_OPTION_NAME || '==>' || profile_option_id || '==>' ||
########----->USER_PROFILE_OPTION_NAME
########----->from FND_PROFILE_OPTIONS_VL
########----->where PROFILE_OPTION_NAME like '%' || upper('&profile_option_name') || '%'
########----->order by PROFILE_OPTION_NAME
########----->/
## Now to upload
FNDLOAD apps/$CLIENT_APPS_PWD O Y UPLOAD $FND_TOP/patch/115/import/afscprof.lct POR_ENABLE_REQ_HEADER_CUST.ldt
For other config components download and upload you can refer the link- http://www.apps2fusion.com/apps/scripts/19-oracle-fndload-script-examples
Thanks,
Sanjay -
Autotrace for insert /update
Hi,
Db : 10.2
Os : Aix6
Is it possible to get the explain for insert statment without inserting the data in oracle 10g?I set set autotrace traceonly explain.
SQL> insert into emp select * from emp;
245760 rows created.
Execution Plan
Plan hash value: 2872589290
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | INSERT STATEMENT | | 952K| 22M| 582 (3)| 00:00:07 |
| 1 | TABLE ACCESS FULL| EMP | 952K| 22M| 582 (3)| 00:00:07 |
Note
- dynamic sampling used for this statement
Thanks & Regards,
VNHi VN,
AUTOTRACE information is generated only after successful execution of DML.
Please note: http://docs.oracle.com/cd/B10501_01/server.920/a96533/autotrac.htm
So using AUTOTRACE you cannot get what you want. However, you can just use EXPLAIN PLAN statement.
explain plan for
select * from dual;
select dbms_xplan.display() from dual;vr -
Cursor problem ! (equivalents for insert, update and delete)
Hi,
I am having following three sql statements. I am using Oracle 8i.
====================================================================================================================
Statement1 : Insert
Insert Into DBSchema.DstTableName( dstCol1, dstColP, dstColKey, dstCol2, dstCol3, dstCol4, dstCol5, dstCol6 )
( SELECT DbSchema.Seq.nextval, srColP, srColKey, srCol1, srCol2, nvl(srCol3,0), nvl(srCol4,0), SYSDATE
From
SrcTableName SRC
Where
srcColP IS NOT NULL AND
NOT EXISTS
(SELECT 1
From
DBSchema.DstTableName Dst
Where
SRC.srcColP = DST.dstColP AND SRC.srcColKey = DST.dstColKey )
====================================================================================================================
Statement2 : Update
Update DBSchema.DstTableName dst
SET ( dstCol1,dstCol2,dstCol3,dstCol4, dstCol5)
=
( SELECT srCol1, srCol2, nvl(srCol3,0), nvl(srCol4,0), SYSDATE
From
SrcTableName src
Where
src.srcColP = dst.dstColP AND SRC.srcColKey = DST.dstColKey
WHERE EXISTS (
SELECT
1
From
SrcTableName SRC
Where
SRC.srcColP = DST.dstColP AND SRC.srcColKey = DST.dstColKey ) ;
====================================================================================================================
Statement3 : Delete
Delete
FROM DBSchema.DstTableName DST
Where Exists (
SELECT
1
From
SrcTableName SRC
Where
src.srcColP = dst.dstColP )
AND NOT EXISTS
SELECT
1
From
SrcTableName SRC
Where
src.srcColP = dst.dstColP AND SRC.srcColKey = DST.dstColKey ) ;
====================================================================================================================
For the above three statement I have written the following cursor.
Equivalent Cursor:
PROCEDURE DEMOPROC
is
loop_Count integer := 0;
insert_Count integer := 0;
CURSOR c1
IS
SELECT src.srcCol1,
src.srcCol2,
src.srcCol3,
src.srcCol4,
src.srcCol5,
src.srcCol6,
src.srcCol7,
src.srcCol8,
src.srcCol9,
src.srcColKey,
src.srcColP
FROM
SrcTableName SRC
Where src.srcColP IS NOT NULL
AND NOT EXISTS
(SELECT 1
From
DBSchema.DstTableName Dst
Where
src.srcColP = DST.dstColP AND src.srcColKey = DST.dstColKey )
BEGIN
FOR r1 in c1 LOOP
Insert Into DBSchema.DstTableName( dstCol1, dstColP, dstColKey, dstCol2, dstCol3, dstCol4, dstCol5, dstCol6 )
values(DBSchema.Seq.nextval, r1.srcColP, r1.srcColKey, r1.srcCol1, r1.srcCol2, nvl(r1.srcCol3,0), nvl(r1.srcCol4,0), SYSDATE);
Update DBSchema.DstTableName dst
SET dst.dstCol1=r1.srcCol1 , dst.dstCol2=r1.srcCol2,
dst.dstCol3=nvl(r1.srcCol3,0),
dst.dstCol4=nvl(r1.srcCol4,0),
dst.dstCol5=SYSDATE
Where
r1.srcColP = dst.dstColP
AND
r1.srcColKey = DST.dstColKey ;
Delete
FROM DBSchema.DstTableName DST
Where
r1.srcColP = dst.dstColP ;
insert_Count := insert_Count + 1 ;
/* commit on a pre-defined interval */
if loop_Count > 999
then begin
commit;
loop_Count := 0;
end;
else loop_Count := loop_Count + 1;
end if;
end loop;
/* once the loop ends, commit and display the total number of records inserted */
commit;
dbms_output.put_line('total rows processed: '||TO_CHAR(insert_Count)); /*display insert count*/
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('Error '||TO_CHAR(SQLCODE)||': '||SQLERRM);
END;
====================================================================================================================
I am not sure whether this cursor is right or not, have to verify it.
In delete and insert statements there is same where not exist clause in the original statement so I included that in my cursor declaration but not sure whether update will work with that or not.
I have to use the three statements mentioned above for few source and destination tables and each are having many rows. How do i tune it ?
What else can be done to improve the performance with the the three statements mentioned above.
Any help will be highly appreciated.
Thanks !
Regards,You wont any anything extra by creating mulitple threads of the same question. Instead of this just provide the full information wht have been asked so that someone here can helpo you. If you keep doing like this then you will put yourself in our's negative list and that's not good for you.
Daljit Singh -
Help for inserting/updating new record
hi,
i am trying to insert new data in account record in CRM OD from java using (web service v2.0 ) following methods
AccountInsertInput accountinsert=new AccountInsertInput();
accountinsert.setListOfAccount(accountDataList);
Here accountDataList is object of ListOfAccountData.......i want to know how can i insert data in accountDataList that is passed as argument....what i think is that i can create object of AccountData and set required values then convert this to ListOfAccountData(which i am not sure if possible)....pls help
there is one more problem while updating i am getting ...."No user key can be used for the Integration Component instance 'Account'."....however i have given the combination of user keys....i don't have accountid so i have just given id .....pls helpHi,
there is one more problem while updating i am getting ...."No user key can be used for the Integration Component instance 'Account'."....however i have given the combination of user keys....i don't have accountid so i have just given id .....pls helpPlease ensure that a record exists in CRM On Demand corresponding to the user key values you are providing. This error indicates that no record can be found matching the specified user key.
Thanks,
Sean -
I have the follwing table is called master table contain the follwing fields,
So here i need to create three Stored procedures
1.Insert operations(1 o/p paramter,and 14 input paramters) - uspInsert
2.Update operations(1 o/p paramter,and 14 input paramters) - uspUpdate
3.Delete Operations(1 o/p paramter,and 14 input paramters)
- uspdelte
The following is the table ,so using this to make the three sp's ,Here we will use Exception machanism also.
Location
Client Name
Owner
ConfigItemID
ConfigItemName
DeploymentID
IncidentID
Package Name
Scope
Stage
Type
Start Date
End Date
Accountable
Comments
So can u pls help me out for this ,bcz i knew to stored procedure's creation.I have the follwing table is called master table contain the follwing fields,
So here i need to create three Stored procedures
1.Insert operations(1 o/p paramter,and 14 input paramters) - uspInsert
2.Update operations(1 o/p paramter,and 14 input paramters) - uspUpdate
3.Delete Operations(1 o/p paramter,and 14 input paramters) - uspdelte
The following is the table ,so using this to make the three sp's ,Here we will use Exception machanism also.
Location
Client Name
Owner
ConfigItemID
ConfigItemName
DeploymentID
IncidentID
Package Name
Scope
Stage
Type
Start Date
End Date
Accountable
Comments
So can u pls help me out for this ,bcz i knew to stored procedure's creation.
Why you have to pass 14 parameters for DELETE and UPDATE? Do you have any Primary Key? If you do NOT have primary key in your table then in case you have duplicate information, SQL will update both or delete them together. You need to provide DDL of
you table. What are the data types of fields?
Best Wishes, Arbi; Please vote if you find this posting was helpful or Mark it as answered. -
In OWB I need to update the target table with same field for match/update
In OWb I am trying to update the target table with the match and the update on the same field can this be done. I am getting a error match merge error saying you cannot update and match on the same field. But in SQl my select is
Update table
set irf = 0
where irf = 1
and process_id = 'TEST'
Hwo do i do this in OWB.table name is temp
fields in the table
field1 number
field2 varchar2(10)
field3 date
values in the table are example
0,'TEST',05/29/2009
9,'TEST',05/29/2009
0,'TEST1',03/01/2009
1,'TEST1',03/01/2009
In the above example I need to update the first row field1 to 1.
Update temp
set field1 = 1
where field1 = 0
and field2 = 'TEST'
when I run this I just need one row to be updated and it should look like this below
1,'TEST',05/29/2009
9,'TEST',05/29/2009
0,'TEST1',03/01/2009
1,'TEST1',03/01/2009
But when I run my mapping I am getting the rows like below the second row with 9 also is getting updated to 1.
1,'TEST',05/29/2009
1,'TEST',05/29/2009
0,'TEST1',03/01/2009
1,'TEST1',03/01/2009 -
To Print the same page for Multiple times in SAPSCRIPT
Hi All,
I want to print the custom Invoice SAPSCRIPT to print 4 times with changes only in Header form as 'Original for Buyer', 'Duplicate for transport', Duplicate for Assesse, Triplicate for Central Excise,
how to print in such a way,,where to write the logic.. kindly guide me,
Thanks in Advance
KesavYou can do that in the following way: use Customizing for example Transaction NACE...
Select your output type and customize a second, third, fourth or fifth processing routine
using the same Progam and Form but another Form Routine.
The Nast-Output loops through up to the 5 form routines and can generate up to 5 printouts in this way .
In the below descibed example will be 3 documents generated with only the VAR1-Info changed....
example:
TA NACE: Your output type -> Processing Routines -> Select "Print Output" -> select Details -> Add Processing2/3/4/5
form routine "entry" for "Processing1"
form routine "entry2" for "Processing2"
form routine "entry3" for "Processing3"
edit your print program:
copy the old form "entry" or similar entry-routine from your print program
to "entry2" and "entry3"
report zprintprog.
DATA VAR1(100) Type C.
form entry using .....
VAR1 = 'Original for Buyer'
endorm.
form entry2 using .....
VAR1 = 'Duplicate for transport'
endorm.
form entry3 using .....
VAR1 = 'Triplicate for Central'
endform.
...you have to use the VAR1-variable in your form
for example in a header-window...
Maybe you are looking for
-
Invoking bpm process from outside
Hi, Currently, i can invoke a BPM Process web service from the WS Navigator. The next step is, how can i invoke this service from outside? I'm using SOAP-UI and i download the wsdl file from the service registry. It seems, the wsdl is not in a standa
-
ReturnEvent not get called after search more than 10 times in LOV page
hi there, I using ADF and Jdeveloper 10.3.1.2 In my project I have a form which called a LOV page for selecting multiple records and submit button sumup the values of each selected row of LOV and return to the main form and display added value on tex
-
Planning attributes in 11.1.2.2 and start/end dates in a cell
Hi. In Planning 11.1.2.2., can I make use of attribute dimensions as I would in a BSO Essbase cube? Also can I enter a start date and an end date entry in two different account members (e.g., start_date and end_date)? Thanks
-
Hi all, I've been playing around with ISE demo and I am very impressed!!! After trying different scenarios with my co-workers I came to a point where we find it kind of buggy. I have rules to redirect unknown users to pasturing through web where they
-
I am trying to configure ODI Agent using the tutorial given on the URL:(http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/odi/odi_11g/setup_jee_agent/setup_jee_agent.htm). I've followed and verified the steps written on the URL mentioned