Retrieve child line selected a tree table
Hi all
I have a tree table which includes two levels and one of the data in the column of the child node has a command link. Clicking on it calls a support bean method that tries to get the line that contains the command link that was clicked. The problem is, trying to get the line clicked (selected), it always returns the row parent of the node. I searched and followed by some examples of code, but it does not work for me.
For example, if the table tree looks like, where X expands to show the children X 1 and X 2 lines:
X
L X 1
L X 2
Then clicking on the link to X 1 or X 2 will call code that returns the line for X.
Here is the code in my grain of support:
public void viewInspectionRecord(ActionEvent actionEvent) { RowKeySet rks = treeTable.getSelectedRowKeys(); Iterator rksIterator = rks.iterator(); if (rksIterator.hasNext()){ List key = (List) rksIterator.next(); JUCtrlHierBinding treeTableBinding = (JUCtrlHierBinding) ((CollectionModel) treeTable.getValue()).getWrappedData(); JUCtrlHierNodeBinding nodeBinding = treeTableBinding.findNodeByKeyPath(key); Row rowData = nodeBinding.getRow(); if (rowData == null) { FacesMessage facesMessage = new FacesMessage("Please select an Inspection Record record to view details"); FacesContext.getCurrentInstance().addMessage(null, facesMessage); return; } Object irId = rowData.getAttribute("QarsInspectionRecordId"); ... }
rowData.getAttribute("QarsInspectionRecordId") eventually throw a NullPointerException because it is an attribute defined with the parent node and any children.
Any ideas what's happening?
Thank you
Bill
Hello
see this hope, it will help you to get the line selected on your link, click
http://oracleadf-Java.blogspot.in/2013/08/tree-table-component-with-declarative.html
If you use treeTable selection listener then see.
http://oracleadf-Java.blogspot.in/2012/11/tree-table-component-in-Oracle.html
Tags: Java
Similar Questions
-
No default line selected in af:table
Hello
I don't need no line selected default differance on the rendering of the original of an af:table with a unique selection enabled.
The reason is that the af: table has an associated selection listener. If a line is selected by default, the user cannot select the line again to perform an action on this subject.
I don't want to.
Is there a way to make a table with no rows selected by default?having an affair at the table in the bean managed... with getter and Setter... and in the Get accessor, make it like
RicheTableau tableBidding;
public richeTableau getTableBinding() {}
If (tableBinding! = null) {}
tableBinding.getSelectedRowKeys () .clear ();
}
tableBinding return;
} -
How to validate at least one line selected on the table?
Hello world
I have a requirement here to display a list of customers at a table "select unique" and a button to send the page. When the user clicks this button, I need to validate if there is a selected line in the table. What is the best approach tho do?
I tried to validate it on actionListener in the click of a button, but even if I put adfFaces messages running, it does not appear on the screen and the page is still subject.
Is the BPM 11 g context of the project, so I have to do this validation and 'Cancel' the submit, otherwise the data passes through the flow until the next activity.
Maybe the real question is: how to undo a page submit during an actionListener?
Thank youHello
Small correction to Vinod, tableBinidng.getSeelctedRowKeys () always returns non-null (returns empty set when nothing is selected), then use the tableBinidng.getSeelctedRowKeys () .getSize () to check if a line is selected or not (0-nothing selected).
If you do not want to treat the action up to save if an option is selected, why don't you try disable the button until something is selected in the table?
To disable a button when no rows selected, simply add after the disabled property of a button value update it based on the table (add partialTriggers to the table)
Jean Lou
-
line selected in the table in jdev11
I have listener custom selection for table to do things according to the selected line, but when the table has a single row of this line is automatically selected my interlocutor of choice is not triggered, so my question is how to accomplish that, initially, no row is selected in the table?Depends on the use case, but you can do this by deleting the attribute selectedRowKeys of the table.
Pedja
-
Line layout selection/evidence code table of the adf
Hi all
I use Jdev12c and you want to programmatically select a row in a table. It's the line should be highlighted and the graph of the child should also be updated to the selected line. If I can get one of these features that is also sufficient.
I have DCIteratorBinding instance for the table, but do not receive good method/how to get there. The size of table is 20.
Thank you!
viewObject.setCurrentRow (row); did not work for me it turns that I greeted the multipleSelection on the table and this is the main reason for which even after refresh of the VO of the selection of some random lines in the main table is not removed even if detail table/chart refreshes to display the data corresponding to the first line of the main table.
So I removed the selection of the main table (using following code) gives me the very view that when the page is loaded first time (i.e. no line selected in the child master and graph/table table were given corresponding to the first row in the main table).
UIComponent component = JSFUtils.findComponentInRoot (tableId); If (component instanceof richeTableau) {} Table richeTableau = component (richeTableau); Set of rows RowKeySet = table.getSelectedRowKeys (); rowSet.clear (); System.out.println ("removed from the line selection table:" + tableId); -
Restore the value of the selected line in the editable Table.
Hello, I use Jdeveloper 11.1.2.1.0.
My problem is:
1. Select a line in the editable table.
2. change the value inside elements of the af:inputText of columns.
3. tap on restore.
4. the values of the selected line remains the same.
If I select another line, before the restore, the restore will work as expected.
I want to when you press the button cancel the values of the selected row to be rollback-ed as well.Set the immediate on all the inputTextFields in the table and it worked.
Thank you.
-
How can I find levels of knot / depth of recursive tree table?
Guys,
With the help of Studio Edition Version 11.1.1.3.0.
After 2-3 days of banging my head against the screen, I'm ready to ask for help. I confess: I'm a noob and can't find a way to get the node level / depth of a treeTable. I've not seen mentioned in the forums or in one of the examples of treeTable on different blogs. Google, the praise of God, I was missed as well.
I tried in my Parent-> children-> tree table Recursive Child (the child of references view object):
(1) EL expressions (my EL sucks) in a text output in the node. Hoping that something like #{node. HierTypeBinding.Parent.etc.}, would produce a kind of valuable info I could handle.
(2) setting the value of a managed bean node, but do not know how to get the currently rendered node. I can only figure out how to get the node currently selected, which is only useful after the table has already been made.
(3) level creating a transitional field called in the child view object and setting its equal to level sound + 1 ViewRowImpl, but if the child has many parents, I get incorrect calculations. I have the most away with this, but finally gave up. To access the feature through ViewLinks works great to browse children lines, but by train to get parent node is disconcerting if you have several parents.
(4) the two saying "Please!" and various metaphors of four colorful letters. Not had much effect.
Any kind of branch or help would be great.
Thanks guys,.
Will beBased on the Employees table in the HR schema, a link is defined between the employee-id and the id manager.
When an instance of the view that above is used as table (recursive) tree, I am able to find the depth of the node.Example code:
JSPX code fragment:
selectionListener = "#{bindings." Employees.treeModel.makeCurrent}.
rowSelection = "single" id = "tt1".
styleClass = "AFStretchWidth" >
*
ID = "ot3" / >
PageDef:
Can you have the same card in your scenario and see if you can get the depth of a node?
Thank you
Nini -
Accelerate the selection * of a table
Hi all
OS: RHEL
DB: 11 gR 2
Is it possible that we can accelerate the selection * of a table?
Kind regards
$phinx19 wrote:
Hi all
OS: RHEL
DB: 11 gR 2
Is it possible that we can accelerate the selection * of a table?
Kind regards
# If it is everything you write, you get a full table scan independently of all the indexes that exist on this table:
SQL > create table (yazflutt)
snorm number 2.
3 gleezle varchar2 (40),
date of Halloween 4,
Number 5 art);
Table created.
SQL >
SQL > start
2 for i in 1.10000 loop
3. insert into yazflutt
4 values (i, 'pourles yinko' |) I |'! (', sysdate - I, i);
5 end of loop;
6
7 validation;
8 end;
9.
PL/SQL procedure successfully completed.
SQL >
SQL > set autotrace on
SQL >
SQL > select * from yazflutt;
SNORM GLEEZLE HALLOWEEN ART
---------- ---------------------------------------- --------- ----------
yinko 567 567 pourles! 15 APRIL 14 567
yinko 568 568 pourles! 14 APRIL 14 568
...
9982 yinko 9982 pourles! 5 JULY 88 9982
9983 pourles yinko 9983! 4 JULY 88 9983
9984 yinko 9984 pourles! 3 JULY 88 9984
9985 pourles yinko 9985! 2 JULY 88 9985
9986 yinko 9986 pourles! 1 JULY 88 9986
9987 yinko 9987 pourles! 30 JUNE 88 9987
9988 yinko 9988 pourles! 29 JUNE 88 9988
SNORM GLEEZLE HALLOWEEN ART
---------- ---------------------------------------- --------- ----------
9989 yinko 9989 pourles! 9989 JUNE 28, 88
yinko 9990 9990 pourles! JUNE 27 88 9990
9991 yinko 9991 pourles! 9991 26 JUNE 88
9992 yinko 9992 pourles! 25 JUNE 88 9992
9993 yinko 9993 pourles! 9993 JUNE 24, 88
9994 yinko 9994 pourles! 23 JUNE 88 9994
9995 pourles yinko 9995! 9995 22 JUNE 88
yinko 9996 9996 pourles! JUNE 21 88 9996
9997 yinko 9997 pourles! 20 JUNE 88 9997
9998 pourles yinko 9998! 9998 19 JUNE 88
yinko 9999 9999 pourles! 18 JUNE 88 9999
SNORM GLEEZLE HALLOWEEN ART
---------- ---------------------------------------- --------- ----------
10000 pourles 10000 yinko! JUNE 17, 88 10000
10000 selected lines.
Execution plan
----------------------------------------------------------
Hash value of plan: 2573332187
------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 10000 | 556K | 10 (10) | 00:00:01 |
| 1. TABLE ACCESS FULL | YAZFLUTT | 10000 | 556K | 10 (10) | 00:00:01 |
------------------------------------------------------------------------------
Note
-----
-the dynamic statistics used: dynamic sampling (level = 2)
Statistics
----------------------------------------------------------
9 recursive calls
0 db block Gets
795 consistent gets
0 physical reads
0 redo size
488545 bytes sent via SQL * Net to client
7877 bytes received via SQL * Net from client
668 SQL * Net back and forth to and from the client
0 sorts (memory)
0 sorts (disk)
10000 rows processed
SQL >
SQL > set autotrace off
SQL >
SQL > create index yazflutt_idx1 on yazflutt (snorm);
The index is created.
SQL >
SQL > create index yazflutt_idx2 on yazflutt (gleezle);
The index is created.
SQL >
SQL > create index yazflutt_idx3 on yazflutt (hopple);
The index is created.
SQL >
SQL > create index yazflutt_idx4 on yazflutt (art);
The index is created.
SQL >
SQL > exec dbms_stats.gather_table_stats (user, 'YAZFLUTT',-online true waterfall, estimate_percent-online null)
PL/SQL procedure successfully completed.
SQL >
SQL > set autotrace on
SQL >
SQL > select * from yazflutt;
SNORM GLEEZLE HALLOWEEN ART
---------- ---------------------------------------- --------- ----------
yinko 567 567 pourles! 15 APRIL 14 567
yinko 568 568 pourles! 14 APRIL 14 568
yinko 569 569 pourles! APRIL 13, 14 569
...
9983 pourles yinko 9983! 4 JULY 88 9983
9984 yinko 9984 pourles! 3 JULY 88 9984
9985 pourles yinko 9985! 2 JULY 88 9985
9986 yinko 9986 pourles! 1 JULY 88 9986
9987 yinko 9987 pourles! 30 JUNE 88 9987
9988 yinko 9988 pourles! 29 JUNE 88 9988
SNORM GLEEZLE HALLOWEEN ART
---------- ---------------------------------------- --------- ----------
9989 yinko 9989 pourles! 9989 JUNE 28, 88
yinko 9990 9990 pourles! JUNE 27 88 9990
9991 yinko 9991 pourles! 9991 26 JUNE 88
9992 yinko 9992 pourles! 25 JUNE 88 9992
9993 yinko 9993 pourles! 9993 JUNE 24, 88
9994 yinko 9994 pourles! 23 JUNE 88 9994
9995 pourles yinko 9995! 9995 22 JUNE 88
yinko 9996 9996 pourles! JUNE 21 88 9996
9997 yinko 9997 pourles! 20 JUNE 88 9997
9998 pourles yinko 9998! 9998 19 JUNE 88
yinko 9999 9999 pourles! 18 JUNE 88 9999
SNORM GLEEZLE HALLOWEEN ART
---------- ---------------------------------------- --------- ----------
10000 pourles 10000 yinko! JUNE 17, 88 10000
10000 selected lines.
Execution plan
----------------------------------------------------------
Hash value of plan: 2573332187
------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 10000 | 341K | 10 (10) | 00:00:01 |
| 1. TABLE ACCESS FULL | YAZFLUTT | 10000 | 341K | 10 (10) | 00:00:01 |
------------------------------------------------------------------------------
Statistics
----------------------------------------------------------
1 recursive calls
0 db block Gets
725 consistent gets
0 physical reads
0 redo size
488545 bytes sent via SQL * Net to client
7877 bytes received via SQL * Net from client
668 SQL * Net back and forth to and from the client
0 sorts (memory)
0 sorts (disk)
10000 rows processed
SQL >
SQL > set autotrace off
SQL >
Whatever the index in place a ' select * ' makes a full table scan, period. Unless you can optimize your storage space, memory, or even use version 11.2 laters results cache and there is not a lot you can do.
David Fitzjarrell
-
Lines left in the table LT after removal of the direct workspace and the removal of all workspaces
I had a lot of data in a table enabled version that has been modified in some workspaces. The LIVE workspace, I deleted all the rows in the table and I then drove back the workspaces (yes I probably should have done differently). Once workspaces have been cancelled table LT empty, I would have expected, but it wasn't.
I can reproduce this in the example below. I insert two lines in the test table and allow it to version. In a workspace I update a row in the table, which leads to 3 ranks in LT as expected. Live, I delete the two lines of the table that translates into 5 lines of LT which is fine. So I restore and delete the workspace I created for the update. At this point, nothing should versioned LT lines, so I expect to go, but two lines remain. In my real-world scenario, it is initially questions as the table LT is now much more it must be and requests on the versioned table are slow.
Is this expected behavior? Can I do anything to clean?
Thank you
John
scott@JOHNOT> select * from v$version; BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production PL/SQL Release 11.2.0.4.0 - Production CORE 11.2.0.4.0 Production TNS for 64-bit Windows: Version 11.2.0.4.0 - Production NLSRTL Version 11.2.0.4.0 - Production scott@JOHNOT> create table test_wm_table ( 2 id number primary key, 3 name varchar2(20)); Table created. scott@JOHNOT> execute dbms_wm.enableVersioning('test_wm_table'); PL/SQL procedure successfully completed. scott@JOHNOT> insert into test_wm_table (id, name) values (1, 'first value'); 1 row created. scott@JOHNOT> insert into test_wm_table (id, name) values (2, 'second value'); 1 row created. scott@JOHNOT> commit; Commit complete. scott@JOHNOT> select * from test_wm_table_lt; ID NAME VERSION NEXTVER DELSTATUS LTLOCK ---------- -------------------- ---------- ---------- ---------- ------------------------ 1 first value 0 -1 10 *-1,-9,-1*$#SCOTT$# 2 second value 0 -1 10 *-1,-9,-1*$#SCOTT$# scott@JOHNOT> execute dbms_wm.createWorkspace('test_workspace'); PL/SQL procedure successfully completed. scott@JOHNOT> execute dbms_wm.goToWorkspace('test_workspace'); PL/SQL procedure successfully completed. scott@JOHNOT> update test_wm_table set name = 'something else' where id = 1; 1 row updated. scott@JOHNOT> commit; Commit complete. scott@JOHNOT> select * from test_wm_table_lt; ID NAME VERSION NEXTVER DELSTATUS LTLOCK ---------- -------------------- ---------- ---------- ---------- ------------------------ 1 first value 0 ,45, 10 *-1,-9,-1*$#SCOTT$# 2 second value 0 -1 10 *-1,-9,-1*$#SCOTT$# 1 something else 45 -1 11 *0,10,0*$#SCOTT$# scott@JOHNOT> execute dbms_wm.gotoworkspace('LIVE'); PL/SQL procedure successfully completed. scott@JOHNOT> delete test_wm_table; 2 rows deleted. scott@JOHNOT> commit; Commit complete. scott@JOHNOT> select * from test_wm_table order by id; no rows selected scott@JOHNOT> select * from test_wm_table_lt order by id; ID NAME VERSION NEXTVER DELSTATUS LTLOCK ---------- -------------------- ---------- ---------- ---------- ------------------------ 1 first value 0 ,44,45, 10 *-1,-9,-1*$#SCOTT$# 1 something else 45 -1 11 *0,10,0*$#SCOTT$# 1 first value 44 -1 -11 *-1,-9,0*$#SCOTT$# 2 second value 44 -1 -11 *-1,-9,0*$#SCOTT$# 2 second value 0 ,44, 10 *-1,-9,-1*$#SCOTT$# scott@JOHNOT> execute dbms_wm.rollbackWorkspace('test_workspace'); PL/SQL procedure successfully completed. scott@JOHNOT> execute dbms_wm.removeWorkspace('test_workspace'); PL/SQL procedure successfully completed. scott@JOHNOT> select * from test_wm_table order by id; no rows selected scott@JOHNOT> select * from test_wm_table_lt order by id; ID NAME VERSION NEXTVER DELSTATUS LTLOCK ---------- -------------------- ---------- ---------- ---------- ------------------------ 1 first value 0 -1 -11 *-1,-9,0*$#SCOTT$# 2 second value 0 -1 -11 *-1,-9,0*$#SCOTT$#
Post edited by: John OToole
OK, I see.
Options (depending on the structure of your current workspace if it is not as simple as in the example) are rollback, purgetable or compressworkspace.
More information on when and how to use them can be found in this thread: https://community.oracle.com/message/4027735#4027735
Rollback works in your example, certainly, but might not be applicable in a real scenario.
Hope that helps.
Kind regards
Andreas
-
ADF tree-table using the single object view
Hi all
I'm pretty new (in fact, quite new) to the development of the ADF so bear with me here.
I use JDev version 11.1.1.7.0
My question is this: -.
I have a single table, with a single entity object and view read-only of the object, metaphorically, sitting on it. This table contains attributes such as Type of system, Application name, content of the Message, etc. It is used as a repository of audit trail for many applications in our field.
Now what I want to do is create a style tree-table menu to allow the user to select a system Type (is there a lot of them) and cross the names of applications that are related to the type of system selected. Getting the granularity I'm not further than the name of the Application. When a user clicks on the Type system or a given Application name, the ADF array element that I have on my page .jspx should perform a partial page refresh to filter results accordingly.
That's what I'm thinking the tree-table to look like:-l' user must be able to expand and collapse the nodes as needed.
Type of <>
< A system >
< A.1 application name >
< A.2 application name >
< A.3 application name >
< B > system
< application B.1 name >
< name B.2 of the application >
< system C >
< name C.1 of the application >
etc...
I did some research and I'm not sure I'm able to do what I ask with a single view object. Many articles and tutorials I've read up to now focus on the view of the objects that contain the link relationships with one or more display objects. This obviously creates a relationship master / detail that is easily available for the course I guess...?
Any help would be greatly appreciated.
Thank you
JimBob
No, you probably can't perform this operation with VO alone (because you do not have a recursive structure if I understood your sample).
You'll need VO to 'Types of system' (as the root of the tree), VO for the 'systems' (logged on 'Types of system' VO with ViewLink) and VO for 'Requests' (connected on 'Systems' VO of ViewLink).
Dario
-
How to view the details of the employee in line selection POPup
Hi I need I show EmployeeDetails in the af with a table query pane
After the search for details used in the Table, I'll choose a rank I have the detals, then I want to show employee details in a POP how I can do...
Thank you
Delphine
Hi reda
This requirement, you can use custom selection for af:table listener and who, after having invoked default selectionListener, open a popup that contains details of employees
If the iterator for table and popup is same then it will show automatically data selected line
See how to open popup on table selection
Thank you
-
Expand all the nodes in a tree table
Hello
I have a tree table in my JSPX, which needs to expand all its nodes when the page is loaded. Also mis the data control is a POJO data contrl where I have a collection (ArrayList), which serves to make this table from the tree. Tree table is displayed as expected with it of the child nodes.
I was referring rare item such as these... https://blogs.oracle.com/jdevotnharvest/entry/how_to_programmatically_disclose_a to expand all nodes. But I get an exception of cast of class on the piece of code following
Code:
CollectionModel model = (CollectionModel) your_af_tree_reference.getValue();
Exception:
javax.faces.el.EvaluationException: java.lang.ClassCastException: oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel cannot be cast to oracle.adf.view.rich.model.CollectionModel at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
......................
I use Jdev 11.1.1.4
Let me know if you need more details to achieve this please.
Refer to this:
You can download the sample code from:
http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/index-101235.html
Search for number 078.
-
Get the first line selected on the CommandButton Click
Hi guys,.
My version of jdev is 11.1.1.5.0. I have table on my Page of Adf.< af:table value = "#{bindings." MyvwVO1.collectionModel}.
var = "row" rows = "#{bindings." MyvwVO1.rangeSize}.
emptyText = "#{bindings." MyvwVO1.viewable? "{'No data to display.': 'Access Denied.'}".
filterModel = "#{bindings." MyvwVO1.queryDescriptor}.
queryListener = ' #{bindings. " MyvwVO1.processQuery}.
filterVisible = "true" varStatus = 'vs' rowBandingInterval = '1 '.
columnSelection = 'single '.
Summary = "Table of suppliers.
selectionListener = "#{bindings." MyvwVO1.collectionModel.makeCurrent}.
rowSelection = "single" id = "t2".
"partialTriggers =": soc1: ctb2: cb22.
fetchSize = "#{bindings." MyvwVO1.rangeSize}.
Binding = "#{MyBN.supplierTableBinding}" >
< af:column id = "c14" frozen = "true" align = "center" >
< af:commandButton action = "viewNext" text = "Next view" id = "cb1" >
< af:setActionListener from = "#{bindings." CurrSupplierSiteId.inputValue}.
to = "#{bindings." SupplierSiteID.inputValue} "/ >"
< af:setActionListener from = "#{bindings." CurrSupplierSiteId.inputValue}.
to = "#{MyBN.supplier_site_id}" / >
< / af:commandButton >
< / af:column >
When I'm clicking viewNext button. When debugging, I get first line provider site Id instead of the current line selected.I also removed the selectedRowKeys of af: table. Now his show is not first line select default, but still get the Site Id of first line supplier back Bean.
{} public void setSupplier_site_id (number supplier_site_id)
This.supplier_site_id = supplier_site_id;
}
public {getSupplier_site_id() number
Return supplier_site_id;
}
No idea what I'm doing wrong.
Thank youRaul
you pass line value.right... so from value as link will not be work.try send as #{row.abc.value} go on setactionListener and so on. You pass the rank value.
-
Select local (tmp) Table in function->; Table not found
Hello
I want to create a cursor that selects from a Table that does not exist in the database.
I have create this table in local table (what is that called? nested table?).
Not shown in the code but I want to fill this local array later.
After completing my cursor is going to use this full table.
When trying to launch I get the error Table or view does not exist in the 'FROM T1 TempTab_var;"my slider.
This is my simplified code:
CREATE OR REPLACE FUNCTION PC_RL_MTA_PMT RETURN PC_RL_MTA_TYPE_PMT IS result_out PC_RL_MTA_TYPE_PMT; TYPE TempTab_record_type IS RECORD (ID int); TYPE TempTab_type IS TABLE OF TempTab_record_type INDEX BY BINARY_INTEGER; TempTab_var TempTab_type; CURSOR TempCursor3_var IS SELECT ID AS ID_var FROM TempTab_var T1; BEGIN RETURN result_out; END PC_RL_MTA_PMT;
Any ideas what is wrong?
Thank you very much in advance.
And another example of my library of examples, just for you troubleshoot...
SQL > CREATE or REPLACE TYPE AS OBJECT num_descript (num number, descript varchar2 (30))
2.Type of creation.
SQL > CREATE or REPLACE TYPE tbl_num_descript AS TABLE OF THE num_descript
2.Type of creation.
SQL > CREATE or REPLACE PACKAGE AS-reftest
2 FUNCTION pipedata (number p_choice) tbl_num_descript RETURN PIPELINED;
3 END;
4.Package created.
SQL > CREATE or REPLACE PACKAGE BODY AS-reftest
2 FUNCTION pipedata (number p_choice) tbl_num_descript RETURN PIPELINED IS
3 v_obj num_descript: = num_descript (NULL, NULL);
4 v_rc sys_refcursor;
5 BEGIN
6. IF p_choice = 1 THEN
7 v_rc OPEN to SELECT empno as num, ename like descript FROM emp;
8 ELSIF p_choice = 2 THEN
9 OPEN v_rc to SELECT deptno as num, dname as descript OF THE Department;
10 END IF;
11 LOOP
12 FETCH v_rc INTO v_obj.num, v_obj.descript;
EXIT 13 WHEN v_rc % NOTFOUND;
14 PIPE ROW (v_obj);
15 END LOOP;
16 v_rc NARROW;
RETURN 17;
18 END;
END 19;
20.Package body created.
SQL > select * from table (reftest.pipedata (1));
DESCRIPT NUM
---------- ------------------------------
7369 SMITH
7499 ALLEN
7521 WARD
7566 JONES
7654 MARTIN
7698 BLAKE
7782 CLARK
7788 SCOTT
KING 7839
7844 TURNER
7876 ADAMS
JAMES 7900
7902 FORD
7934 MILLER14 selected lines.
SQL > select * from table (reftest.pipedata (2));
DESCRIPT NUM
---------- ------------------------------
10 ACCOUNTING
SEARCH 20
30 SALES
40 OPERATIONS -
Hi all...
I have a question where I am able to retrieve the line in TOAD
but when I try to do the same by creating VOS and pass parameters using setWhereClauseParams()
I'm able to run the original Version, but the number of rows is 0...
any kind of help is appreciated...
the request for my VO's
SELECT NVL (WB. VEHICLE_NO, 0) VEH_NO
OF WAYBILL_TBL WB.
SER SERVICE_MASTER_TBL
WHERE WB. SERVICE_ID = SER. SERVICE_ID
AND THE WORLD BANK. DEPOT_CODE = SERVICE. DEPOT_CODE
AND THE WORLD BANK. VEHICLE_NO =: 1
AND THE WORLD BANK. SERVICE_DATE =: 2
the code in my controller is
OAViewObject vo = (OAViewObject) am.findViewObject ("PopUpFieldsDataLOVVO1");
vo.setWhereClauseParams (null);
vo.setWhereClause (null);
System.out.println ("vehicle_number" + vehicle_no);
System.out.println ("service_date" + service_date);
vo.setWhereClauseParam(0,vehicle_no);
vo.setWhereClauseParam(1,service_date);
vo.getQuery ();
int rowcount = vo.getRowCount ();
System.out.println ("No.of.Rows.returned" + RowCount);
Here, I get rowcount 0
I checked the values that are passed to the VO by using SOP even they do not work properly...
can someone help me out here.
Thanks in advance
DEV
Hi Marc
I did as you suggested the date format is the same in both contexts...
Problem is solved by rebooting the system and then to deploy again...
Thanks and greetings...
DEV
Maybe you are looking for
-
Decommissioning: Yosemite will work after restoring the Capitan of TM data?
I need to downgrade back Capitan in Yosemite, too many applications do not work with Capitan - including iMovie. Since I'm on Capitan for about 2 months, the restoration of data from Time Machine will include the Capitan OSX app So my question: These
-
Satellite A135-S4727 - L button does not work
The L key on my computer laptop Satellite A135-S4727 Ref. PSADOU-ONFOOP does not work, please help. Thank you
-
chnFind - to find the value of chnnel
Hi all According to DIadem help, SMC determines first index specifies the channel line, the second index specifies the channel by the channel name or the number of the channel. for example: ChnFind ("Ch (2) > 300", 250) line worth > 300 250 searches
-
Can't see LabVIEW Color Picker (assessment 2014 for Mac)
Hi all I'm new to LabVIEW and tries to make a graph I did appear transparent. According to http://forums.ni.com/t5/LabVIEW/Using-LabView-s-Color-Picker/m-p/575619/highlight/true#M269839, the color picker is available as one of the digital controls,
-
How can I burn on Myspace to my Media Player?
I want to record a song from Myspace that I can't buy to my windows media player.