ADF how to add an existent object to collection
I have three tables,
PRODUCT, PRODUCT_GROUP, PRODUCT_GROUP_LINK.
relationship between tables is
PRODUCT_GROUP (one-to-many) PRODUCT_GROUP_LINK (many-to-one) PRODUCT
Problem is,
I can not add a new record to the PRODUCT_GROUP_LINK table with ADF :(
If I use "Create" button for Iterator "ProductGroupLinkCollection",
after "Commit" command ADF automatically try add new PRODUCT_GROUP,
but I need to use existent PRODUCT_GROUP from PRODUCT_GROUP table.
What do you think about this problem?
Thanks.
Hi Arum,
What I would most suggest is reading the ADF Developer's Guide (For Forms/4GL developers, if that describes your background). Before you start creating your web UI, you need to create business components. From your description of this problem, you'll need at least the following:
- An entity object based on PRODUCT_GROUP_LINK (by default, it will be called ProductGroupLink).
- A view object based on that entity object (by default called ProductGroupLinkView).
- A view object based on a query along the lines of "SELECT ID, NAME FROM PRODUCT_GROUP" (say, ProductGroupView)
- A view object based on a query along the lines of "SELECT ID, NAME FROM PRODUCT" (say, ProductView).
- An application module with instances of all three view objects
When you have all that, you'll want to let the user select a row from ProductGroupView and one from ProductView, and use the ID attributes for those rows to create a new row for ProductGroupLinkView. (You could make the ProductGroupLinkView instance a detail of either ProductGroupView or ProductView, which would automatically populate one of the attributes. There's a way to make a VO instance a detail of two others, but IIRC it's a lot more trouble than just populating the other attribute manually.) That will have the effect of adding an existing product to an existing product group.
But check out the ADF developer's guide first. There's also a very good book, by Peter Koletzke and Duncan Mills, called "Oracle JDeveloper 10g for Forms Developers", that is very useful if you're not very familiar with business components.
Best,
Avrom
Similar Messages
-
How to add a container object in a station globals
Hi,
How to add a container object in a station globalsHi radlou,
This might be what you're looking for:
NewSubProperty Method
Syntax
PropertyObject.NewSubProperty ( lookupString, ValueType, asArray, typeNameParam, options)
Purpose
Creates a new subproperty with the name the lookupString parameter specifies.
Parameters
lookupString As String
[In] Pass the lookup string for the new subproperty to be created. If you pass a lookup string with multiple levels (such as "x.y.z"), this method creates all of the necessary intermediate container objects. Refer to lookup string for more information about the strings you can use.
ValueType As PropertyValueTypes
[In] Pass the type of value you want the new subproperty to store.
asArray As Boolean
[In] Pass True to make the new subproperty an array whose elements are of the type you specify in valueType.
typeNameParam As String
[In] Pass the name of an existing type if you want to create the new subproperty as an instance of a named type. Otherwise, pass an empty string. If you pass a type name, you must pass PropValType_NamedType for the ValueType parameter. Refer to NamedPropertyTypes for a list of built-in named types.
options As Long
[In] Pass 0 to specify the default behavior, or pass one or more PropertyOptions constants. Use the bitwise-OR operator to specify multiple options. You do not need to pass the InsertIfMissing option to create the new subproperty. Pass DoNothingIfExists if you want the method to not report an error if the subproperty already exists. -
How to add services for object in ECC6.0
Hi everybody,
Can anybody tell me how to add "Services for Object" icon in ECC 6.0 because this icon is there in 4.6C but not coming in ECC 6.0.
Thanks in AdvanceHi Saurabh,
Thanks for your reply. I have checked the path given by you...System-> Service for object, but it is showing no service available as told by you. Cud you please tell me how to add this service because this is working fine in 4.6C but I dont know how to add these services in ECC 6.0. If any code for this which is written in 4.6C which I can refer... please tell me where to see the code for adding services (in 4.6C) b'coz its very urgent. -
How to add a ChartOfAccounts object into the database.
how to add a ChartOfAccounts object into the database. please shows sample code
thanksDim CoA As SAPbobsCOM.ChartOfAccounts
CoA = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oChartOfAccounts)
CoA.Code = 11223344
CoA.ExternalCode = "a1234"
CoA.ForeignName = "f Test Account"
CoA.Name = "Test Account"
CoA.AccountType = SAPbobsCOM.BoAccountTypes.at_Other
CoA.ActiveAccount = SAPbobsCOM.BoYesNoEnum.tYES
CoA.FatherAccountKey = 100001
If CoA.Add <> 0 Then
MessageBox.Show(oCompany.GetLastErrorDescription)
Else
MessageBox.Show("Added Account")
End If
Remember the father account key must be a valid account number in the company where you are trying to add the new account. (The G/L Account code seen in the SBO client) -
How to add a photo from a collection to a book in Lightroom 4.1?
How to add a photo from a collection to a book in Lightroom 4.1?
Save the book, then go back to Library and add the photos there.
-
How to add OLE wordpad objects to a crystal report through VB program
Can we programmatically add OLE wordpad objects to a crystal report XI r 2. through VB.NET or VB6?
And is there a way of treating a database binary/blob field as an ole object in CR?Hi Mohan,
Try it in the Designer first. If it works in the designer then it will work in our SDK's but you'll have to use RAS. So when you post your question to the .NET Development - Crystal Reports Forum be sure to specify what version you are using and anything else as far as versions go.
It may be easier to simply link the OLE Object in the designer, check the help file out on how to.
Thank you
Don -
How to add a field object to group header section in crystal report document?
Hi All, I have got two questions mentioned below, please share your inputs. 1)I want to know whether it is possible to add a field object to header section in crystal report document programmatically? I am using crystal runtime for visual studio. I know that using RAS we can do it, but I want to do it using managed library of crystal runtime. Please suggest. 2) I am doing a POC where I am using RAS (unmanaged library) to manipulated crystal report document. Please see code below: var dbTable = _reportDocument.ReportClientDocument.DatabaseController.Database.Tables[0]; var dbField = dbTable.DataFields.FindField(item.ColumnName, CrystalDecisions.ReportAppServer.DataDefModel.CrFieldDisplayNameTypeEnum.crFieldDisplayNameName, CrystalDecisions.ReportAppServer.DataDefModel.CeLocale.ceLocaleEnglishUS); CrystalDecisions.ReportAppServer.ReportDefModel.FieldObject fieldObject = new CrystalDecisions.ReportAppServer.ReportDefModel.FieldObject(); fieldObject.DataSourceName = dbField.Name; fieldObject.FieldValueType = dbField.Type; var groupHeaderArea = _reportDocument.ReportClientDocument.ReportDefController.ReportDefinition.GroupHeaderArea[0].Sections[i]; _reportDocument.ReportClientDocument.ReportDefController.ReportObjectController.Add(fieldObject, groupHeaderArea); In above code last line throwing exception : "The report field type is not valid." at CrystalDecisions.ReportAppServer.Controllers.ReportObjectControllerClass.Add(ISCRReportObject ReportObject, Section Section, Int32 nIndex) Thanks, Jai
Hi Jaikumar
As per the SCN Rules of engagement, one question per thread please.
Re. your 1st question. Adding a field to a report is considered to be a report creation APIs (RCAPI). Only the RAS SDK has RCAPIs, so you can not use plain jane crystal APIs. For how to with RAS, see the examples here: NET RAS SDK Samples - Business Intelligence (BusinessObjects) - SCN Wiki
Also, consult the Developer Help Files:
Report Application Server .NET SDK Developer Guide
Report Application Server .NET API Guide
Re. your second question, please create a new discussion.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter -
How to add "services for object " in ECC 6.0
Hi Saurabh,
Thanks for your reply. I have checked the path given by you...System-> Service for object, but it is showing no service available as told by you. Cud you please tell me how to add this service because this is working fine in 4.6C but I dont know how to add these services in ECC 6.0. If any code for this which is written in 4.6C which I can refer... please tell me where to see the code for adding services (in 4.6C) b'coz its very urgent.Hi Saurabh,
Thanks for your reply. I have checked the path given by you...System-> Service for object, but it is showing no service available as told by you. Cud you please tell me how to add this service because this is working fine in 4.6C but I dont know how to add these services in ECC 6.0. If any code for this which is written in 4.6C which I can refer... please tell me where to see the code for adding services (in 4.6C) b'coz its very urgent. -
HOW TO ADD NEW HR OBJECTS ????
Hi,
i would like to new objects in HR object selection list,especially for PPOCE.
I donot know how to add new objects in the object selection list.
pls anyone who knows this ,could share your knowledge with me.
tks
theresitaHi Theresita,
All the configuration is in the IMG under Personnel Management > Organizational Management > Hierarchy Framework. You'll want to review all the entries and related documentation, as adding objects to PPOME/PPOCE is not a simple 'one table' process. You may need new evaluation paths to support the views you want to see in the framework, so set these up ahead of time. Parameters to support your configuration are: OM_ARRAYTYPE_DISPLAY; OM_DIS_OBJECTMANAGER; OM_FRAMEWORK_OBJ_NR; OM_FRAM_SCEN_DISPLAY: OM_OBJIM_SCEN_DISPLAY: OM_TABTYPE_DISPLAY. You'll notice once you add these parameters, you can see the technical names of the scenarios you're working with in PPOME/PPOCE.
Good luck,
Sharon -
How to add a javascript object to a library
hi, the only way i manage is to create a subform, add the script object and adding this subform to a custom library. Then this can be used for other people by putting it in the master page and drag the script object to the variables. I wonder if there is another way to do it without using fragments because we use acrobat 7.0. Thanx in advance!
Hello:
You could do the following
1)In the 'Option URL Redirect' section of the Edit Button page set 'Target is a ' to 'URL'
2)For URL Target enter javascript:{if (confirm('Your Question here')) doSubmit('<button name>');}Varad
Edited by: varad acharya on Jul 15, 2009 3:47 PM -
How to add fields in fp03 Extenal Collection agency screen
Hi All,
As per our requirement, I need to add a check box and a date field in FP03 transaction - Extenal collection agency screen. I couldn't find any screen exit,BADI. Any one know how to add these two fields on the screen and save the values in DFKKCOLL and DFKKCOLLH table.
Your answer is highly appreciated.Hello,
I do not know the either user exit or BAdi for FP03. However I can suggest you a work around.
You can add an addl tabstrip in FPE2/FPE2M. This is possible by adding an addl field say 'ZZ' in tables DFKKOP/DFKKCOLL/DFKKCOLLH.
<also pls look into OSS Note 851023>
So when ever an item is submitted to collection agency, this field should be updated.
Hope this helps
Rgds
Rajendra -
How to add elements into Object[][] type of list, in runtime?
I have Object list, ie.
final Object[][] data = {
{"January", new Integer(150) },
{"February", new Integer(500) },
{"March", new Integer(54) },
{"April", new Integer(-50) }
};How can I dynamicly add new elements in it, at the runtime?
Thank you in advance!Do I have to remove 'final' for that, and then add
elements?
No. you can't change an array's size.
You can do this
Object[][] arr = new Object[numRows][numCols];But once you've created it, its size can't change.*
I don't know what you're doing, though, and what actual data you're putting in, but Object[][] holding rows of [String, Integer] is almost certainly a poor data structure. Think about creating a class the represents one "row" here and then create a 1D array of that class.
* Okay, you can kinda sorta effectively "change" the size of second and subsequent dimensions, since a multidimensional array is an array of arrays. I wouldn't recommend it though: int[][] arr = new int[3][2]; // a 3 x 2 rectangular array of int--it's an array of array of int, with 3 "rows", each of which is an array of int with 2 elements.
arr[0] = new int[10]; // now it's a jagged array whose first row has 10 elments instead of 2Here we haven't changed an array's size, just replaced one of its elements, which is also an array, with a new, larger array. -
How to add an existing content database to new Site collection
Hi All,
Can anyone help to figure out how can I add existing content database to a new site collection in SharePoint 2013 foundation.
We have more than 40 site collections under one web application, and only one site collection is returning 404 error. When checked in the central admin to view all site collections, the details on the right side of the site is not visible, and unable
to delete it. The database is not corrupt, as I tried to add the same content database to a new web application, and it works perfectly in a new web app.
As we couldn't find any solution, the only option we thought of was to blow the site collection and create a new one and add the exisiting database, but I am unaware as to how can I add existing database to new create site collection. Can anyone help
me with this please?
Regards,
DJIt's working....
The current database was corrupt I guess, (not sure though). Took old backup file and tested to see if it's working. After the test was successful...
Removed the current database in CA
Delete the current database in SQL server
Restored the working backup file in SQL server
Added the content db in CA
That's it... the site collection is working now...
Regards,
DJ -
How to replace all existed objects when impdp a schame ???
I wrote 2 functions which do expdp and impdp
the impdp funciton is :
create or replace function impdp_schema(fromusr in varchar2,
tousr in varchar2,
dir in varchar2,
dmpfile in varchar2,
logfile in varchar2 default null)
return number as
h1 NUMBER;
job_name varchar2(128);
job_state varchar2(32767);
ret number;
BEGIN
if dir is null or dmpfile is null then
return 1;
end if;
ret := 0;
job_name := 'IMP' || to_char(sysdate, 'yyyymmddhh24miss');
h1 := DBMS_DATAPUMP.OPEN('IMPORT',
'SCHEMA',
NULL,
job_name,
'COMPATIBLE',
DBMS_DATAPUMP.KU$_COMPRESS_METADATA);
DBMS_DATAPUMP.ADD_FILE(h1,
dmpfile,
dir,
null,
DBMS_DATAPUMP.KU$_FILE_TYPE_DUMP_FILE);
if logfile is not null then
DBMS_DATAPUMP.ADD_FILE(h1,
logfile,
dir,
null,
DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE);
end if;
DBMS_DATAPUMP.METADATA_REMAP(h1,
'REMAP_SCHEMA',
UPPER(fromusr),
UPPER(tousr));
DBMS_DATAPUMP.set_parameter(h1, 'TABLE_EXISTS_ACTION', 'REPLACE');
DBMS_DATAPUMP.START_JOB(h1);
dbms_datapump.wait_for_job(h1, job_state);
dbms_datapump.detach(h1);
dbms_output.put_line(job_state);
return ret;
exception
when others then
dbms_output.put_line(SQLERRM);
dbms_datapump.detach(h1);
return 1;
END;------------------------------------
when I test this function, I found some errors :
Master table "SYS"."IMP20100823152536" successfully loaded/unloaded
Starting "SYS"."IMP20100823152536":
Processing object type SCHEMA_EXPORT/USER
ORA-31684: Object type USER:"WIS00001" already exists
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
ORA-31684: Object type SEQUENCE:"WIS00001"."SEQ_ID_WIS_LOG" already exists
ORA-31684: Object type SEQUENCE:"WIS00001"."SEQ_TID_TABLENAME" already exists
ORA-31684: Object type SEQUENCE:"WIS00001"."SEQ_WIS_MASS" already exists
ORA-31684: Object type SEQUENCE:"WIS00001"."SEQ_WITSDELAY_1" already exists
ORA-31684: Object type SEQUENCE:"WIS00001"."SEQ_WITSDELAY_2" already exists
ORA-31684: Object type SEQUENCE:"WIS00001"."SEQ_WITSDELAY_3" already exists
ORA-31684: Object type SEQUENCE:"WIS00001"."SEQ_WITSEDIT" already exists
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "WIS00001"."WITS_98_PIC" 28.28 KB 97 rows
. . imported "WIS00001"."DRAWING_CONTROL" 26.94 KB 218 rows
Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
ORA-31684: Object type PROCEDURE:"WIS00001"."PROC_GETITEM" already exists
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
**Job "SYS"."IMP20100823152536" completed with 9 error(s) at 15:30:12**---------------
how to replace all objects when exist ??? include sequence, table, procedure/function???
</pre>
Edited by: UNISTD on 2010-8-23 上午12:50I love posts without a 4 digit version number. This may well be because of a bug, and as this post is lacking a 4 digit version number, nobody will be able to answer it.
You posted in vain.
I recommend you search on Metalink whether there are issues with this parameter.
Sybrand Bakker
Senior Oracle DBA -
How to add list of objects of class to the cookie in java
Hi all ,
I have arraylist of the object of clases like
List<CLASSNAME> sampleList = new arrayList<CLASSNAME>;where CLASSNAME contains getter,setters of fields
How can I add this sampleList to the cookies because cookie only contain cookie name and cookie value which is string only.
public void createNewCookie(String cookieName, String cookieValue, int cookieMaxAge){
HttpServletResponse httpServletResponse = (HttpServletResponse)FacesContext.getCurrentInstance().getExternalContext().getResponse();
Cookie cookie = new Cookie(cookieName, cookieValue);
cookie.setMaxAge(cookieMaxAge);
httpServletResponse.addCookie(cookie);
public String getCookie(String cookieName){
FacesContext vFacesContext = FacesContext.getCurrentInstance();
ExternalContext vExternalContext = vFacesContext.getExternalContext();
Map vRequestCookieMap = vExternalContext.getRequestCookieMap();
Cookie vMyCookie = (Cookie)vRequestCookieMap.get(cookieName);
if(vMyCookie != null)
return vMyCookie.getValue();
else
return null;
Hi Timo,
My requirement is as follow.
When anonymous user visit the website he can add the list of items he checked to buy .Add these items to list.
When any user logged in assign this list to the that logged in user.When user logged out clear this list.
So i think I have to put this list in the SessionScope it will be the best.
But what about anonymous users . When many anonymous users visit the websites can they have different list according to the anonymous user in session scope
Maybe you are looking for
-
My iCal calendars no longer sync adn I can't re-publish them
I have several calendars created in my iCal for staffing schedules, from which I keep and maintain my staff shifts. The Mac the staff uses (I have a separate machine in my office) is subscribed to each of these calendars (one for each staff member) i
-
Need Help & Urgent Response --Menus
Hi, I am facing problem in manipulating menu (PL/SQL-code). Wanted to... 1. I ve specific entities assigend specific users 2. On the basis of specific login user replacing the menu 3. Using GLOBAL variables transfering user id to calling forms Proble
-
Standard C++ Libraries Out of Range
My InDesign PlugIn runs ok when built under VS2005 but when built under VS2008 I get an assertion "Standard C++ Libraries Out of Range" when calling into SnapshotUtilsEx::Draw(). Since the Readme.txt recommends building with VS2005, I believe this to
-
Hi, I have implemented my own UICommand as described in https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/kmc/implementing flexible ui one-step-screenflow.article. The purpose of the command is to create a link in km t
-
Client blocks after a crash while registering for change notification
Hi, I just moved this message from the Jdbc forum as being of more general interest, not limited to any Java client. I got a client crash since the JVM was short of heap space (the involved application was inserting data). Then I run the application