How to use programmatic VO objects in creating a Tree in ADF Page.
Hi,
I have two programmatic VOs namely Plan and Model. Even though functionally there is a Master/Detail (Plan --> Model) relationship between them, we are not creating any View Link as they are programmatic VOs. Requirement is to show this master/detail data as tree in the ADF page. Any pointer on how to achieve this?
Thanks
Edited by: user766455 on Jan 3, 2012 10:34 AM
My question is not related Traversing Tree... my question is how to create Tree in the ADF page using programmatic VOs, which don't have master and details View Link.
Similar Messages
-
How to Use Transient View Objects to Store Session-level Global Variables
hi
Please consider section "40.8.5 How to Use Transient View Objects to Store Session-level Global Variables"
at http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/bcstatemgmt.htm#ADFFD19610
Based on this documentation I created the example application
at http://www.consideringred.com/files/oracle/2010/ProgrammaticalViewObjectAndRollbackApp-v0.01.zip
It behaves as show in the screencast at http://screencast.com/t/qDvSQCgpvYdd
Its Application Module has a Transient View Object instance "MyEmployeesContextVOVI", as master for the child View Object instance "EmpInCtxJobVI".
On rollback the Transient View Object instance keeps its row and attribute values.
Also when passivation and activation is forced (using jbo.ampool.doampooling=false ) the Transient View Object instance seems to keep its row and attribute values.
questions:
- (q1) Why does the expression #{bindings.MyEmployeesContextVOVIIterator.dataControl.transactionDirty} evaluate as true when a Transient View Object instance attribute value is changed (as shown in screencast at http://screencast.com/t/qDvSQCgpvYdd )?
- (q2) What would be a robust approach to make a Transient View Object instance more self-contained, and manage itself to have only one single row (per instance) at all times (and as such removing the dependency on the Application Module prepareSession() as documented in "5. Create an empty row in the view object when a new user begins using the application module.")?
many thanks
Jan VerveckenThanks for your reply Frank.
q1) Does sample 90 help ? http://blogs.oracle.com/smuenchadf/examples/
Yes, the sample from Steve Muench does help, "90. Avoiding Dirtying the ADF Model Transaction When Transient Attributes are Set [10.1.3] "
at http://blogs.oracle.com/smuenchadf/examples/#90
It does point out a difference in marking transactions dirty by different layers of the framework, "... When any attribute's value is changed through an ADFM binding, the ADFM-layer transaction is marked as dirty. ...".
This can be illustrate with a small change in the example application
at http://www.consideringred.com/files/oracle/2010/ProgrammaticalViewObjectAndRollbackApp-v0.02.zip
It now shows the result of both these expressions on the page ...
#{bindings.MyEmployeesContextVOVIIterator.dataControl.transactionDirty}
#{bindings.MyEmployeesContextVOVIIterator.dataControl.dataProvider.transaction.dirty}... where one can be true and the other false respectively.
See also the screencast at http://screencast.com/t/k8vgNqdKgD
Similar to the sample from Steve Muench, another modification to the example application introduces MyCustomADFBCDataControl
at http://www.consideringred.com/files/oracle/2010/ProgrammaticalViewObjectAndRollbackApp-v0.03.zip
public class MyCustomADFBCDataControl
extends JUApplication
@Override
public void setTransactionModified()
ApplicationModule vApplicationModule = (ApplicationModule)getDataProvider();
Transaction vTransaction = vApplicationModule.getTransaction();
if (vTransaction.isDirty())
super.setTransactionModified();
}Resulting in what seems to be more consistent/expected transaction (dirty) information,
see also the screencast at http://screencast.com/t/756yCs1L1
Any feedback on why the ADF Model layer is so eager to mark a transaction dirty is always welcome.
Currently, question (q2) remains.
regards
Jan -
What is the use for lock object and how to use the lock objects
Hi Guru's,
I am new to ABAP .Can you please clarify the that what is the use of lock object and how to use the loct object .what is use of the Deque & Enque function modules .hi ,
below are some minfo about lock objects :
Lock Objects
These types of objects are used for locking the access to database records in table. This mechanism is used to enforce data integrity that is two users cannot update the same data at the same time. With lock objects you can lock table-field or whole table.
In a system where many users can access the same data, it becomes necessary to control the access to the data. In R/3 system this access control is built-in on database tables. Developers can also lock objects over table records.
To lock an object you need to call standard functions, which are automatically generated while defining the lock object in ABAP/4 dictionary. This locking system is independent of the locking mechanism used by the R/3 system. This mechanism also defines LUW i.e. Logical Unit of Work. Whenever an object is locked, either by in built locking mechanism or by function modules, it creates corresponding entry in global system table i.e. table is locked. The system automatically releases the lock at the end of transaction. The LUW starts when a lock entry is created in the system table and ends when the lock is released.
Creating Lock Objects
Lock object is an aggregated dictionary object and can be defined by using the following steps:
o From initial data dictionary screen, enter the name for the object, Click Lock object radiobutton and then click on Create. The system displays a dialog box for Maintain Lock Objects screen
o Enter short text as usual and the name for primary table.
-Save
-Select Tables option
From this screen you can:
Select secondary tables, if any, linked by foreign key relationship.
Fields for the lock objects. This option allows you to select fields for objects (R/3 system allows locking up to record level). Lock object argument are not selected by user but are imposed by the system and includes all the primary keys for the table.
1) Exclusive lock: The locked data can only be displayed or edited by a single user. A request for another exclusive lock or for a shared lock is rejected.
2) Shared lock: More than one user can access the locked data at the same time in display mode. A request for another shared lock is accepted, even if it comes from another user. An exclusive lock is rejected.
3) Exclusive but not cumulative: Exclusive locks can be requested several times from the same transaction and are processed successively. In contrast, exclusive but not cumulative locks can be called only once from the same transaction. All other lock requests are rejected.
Also, last but not the least, locking the object is logical (locking with any enqueue ) .so, you have to use the lock object while trying to access from second program .
reward if helpful ,
Regards,
Ranjita -
I am unable to use services for objects while creating a PO
Hi All,
I am unable to use services for objects while creating a PO ie in me21n / Me22n .
Our client wants to attach some doucument along with the PO, we want to use services for object for this. I use this services for objects in admin level , but unable to use this at user level.
System gives the following message
No service available
Message no. SGOS_MSG002
Regards
GsgHi,
Refer the following OSS notes 552127, 598073
For getting Object for services icon in ME21N and ME51N refer OSS note 913251 -
I'm trying to learn how to use Xcode. I've create a simple Hide App app from a youtube video tut, but I can't get it to export with the icon I've chosen. Any clues why?
We didn't do that video. Why are you asking here?
Those videos are usually outdated....
Use the current tools etc., in the iOS Dev Center and iTunes/iTunes U ~ Stanford. -
How to use same view as editable and read only in ADF
Hi,
how to use same view as editable and read only in ADF ?? How can we achieve this in TF's ???
-mrudulHi,
Steven Davelaar wrote a presentation about this "Building Highly Reusable Taskflows"
Starting slide 14 is where your use case comes into play
Frank -
How to use C:when test... inside column in ADF table
I am using ADF table with below two columns
in First column i have to check the Type of document if it is doc type then i have to use commondlink to download that file ,Otherwise i need to show only text.
for that i added
*<c:when test="{boolean($favoriteType eq 'doc')}">*
which is not working .
please let me know how to use <C:when test... inside column in ADF table
<tr:column sortProperty="favoriteName" sortable="true"
headerText="#{res['favorite.favoritename']}"
width="500" noWrap="false">
<c:choose>
*<c:when test="{boolean($favoriteType eq 'doc')}">*
<tr:commandLink actionListener="#{bindings.downloadFile.execute}"
text="#{row.favoriteName}"
disabled="#{!bindings.downloadFile.enabled}"/>
</c:when>
<c:otherwise>
<af:outputText value="#{row.favoriteName}"/>
</c:otherwise>
</c:choose>
</tr:column>
<tr:column sortProperty="favoriteType" sortable="true"
headerText="#{res['favorite.favoriteType']}" rendered="true">
<af:outputText value="#{row.favoriteType}" id="favoriteType"/>
</tr:column>Hi Frank,
Thanks it is working like cham..
related to same page i am facing new problem which i posted at below thread
How to get row data runtime @ trinidad table , set rowSelection="multiple"
can u reply on same.
Thanks for all help.
Jaydeep -
How to upload a file into a db blob column from adf page
How to upload a file into a db blob column from adf page
Which option to use ?The forum search would be my first try...
Then google...
This has been asked at least once a week and got correct answers...
Timo -
How to use ZMATERIAL info object attribute in existing report
Hi all,
Using generic extraction we have created data source related that data source we have created navigational attribute for
info object ZMATERIAL. Data available for ZMATERIAL info objects. Now ZMATERIAL info object related navigational attribute
want to use in existing report.
For eg. Already sales report developed in that 0MATERIAL only using now i required to use ZMATERIAL also in that report
My requirment is ZMATERIAL related navigational attribute want to use in exisiting report, how to do that? kindly guide me.
ThanksGoto CMOD
Enter the projname
select component
click on display
--seelct the Fm EXIT_SAPLRSAP_002
-- double click on include program to insert your code double click on ZXRSAU02
Enter your code below
CASE i_datasource.
Sample code ...
WHEN '0MATERIAL_ATTR'.
LOOP AT i_t_data INTO lt_mara.
l_tabix = sy-tabix.
SELECT SINGLE ZCOMP ZSUPP ZPUBL ZIMPR ZFORM ZSUBJ ZSDET ZAUTH ZREDT ZPUDT ZADAT
INTO (lt_mara-zcomp, lt_mara-zsupp, lt_mara-zpubl,
lt_mara-zimpr, lt_mara-zsubj, lt_mara-zsdet,
lt_mara-zauth, lt_mara-zpudt, lt_mara-zADAT)
FROM mara
WHERE matnr = lt_mara-matnr.
Endloop.
Regards
KP -
Using SQL view object to create ADF table
Hi,
I have created a column called "Month" (which extracts month from the date column) and another column to count the no. of requests.
i want to create an ADF table with 2 columns, a column showing the month and another is showing the no. of requests for that month.
However, now I only managed to achieve the ADF table to show the overall total requests, which means if i add up all the requests for all the months and i get 500
My ADF table shows this:
Jan: 500
Feb: 500
Mar: 500
How should I create the view or what should I do to make it such that the no. of request is based on the month?
Please advice.
Thanks (:Hi,
For the given situation you can create a Query Based View Object with the following query
SELECT
COUNT(TEMP1.DT) REQUEST,
TO_CHAR(TEMP1.DT, 'Mon') MONTH
FROM
TEMP1
GROUP BY
TO_CHAR(TEMP1.DT, 'Mon')
where DT is the date column and temp1 is the name of the database table.
Following are the steps that i followed to get this query :
i have taken the following sample table :
create table temp1
(srno number primary key,
dt date)
*Note you may use any existing column instead of srno or use dt only (i took an extra column as u know we need a primary key /row id)
the following is the sample data
insert into temp1 values (1,sysdate);
insert into temp1 values (2,sysdate);
insert into temp1 values (3,add_months(sysdate,1));
insert into temp1 values (4,add_months(sysdate,1));
insert into temp1 values (5,add_months(sysdate,3));
insert into temp1 values (6,add_months(sysdate,5));
the table appears as follows
SRNO DT
1 22-JUN-12
2 22-JUN-12
3 22-JUL-12
4 22-JUL-12
5 22-SEP-12
6 22-NOV-12
To start with ADF View Object Creation (Using Jdeveloper 11.1.2):
Create the view object using Create View Object wizard
In Step 1. Name window
set the value for Name : Viewab (you can use any of ur choice)
In the data source section : select query
In Step 2. Query window
a. Click Query builder (it will pop up sql statment window)
b. In the SQL Statement window
in quick-pick objects section -> select temp1 table -> shuttle the columns from available list to selected list
in select clause section -> select srno column from select list-> choose count() function from function drop down list -> insert function -> set alias to REQUEST-> click validate
now select dt column from select list -> choose to_char() function -> click insert function -> alter the function to to_Char(temp1.DT,'Mon') -> set alias to Month -> click validate
in the group by clause section -> Click the green symbol to add -> from the expression palette insert dt column -> insert the to_char function -> alter the function to to_char(temp1.DT,'Mon') -> click validate
in the Entire SQL Query section -> click test query -> in the test query window -> click query result-> you will see the result -> click close -> click ok
Click next
Step 3: Bind Variables
Click Next
Step 4: Attribute Mappings
click Finish
So the view object is ready :) -
How to use CRM authorization object.
Hi All,
I have a specific requirement to restrict user while he/she tries to save a record. It appears that if that restrictions are implemented the save logic for an entity has to be changed because there are some validation regarding relationship management in SAP system. SO I need to bypass that validation to allow some users of specific(Marketting) role to save the entity record bypassing that validation. here I am planning to use the CRM authorization objects. But dont know how to use these and which authorization object to refer.
Please let me know if you guys have any idea.
Regards,
Bikramjit.Hi Bikramjit.,
You might need to create a Custom authorization object and then use it. Else you can create one Z table and maintain the User ID of all users. The mainatin one field with flag and set it to X for the user that are aloowed to save the transaction.
Also once you maintain the table, generate the table maintenance so that it becomes easier for future use.
Hope this helps -
How to use a Graphics Object in a JSP?
Hello, I do not know if this is a good or a silly question. Can anyone tell me if we can use a Graphics object in a JSP. For example to draw a line or other graphics, i am planning to use the JSP. Any help is much appreciated.
Regards,
Navin Pathuru.Hi Rob or Jennifer, could you pour some light here.
I have not done a lot of research for this, but what i want to do is below the polygon i would like to display another image object like a chart... is it possible? If so how to do it? Any help is much appreciated.
here is the code:
<%
// Create image
int width=200, height=200;
BufferedImage image = new BufferedImage(width,
height, BufferedImage.TYPE_INT_RGB);
// Get drawing context
Graphics g = image.getGraphics();
// Fill background
g.setColor(Color.white);
g.fillRect(0, 0, width, height);
// Create random polygon
Polygon poly = new Polygon();
Random random = new Random();
for (int i=0; i < 5; i++) {
poly.addPoint(random.nextInt(width),
random.nextInt(height));
// Fill polygon
g.setColor(Color.cyan);
g.fillPolygon(poly);
// Dispose context
g.dispose();
// Send back image
ServletOutputStream sos = response.getOutputStream();
JPEGImageEncoder encoder =
JPEGCodec.createJPEGEncoder(sos);
encoder.encode(image);
%>
Regards,
Navin Pathuru -
I am working on a Project Server 2013 workflow. I am creating this using Sharepoint Designer 2013. In this workflow I am using approval process at one stage. I have created a security group SalesManagers in PWA. I want to use this group for workflow approval
process. I want all users of this group get approval tasks.
For this I used START A TASK PROCESS activity in the SP Designer. I clicked on
this user and created task process. But here I could not find SalesManager group which I created in PWA. I was only able to find the users. I can also see
Administrators for PWA . But couldnot find SalesManager or any other security group created in pwa.
Can anyone suggest how I can get the security group created in pwa.NBDevelopment,
I believe SPD only recognizes the SharePoint Groups and not the project server security groups.
The Administrators for PWA, and few other groups like Project Managers for PWA etc., are synced SharePoint Groups with the security groups, which is why they show up in SPD.
You could create a SharePoint Group for the Sales Managers group and use that in SPD.
Cheers,
Prasanna Adavi, Project MVP
Blog:
Podcast:
Twitter:
LinkedIn:
-
How to use methods when objects stored in a linked list?
Hi friend:
I stored a series of objects of certain class inside a linked list. When I get one of them out of the list, I want to use the instance method associated with this object. However, the complier only allow me to treat this object as general object, ( of Object Class), as a result I can't use instance methods which are associated with this object. Can someone tell me how to use the methods associated with the objects which are stored inside a linked list?
Here is my code:
import java.util.*;
public class QueueW
LinkedList qList;
public QueueW(Collection s) //Constructor of QuequW Class
qList = new LinkedList(s); //Declare an object linked list
public void addWaiting(WaitingList w)
boolean result = qList.isEmpty(); //true if list contains no elements
if (result)
qList.addFirst(w);
else
qList.add(w);
public int printCid()
Object d = qList.getFirst(); // the complier doesn't allow me to treat d as a object of waitingList class
int n = d.getCid(); // so I use "Object d"
return n; // yet object can't use getCid() method, so I got error in "int n = d.getCid()"
public void removeWaiting(WaitingList w)
qList.removeFirst();
class WaitingList
int cusmNo;
String cusmName;
int cid;
private static int id_count = 0;
/* constructor */
public WaitingList(int c, String cN)
cusmNo = c;
cusmName = cN;
cid = ++id_count;
public int getCid() //this is the method I want to use
return cid;Use casting. In other words, cat the object taken from the collection to the correct type and call your method.
HashMap map = /* ... */;
map.put(someKey, myObject);
((MyClass)(map.get(someKey)).myMethod();Chuck -
How to use a Web Service after creating the reference
I created a Web Service reference and APEX 3.1 and it recognizes it.
The WS has a list of customers. The XML file (WS result) has XSD then the customers data.
The only thing I can do inside APEX is to create a form based on WS with a field that has a dump of the WS result.
I do not know how to use the XML data in the WS to show the customers data in APEX.
I appreciate it, if you can point me to any article or documentation taht show to consume WS in APEX
Thanks
MoJason
My post above does not make sense because the browser converted the "lt" and "gt" that I saw in the form when I copied and paste to < and > as it should do.
below I will attach the XSD
<?xml version = "1.0" encoding="UTF-8" standalone="yes"?>
<VFPDataSet>
<xsd:schema id="VFPDataSet" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="VFPDataSet" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="curCustomers" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="customerid">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="5"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="companyname">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="40"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="contactname" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="30"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="contacttitle" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="30"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="address" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="city" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="15"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="region" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="15"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="postalcode" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="10"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="country" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="15"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="phone" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="24"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="fax" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="24"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:choice>
<xsd:anyAttribute namespace="http://www.w3.org/XML/1998/namespace" processContents="lax"/>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Maybe you are looking for
-
Ad Hoc distribution under Enterprise license
Hi, I have a customer who's workforce has a 1,000 iPads and is interested in distributing their publications either Ad-Hoc or through Internal Distribution, without going through the Apple Store. Are there any issues, limitations using the Enterprise
-
My website is no longer working. I use it for ordering online caricatures, and need it up as soon as possible. I do not remember if I have done anything to cause this or if maybe something else. Please help me. I did check and I am current and up to
-
Hello, I am writing a program that requires me to read large files into memory. Since the JVM has a heap limitation, I am setting the max memory with the -Xmx"number"m command line command. I then create an exe wuing JBuilder. For some reason, I can'
-
Photoshop CC crashes when I try to print
I have photoshop CC and everytime I try to print it crashes.. Help?!
-
SPAU issues with: Without Modification Assistant: No versions found
Hi, We have upgraded from SAP 4.7 to SAP ECC 6 with Unicode. After the upgradation we have started working with SPAU objects. Currently I am working on SPAU: Without Modification Assistant. I have gone though some docs in those they have asked to com