Tree with dissimilar objects
I need an ADF tree for a hierarchical folder structure with objects of different types at the leaf level. I have a self referential table for the folder structure and tables for other leaf level objects with foreign key to folder. I was thinking of populating an ADF CoreTree programatically with several views for the folder and other objects. Is there a better way?
Pranab
Shay, thanks for the quick reply
That is exactly what I have done.
However my problem lies in the structure of objects.
eg. Country has a States Iterator and 5 other attributes.
I have to display these 5 attributes as leaf nodes and the States as the next level.
+Country*
<ul><li>Attribute 1 Label - Value</li>
<li>Attribute 2 Label - Value</li>
<li>Attribute 3 Label - Value</li>
<li>Attribute 4 Label - Value</li>
<li>Attribute 5 Label - Value</li>
<li>+ States
<ul><li>Attribute 11 Label - Value</li>
<li>Attribute 12 Label - Value</li>
</ul>
</li>
</ul>
Through the tree binding editor if I select all "Available attributes" to "Display attributes" then I get them all in one level
+Country Attribute 1 Value Attribute 2 Value Attribute 3 Value Attribute 4 Value Attribute 5 Value*
I need to display them as leaf nodes
Any idea how this can be done ??
Similar Messages
-
How to build a BIG TREE with Tree-Form layout
Hi,
I do have a self-referenced table with our org structure - 15 000 positions.
I do want to create a tree with this structure.
Requirements :
a, to have a tree-form layout
b, to have search capabilities
I have tried to use several combinations (maybe all)
- from using only one View object and create recursive tree - doesn't even run
- to use two View objects, first as top level nodes, the other as the rest - it runs
but I can search only top level, and what is worse, by clicking on the node for showing additional information (tree-form layout) I'm waiting for ages for seeing the info
(it seems that all records are loaded one by one into AS)
Could you provide some ideas how to deal with this ?
Thanks.I am sorry, this is beyond the scope of this forum.
As with any functionality not directly provided by JHeadstart, you can build it yourself using the ADF design time tools in JDeveloper. Please use the JDeveloper forum for help on this first step.
Then, to keep your pages generatable you can move these customizations to custom templates. We are happy to help you with this last step, should you have problems there.
Steven Davelaar,
JHeadstart Team. -
To populate a tree with httpService
Hi,
i don't arrive to populate my tree with an httpService.
Here is the code
<mx:Tree width="30%" height="100%" id="arboChambre"
labelField="@name"
dataProvider="{restree.lastResult.chambres.type}"
labelFunction="displayNodeName" />
and the script in <mx:Script>
private function displayNodeName( item:Object ) : String {
var node:XML = XML(item);
return node.@name;}
the xml returned by httpservice
<?xml version='1.0' encoding='utf-8' ?>
<chambres>
<type name="standart">
<chambre name="chambre1"/>
<chambre name="chambre2"/>
<chambre name="chambre3"/>
<chambre name="chambre4"/>
<chambre name="chambre5"/>
</type>
<type name="superieur junior">
<chambre name="chambre9"/>
<chambre name="chambre10"/>
</type>
</chambres>
And in my application i see only five icons files but not
directory and not name of the files (or directory ....)
Can you say me where is my mystake.Thank for your answers and sorry for my english
here is my httpservice definition in my file.mxml
quote:
<mx:HTTPService id="restree" url="
http://lesite.com/index.php"
useProxy="false" method="POST" >
<mx:request xmlns="">
<action>
getTree
</action>
</mx:request>
</mx:HTTPService>
If i don't want to use lasResult , i think that i must call
the data in AS3 but it's difficult for me to understand the
documentation in english ;I tried to use URLLoader but when i
compile i have a lot of mistake.
is it the good way to use URLLoader in <mx:script>???
thank you -
Problem when expanding Tree - Tree with nested table column
Hi, i have created the tree using the Tree with nested table column.
I have created a node called TREE_ROOT in the context.
This node has few attributes which includes children_loaded, is_leaf, is_expanded.
I have created the recursive node TREE_SUB for the above node TREE_ROOT.
In the view, i have created the table with the master column. The above attributes have been mapped accordingly. I have created the action handler for load_children.
In this action handler method, i receive the context_element correctly. In this method, i determine the children of the selected element and the resulting children are attached to this context_element.
But the problem is: when i add elements to context_elements in the method load_children, these
elements get added to the node TREE_ROOT as well.
Please help.
thanks and best regards,
PramodI just use some types defined in this user... Well, I hope you know what is the type definition of d_period_sec,
don't you ? I didn't ask to provide all types existed now, only types you are
using.
Anyhow you have been granted with execute privilege for types you are using:
SQL> conn tau_tll/tau_tll;
Connected.
SQL> create or replace type d_period_sec as object (date# date);
2 /
Type created.
SQL> grant execute on d_period_sec to public with grant option;
Grant succeeded.
SQL> conn scott/tiger
Connected.
SQL> CREATE OR REPLACE TYPE unit_function AS OBJECT (
2 xi NUMBER,
3 yi NUMBER,
4 xe NUMBER,
5 ye NUMBER,
6 xm NUMBER,
7 ym NUMBER,
8 v NUMBER,
9 a NUMBER,
10 f NUMBER,
11 descr VARCHAR2 (20)
12 );
13 /
Type created.
SQL> grant execute on unit_function to master;
Grant succeeded.
SQL> CREATE OR REPLACE TYPE unit_moving_point AS OBJECT
2 (
3 p tau_tll.d_period_sec, -- from user TAU_TLL
4
5 m unit_function
6 )
7 /
Type created.
SQL> grant execute on unit_moving_point to master;
Grant succeeded.
SQL> CREATE OR REPLACE TYPE moving_point_tab AS TABLE OF unit_moving_point;
2 /
Type created.
SQL> grant execute on moving_point_tab to master;
Grant succeeded.
SQL> CREATE OR REPLACE TYPE moving_point AS OBJECT (u_tab moving_point_tab);
2 /
Type created.
SQL> grant execute on moving_point to master;
Grant succeeded.
SQL> conn master/master
Connected.
SQL> CREATE TABLE MPOINTS (
2 id NUMBER,
3 mpoint scott.Moving_Point)
4 NESTED TABLE mpoint.u_tab store as moving_tab;
Table created.Rgds. -
Filling a tree with the result of calls to a document/wrapped soap1.1 webservice
Hi,
I'm having trouble with filling a tree with the result to
calls to a document/wrapped soap 1.1 webservice.
I first declared the webservice in the mxml file as it was in
the examples and tried to call it with no luck. The fault was it
wasn't finding the document type for the call's unique parameter. I
figured out the solution to this, I added a method in the
webservice declaration having a single element named the same as
the required parameter, and inside it, the "actual" parameters,
bound to variables defined elsewhere.
The reason for wanting the tree to be filled programatically,
is the potential whole contents of the tree can be about 1.000.000
nodes. Huge.
quote:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" applicationComplete="initM()">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.controls.treeClasses.TreeListData;
[Bindable] public var aParentId:String = null;
[Bindable] public var aLevel:Number = 0;
]]>
</mx:Script>
<mx:WebService id="lws" wsdl="
http://myServer/myContext/myPortURI?WSDL"
useProxy="false" makeObjectsBindable="true">
<mx:operation name="getNodes" resultFormat="object">
<mx:request>
<getNodesElement>
<parentId>{aParentId}</parentId>
<level>{aLevel}</level>
</getNodesElement>
</mx:request>
</mx:operation>
</mx:WebService>
<mx:Tree x="0" y="0" width="326" height="100%"
id="layoutTree" enabled="true" labelField="nodeName">
<mx:dataProvider>{lws.getNodes.lastResult}</mx:dataProvider>
</mx:Tree>
<mx:Script>
<![CDATA[
public function initM():void {
lws.getNodes.send();
return;
]]>
</mx:Script>
</mx:Application>
So, here's the problem:
1.- In both Java2 and .NET, I've been able to produce sets of
proxy classes from the webservice wsdl, these include a proxy class
for the service port and a set of classes for both the call
parameter types and the call result types. I have not found yet a
way to do the same with flex2, so I wonder, can I produce the
required classes for dealing with such a webservice in an automatic
way with flex2?
2.- The second problem, is I haven't found a way to make a
webservice call in sychronous mode, and I can't seem to find a way
to set the parameters for the subsequent calls to the webservice.
Is there a way to make a call to such webservice programatically? I
mean, I've been able to make the first call I need programatically,
but what if I end up making 2 or more simultaneous calls? I can't
rely on setting the `variables defined elsewhere` before each call,
because of possible concurrency issues (calls will be long after
the 2nd level of the tree), so I wonder if there's a way to make a
call to such webservice (document/wrapped, soap1.1) passing it the
parameters programatically. If so, can I just put the parameters or
do I have to produce the complete enclosure? If I have to produce
also the enclosure, any hint on how to do so? I will need to pass
different parentId, level pairs probably triggered by tree events.
3.- the other problem, finally, is Tree looks quite different
to me than the Java2 one. In java2, I can easily produce a changing
model for the tree wich will even handle the calls to the
webservice as needed (triggered by the tree itself), making it a
`live model`. If there is a way to produce the same behaviour in
flex2, I haven't found it yet. Sure, I've only downloaded the trial
version yesterday, so I may have overlooked some docs or blogs.
Any hints would be appreciated, specially on programatically
modifying the tree, and making calls to the webservice changing the
parameters every time.I would re-post to the Flex Data Services forum.
-
Can anyone tell me how to Copy a node on an ALV Tree using context menu ?
Hello Vidya
The sample report ZUS_SDN_ALVTREE_CTXMENU demonstrates how to copy nodes on an ALV tree.
Before showing the entire coding I would like to point out a few crucial parts of the coding:
(1) Defintion of OUTTAB list
TYPES: BEGIN OF ty_s_outtab.
INCLUDE TYPE vbak.
TYPES: nkey TYPE lvc_nkey.
TYPES: ntype TYPE lvc_value. " 'VKORG' / 'VTWEG' / 'SPART' / leaf
TYPES: END OF ty_s_outtab.
TYPES: ty_t_outtab TYPE STANDARD TABLE OF ty_s_outtab
WITH DEFAULT KEY.
The OUTTAB list contains two additional fields holding the tree key (LVC_NKEY) and the node type.
(2) The main logic of the report is implemented in event handler method handle_node_ctxmenu_sel.
WHEN 'COPY_SUBTREE'.
CALL METHOD go_alvtree->get_subtree
EXPORTING
i_node_key = node_key
IMPORTING
et_subtree_nodes = lt_subtree.
CALL METHOD go_alvtree->get_parent
EXPORTING
i_node_key = node_key
IMPORTING
e_parent_node_key = ld_parent_key.
LOOP AT lt_subtree INTO ld_node_key.
READ TABLE gt_outtab INTO ls_outtab
WITH KEY nkey = ld_node_key.
APPEND ls_outtab TO lt_outtab.
ENDLOOP.
READ TABLE lt_outtab INTO ls_outtab INDEX 1.
ld_ntype = ls_outtab-ntype.
DELETE lt_outtab WHERE ( vbeln IS INITIAL ). " hierarchy nodes
CASE ld_ntype.
WHEN 'VKORG'.
ld_top_key = ld_parent_key.
WHEN 'VTWEG'.
ld_vkorg_key = ld_parent_key.
WHEN 'SPART'.
ld_vtweg_key = ld_parent_key.
WHEN 'LEAF'.
ld_spart_key = ld_parent_key.
ENDCASE.
" Note: similar logic like in routine CREATE_HIERARCHY
SORT lt_outtab BY vkorg vtweg spart kunnr audat.
LOOP AT lt_outtab INTO ls_outtab.
*& Report ZUS_SDN_ALVTREE_CTXMENU
*& Based on: BCALV_TREE_03
REPORT zus_sdn_alvtree_ctxmenu.
TYPES: BEGIN OF ty_s_outtab.
INCLUDE TYPE vbak.
TYPES: nkey TYPE lvc_nkey.
TYPES: ntype TYPE lvc_value. " 'VKORG' / 'VTWEG' / 'SPART' / leaf
TYPES: END OF ty_s_outtab.
TYPES: ty_t_outtab TYPE STANDARD TABLE OF ty_s_outtab
WITH DEFAULT KEY.
DATA:
gd_repid TYPE syst-repid,
gd_okcode TYPE ui_func,
go_docking TYPE REF TO cl_gui_docking_container,
go_alvtree TYPE REF TO cl_gui_alv_tree.
DATA:
gt_outtab TYPE ty_t_outtab, " Sales Document
gt_fcat TYPE lvc_t_fcat.
* CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
* §2. Define an event handler method to build up a context menu
* (postfix of event name: _CONTEXT_MENU_REQUEST).
* This event is fired each time the user klick with the right
* mouse button on a node.
CLASS-METHODS:
handle_node_ctxmenu_req
FOR EVENT node_context_menu_request OF cl_gui_alv_tree
IMPORTING
node_key
menu,
* §3. Define an event handler method to respond to a function code
* triggered by your menu (postfix: _CONTEXT_MENU_SELECTED).
* This event is fired when the user selects an entry of the
* build up context menu.
handle_node_ctxmenu_sel
FOR EVENT node_context_menu_selected OF cl_gui_alv_tree
IMPORTING
node_key
fcode
sender.
* 'sender' is an implicit event parameter that is provided by
* ABAP Objects runtime system. It contains a reference to the
* object that fired the event. You may directly use it to
* call methods of this instance.
ENDCLASS. "lcl_eventhandler DEFINITION
* CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
* §4. Implement your event handler methods.
METHOD handle_node_ctxmenu_req.
* Event parameter 'menu' holds a reference to the standard context
* menu of ALV Tree (functions 'Expand'/'Collapse' on nodes).
* You may either append your own functions (separated by a line)
* or clear the menu if you do not want to allow standard functions.
* In this case the standard menu is cleared.
CALL METHOD menu->clear.
* The next line defines one line of the context menu.
CALL METHOD menu->add_function
EXPORTING
fcode = 'DEL_SUBTREE'
text = 'Delete Subtree'(901). "Delete Subtree
CALL METHOD menu->add_function
EXPORTING
fcode = 'COPY_SUBTREE'
text = 'Copy Subtree'(902). "Copy Subtree
ENDMETHOD. "handle_node_ctxmenu_req
METHOD handle_node_ctxmenu_sel.
* At this point of execution, the user selected a menu entry of the
* menu build up in event handler method handle_node_cm_req.
* Query your own function codes and react accordingly.
DATA:
l_rc TYPE c,
ld_ntype TYPE lvc_value,
ld_parent_key TYPE lvc_nkey,
ld_node_key TYPE lvc_nkey,
lt_subtree TYPE lvc_t_nkey,
ls_outtab TYPE ty_s_outtab,
ls_last TYPE ty_s_outtab,
lt_outtab TYPE ty_t_outtab.
DATA:
ld_vkorg_key TYPE lvc_nkey,
ld_vtweg_key TYPE lvc_nkey,
ld_spart_key TYPE lvc_nkey,
ld_last_key TYPE lvc_nkey,
ld_top_key TYPE lvc_nkey.
CASE fcode.
WHEN 'DEL_SUBTREE'.
CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
EXPORTING
textline1 = 'Do you really want to delete'(902)
textline2 = 'this node and all its subnodes?'(903)
titel = 'Confirmation'(904)
cancel_display = ' '
IMPORTING
answer = l_rc.
IF l_rc EQ 'J'.
CALL METHOD sender->delete_subtree
EXPORTING
i_node_key = node_key.
* Do not forget to refresh the display when you change the contents
* of your list.
CALL METHOD sender->frontend_update.
ENDIF.
WHEN 'COPY_SUBTREE'.
CALL METHOD go_alvtree->get_subtree
EXPORTING
i_node_key = node_key
IMPORTING
et_subtree_nodes = lt_subtree.
CALL METHOD go_alvtree->get_parent
EXPORTING
i_node_key = node_key
IMPORTING
e_parent_node_key = ld_parent_key.
LOOP AT lt_subtree INTO ld_node_key.
READ TABLE gt_outtab INTO ls_outtab
WITH KEY nkey = ld_node_key.
APPEND ls_outtab TO lt_outtab.
ENDLOOP.
READ TABLE lt_outtab INTO ls_outtab INDEX 1.
ld_ntype = ls_outtab-ntype.
DELETE lt_outtab WHERE ( vbeln IS INITIAL ). " hierarchy nodes
CASE ld_ntype.
WHEN 'VKORG'.
ld_top_key = ld_parent_key.
WHEN 'VTWEG'.
ld_vkorg_key = ld_parent_key.
WHEN 'SPART'.
ld_vtweg_key = ld_parent_key.
WHEN 'LEAF'.
ld_spart_key = ld_parent_key.
ENDCASE.
SORT lt_outtab BY vkorg vtweg spart kunnr audat.
LOOP AT lt_outtab INTO ls_outtab.
IF ( ld_ntype = 'VKORG' ).
" new sales organisation
IF ( ls_outtab-vkorg = ls_last-vkorg ).
ELSE.
PERFORM add_sales_org
USING
ls_outtab
ld_top_key
CHANGING
ld_vkorg_key.
ls_outtab-nkey = ld_vkorg_key.
ls_outtab-ntype = 'VKORG'.
DESCRIBE TABLE gt_outtab. " fill sy-tfill
MODIFY gt_outtab FROM ls_outtab INDEX syst-tfill
TRANSPORTING nkey ntype.
ENDIF.
ENDIF.
IF ( ld_ntype = 'VKORG' OR
ld_ntype = 'VTWEG' ).
" new distribution channel
IF ( ls_outtab-vkorg = ls_last-vkorg AND
ls_outtab-vtweg = ls_last-vtweg ).
ELSE.
PERFORM add_distrib_chan
USING
ls_outtab
ld_vkorg_key
CHANGING
ld_vtweg_key.
ls_outtab-nkey = ld_vtweg_key.
ls_outtab-ntype = 'VTWEG'.
DESCRIBE TABLE gt_outtab. " fill sy-tfill
MODIFY gt_outtab FROM ls_outtab INDEX syst-tfill
TRANSPORTING nkey ntype.
ENDIF.
ENDIF.
IF ( ld_ntype = 'VKORG' OR
ld_ntype = 'VTWEG' OR
ld_ntype = 'SPART' ).
" new channel
IF ( ls_outtab-vkorg = ls_last-vkorg AND
ls_outtab-vtweg = ls_last-vtweg AND
ls_outtab-spart = ls_last-spart ).
ELSE.
PERFORM add_division
USING
ls_outtab
ld_vtweg_key
CHANGING
ld_spart_key.
ls_outtab-nkey = ld_spart_key.
ls_outtab-ntype = 'SPART'.
DESCRIBE TABLE gt_outtab. " fill sy-tfill
MODIFY gt_outtab FROM ls_outtab INDEX syst-tfill
TRANSPORTING nkey ntype.
ENDIF.
ENDIF.
* Leaf:
PERFORM add_complete_line
USING
ls_outtab
ld_spart_key
CHANGING
ld_last_key.
ls_outtab-nkey = ld_last_key.
ls_outtab-ntype = 'LEAF'.
DESCRIBE TABLE gt_outtab. " fill sy-tfill
MODIFY gt_outtab FROM ls_outtab INDEX syst-tfill
TRANSPORTING nkey ntype.
ls_last = ls_outtab.
ENDLOOP.
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING
new_code = 'REFRESH_TREE'
* IMPORTING
* RC =
ENDCASE.
ENDMETHOD. "handle_node_ctxmenu_sel
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
PERFORM init_controls.
* Link the docking container to the target dynpro
gd_repid = syst-repid.
CALL METHOD go_docking->link
EXPORTING
repid = gd_repid
dynnr = '0100'
* CONTAINER =
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL SCREEN '0100'.
* NOTE: no screen elements, ok_code -> gd_okcode
** PROCESS BEFORE OUTPUT.
** MODULE STATUS_0100.
** PROCESS AFTER INPUT.
** MODULE USER_COMMAND_0100.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
TRANSLATE gd_okcode TO UPPER CASE. " facilitate manual entries
CASE gd_okcode.
WHEN 'BACK' OR
'EXIT' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
when 'REFRESH_TREE'.
CALL METHOD go_alvtree->update_calculations
* EXPORTING
* NO_FRONTEND_UPDATE =
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form INIT_CONTROLS
* text
* --> p1 text
* <-- p2 text
FORM init_controls .
DATA:
ls_hierarchy_header TYPE treev_hhdr.
* Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
ratio = 90
EXCEPTIONS
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL METHOD go_docking->set_extension
EXPORTING
extension = 99999 " full-size screen
EXCEPTIONS
cntl_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* create tree control
CREATE OBJECT go_alvtree
EXPORTING
parent = go_docking
node_selection_mode = cl_gui_column_tree=>node_sel_mode_single
item_selection = ' '
no_html_header = 'X'
no_toolbar = ''
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
illegal_node_selection_mode = 5
failed = 6
illegal_column_name = 7.
IF sy-subrc <> 0.
MESSAGE x208(00) WITH 'ERROR'. "#EC NOTEXT
ENDIF.
PERFORM build_hierarchy_header CHANGING ls_hierarchy_header.
* Hide columns and sum up values initially using the fieldcatalog
PERFORM build_fieldcatalog.
* IMPORTANT: Table 'gt_sflight' must be empty. Do not change this table
* (even after this method call). You can change data of your table
* by calling methods of CL_GUI_ALV_TREE.
* Furthermore, the output table 'gt_outtab' must be global and can
* only be used for one ALV Tree Control.
CALL METHOD go_alvtree->set_table_for_first_display
EXPORTING
is_hierarchy_header = ls_hierarchy_header
CHANGING
it_fieldcatalog = gt_fcat
it_outtab = gt_outtab. "table must be empty !
PERFORM init_tree.
ENDFORM. " INIT_CONTROLS
*& Form INIT_TREE
* text
* --> p1 text
* <-- p2 text
FORM init_tree .
PERFORM create_hierarchy.
PERFORM register_events.
* Update calculations which were initially defined by field DO_SUM
* of the fieldcatalog. (see build_fieldcatalog).
CALL METHOD go_alvtree->update_calculations.
* Send data to frontend.
CALL METHOD go_alvtree->frontend_update.
ENDFORM. " INIT_TREE
*& Form build_hierarchy_header
* text
* <--P_LS_HIERARCHY_HEADER text
FORM build_hierarchy_header
CHANGING
cs_hierarchy_header TYPE treev_hhdr.
cs_hierarchy_header-heading =
'SalesOrg/DistChannel/Division'(300).
cs_hierarchy_header-tooltip = 'Customer: Master Sales Data'(400).
cs_hierarchy_header-width = 45.
cs_hierarchy_header-width_pix = ''.
ENDFORM. " build_hierarchy_header
*& Form build_fieldcatalog
* text
* --> p1 text
* <-- p2 text
FORM build_fieldcatalog .
* define local data
DATA:
ls_fcat TYPE lvc_s_fcat.
REFRESH: gt_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
* I_BUFFER_ACTIVE =
i_structure_name = 'VBAK'
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_BYPASSING_BUFFER =
* I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT gt_fcat INTO ls_fcat.
CASE ls_fcat-fieldname.
WHEN 'VBELN' OR
'AUDAT' OR
'AUART' OR
'WAERK' OR
'VKORG' OR
'VTWEG' OR
'SPART' OR
'BSTNK' OR
'KUNNR'.
WHEN 'NETWR'.
ls_fcat-do_sum = 'X'.
ls_fcat-h_ftype = 'SUM'. " or: 'MAX' / 'AVG'
WHEN OTHERS.
ls_fcat-tech = 'X'.
ENDCASE.
MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
ENDLOOP.
ENDFORM. " build_fieldcatalog
*& Form create_hierarchy
* text
* --> p1 text
* <-- p2 text
FORM create_hierarchy .
* define local data
DATA:
ls_outtab TYPE ty_s_outtab,
ls_last TYPE ty_s_outtab,
lt_outtab TYPE ty_t_outtab.
DATA:
ld_vkorg_key TYPE lvc_nkey,
ld_vtweg_key TYPE lvc_nkey,
ld_spart_key TYPE lvc_nkey,
ld_last_key TYPE lvc_nkey,
ld_top_key TYPE lvc_nkey.
" Select data
SELECT * FROM vbak INTO CORRESPONDING FIELDS OF TABLE lt_outtab
UP TO 1550 ROWS.
" sort table according to conceived hierarchy
SORT lt_outtab BY vkorg vtweg spart kunnr audat.
* Define one top node. In this way it is possible to calculate
* values for the whole hierarchy.
CALL METHOD go_alvtree->add_node
EXPORTING
i_relat_node_key = ''
i_relationship = cl_gui_column_tree=>relat_last_child
i_node_text = 'Sales Documents'
IMPORTING
e_new_node_key = ld_top_key.
CLEAR: ls_outtab.
ls_outtab-nkey = ld_top_key.
ls_outtab-ntype = 'ROOT'.
MODIFY gt_outtab FROM ls_outtab INDEX 1
TRANSPORTING nkey ntype.
LOOP AT lt_outtab INTO ls_outtab.
" new sales organisation
IF ( ls_outtab-vkorg = ls_last-vkorg ).
ELSE.
PERFORM add_sales_org
USING
ls_outtab
ld_top_key
CHANGING
ld_vkorg_key.
ls_outtab-nkey = ld_vkorg_key.
ls_outtab-ntype = 'VKORG'.
DESCRIBE TABLE gt_outtab. " fill sy-tfill
MODIFY gt_outtab FROM ls_outtab INDEX syst-tfill
TRANSPORTING nkey ntype.
ENDIF.
" new distribution channel
IF ( ls_outtab-vkorg = ls_last-vkorg AND
ls_outtab-vtweg = ls_last-vtweg ).
ELSE.
PERFORM add_distrib_chan
USING
ls_outtab
ld_vkorg_key
CHANGING
ld_vtweg_key.
ls_outtab-nkey = ld_vtweg_key.
ls_outtab-ntype = 'VTWEG'.
DESCRIBE TABLE gt_outtab. " fill sy-tfill
MODIFY gt_outtab FROM ls_outtab INDEX syst-tfill
TRANSPORTING nkey ntype.
ENDIF.
" new channel
IF ( ls_outtab-vkorg = ls_last-vkorg AND
ls_outtab-vtweg = ls_last-vtweg AND
ls_outtab-spart = ls_last-spart ).
ELSE.
PERFORM add_division
USING
ls_outtab
ld_vtweg_key
CHANGING
ld_spart_key.
ls_outtab-nkey = ld_spart_key.
ls_outtab-ntype = 'SPART'.
DESCRIBE TABLE gt_outtab. " fill sy-tfill
MODIFY gt_outtab FROM ls_outtab INDEX syst-tfill
TRANSPORTING nkey ntype.
ENDIF.
* Leaf:
PERFORM add_complete_line
USING
ls_outtab
ld_spart_key
CHANGING
ld_last_key.
ls_outtab-nkey = ld_last_key.
ls_outtab-ntype = 'LEAF'.
DESCRIBE TABLE gt_outtab. " fill sy-tfill
MODIFY gt_outtab FROM ls_outtab INDEX syst-tfill
TRANSPORTING nkey ntype.
ls_last = ls_outtab.
ENDLOOP.
ENDFORM. " create_hierarchy
*& Form ADD_SALES_ORG
* text
* -->P_LS_OUTTAB text
* -->P_LD_TOP_KEY text
* <--P_LD_VKORG_KEY text
FORM add_sales_org
USING
value(us_outtab) TYPE ty_s_outtab
value(ud_relat_key) TYPE lvc_nkey
CHANGING
cd_node_key TYPE lvc_nkey.
* define local data
DATA:
ld_nodetext TYPE lvc_value,
ls_outtab TYPE ty_s_outtab.
ld_nodetext = us_outtab-vkorg.
" add node
CALL METHOD go_alvtree->add_node
EXPORTING
i_relat_node_key = ud_relat_key
i_relationship = cl_gui_column_tree=>relat_last_child
i_node_text = ld_nodetext
is_outtab_line = ls_outtab
IMPORTING
e_new_node_key = cd_node_key.
ENDFORM. " ADD_SALES_ORG
*& Form add_DISTRIB_CHAN
* text
* -->P_LS_OUTTAB text
* -->P_LD_VKORG_KEY text
* <--P_LD_VTWEG_KEY text
FORM add_distrib_chan
USING
value(us_outtab) TYPE ty_s_outtab
value(ud_relat_key) TYPE lvc_nkey
CHANGING
cd_node_key TYPE lvc_nkey.
* define local data
DATA:
ld_nodetext TYPE lvc_value,
ls_outtab TYPE ty_s_outtab.
ld_nodetext = us_outtab-vtweg.
" add node
CALL METHOD go_alvtree->add_node
EXPORTING
i_relat_node_key = ud_relat_key
i_relationship = cl_gui_column_tree=>relat_last_child
i_node_text = ld_nodetext
is_outtab_line = ls_outtab
IMPORTING
e_new_node_key = cd_node_key.
ENDFORM. " add_DISTRIB_CHAN
*& Form add_division
* text
* -->P_LS_OUTTAB text
* -->P_LD_VTWEG_KEY text
* <--P_LD_SPART_KEY text
FORM add_division
USING
value(us_outtab) TYPE ty_s_outtab
value(ud_relat_key) TYPE lvc_nkey
CHANGING
cd_node_key TYPE lvc_nkey.
* define local data
DATA:
ld_nodetext TYPE lvc_value,
ls_outtab TYPE ty_s_outtab.
ld_nodetext = us_outtab-spart.
" add node
CALL METHOD go_alvtree->add_node
EXPORTING
i_relat_node_key = ud_relat_key
i_relationship = cl_gui_column_tree=>relat_last_child
i_node_text = ld_nodetext
is_outtab_line = ls_outtab
IMPORTING
e_new_node_key = cd_node_key.
ENDFORM. " add_division
*& Form add_complete_line
* text
* -->P_LS_OUTTAB text
* -->P_LD_SPART_KEY text
* <--P_LD_LAST_KEY text
FORM add_complete_line
USING
value(us_outtab) TYPE ty_s_outtab
value(ud_relat_key) TYPE lvc_nkey
CHANGING
cd_node_key TYPE lvc_nkey.
* define local data
DATA:
ld_nodetext TYPE lvc_value,
ls_outtab TYPE ty_s_outtab.
WRITE us_outtab-kunnr TO ld_nodetext+0 NO-ZERO.
WRITE us_outtab-audat TO ld_nodetext+20 DD/MM/YYYY.
CONDENSE ld_nodetext.
" add node
CALL METHOD go_alvtree->add_node
EXPORTING
i_relat_node_key = ud_relat_key
i_relationship = cl_gui_column_tree=>relat_last_child
i_node_text = ld_nodetext
is_outtab_line = us_outtab " !!!
IMPORTING
e_new_node_key = cd_node_key.
ENDFORM. " add_complete_line
*& Form register_events
* text
* --> p1 text
* <-- p2 text
FORM register_events .
DATA:
lt_events TYPE cntl_simple_events,
ls_event TYPE cntl_simple_event.
* The following four tree events registers ALV Tree in the constructor
* method itself.
* - cl_gui_column_tree=>eventid_expand_no_children
* (needed to load data to frontend when a user expands a node)
* - cl_gui_column_tree=>eventid_header_context_men_req
* (needed for header context menu)
* - cl_gui_column_tree=>eventid_header_click
* (allows selection of columns (only when item selection activated))
* - cl_gui_column_tree=>eventid_item_keypress
* (needed for F1-Help (only when item selection activated))
* Nevertheless you have to provide their IDs again if you register
* additional events with SET_REGISTERED_EVENTS (see below).
* To do so, call first method GET_REGISTERED_EVENTS (this way,
* all already registered events remain registered, even your own):
CALL METHOD go_alvtree->get_registered_events
IMPORTING
events = lt_events.
* (If you do not these events will be deregistered!!!).
* You do not have to register events of the toolbar again.
* Register additional events for your own purposes:
* §5. Register first context menu event on frontend (with postfix
* (_REQUEST). The second is registered automatically.
ls_event-eventid = cl_gui_column_tree=>eventid_node_context_menu_req.
APPEND ls_event TO lt_events.
* register events on frontend
CALL METHOD go_alvtree->set_registered_events
EXPORTING
events = lt_events
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
illegal_event_combination = 3.
IF sy-subrc <> 0.
MESSAGE x208(00) WITH 'ERROR'. "#EC NOTEXT
ENDIF.
* §6. Register both context menu events on backend (ABAP Objects
* event handling).
SET HANDLER:
lcl_eventhandler=>handle_node_ctxmenu_req FOR go_alvtree,
lcl_eventhandler=>handle_node_ctxmenu_sel FOR go_alvtree.
ENDFORM. " register_events
Regards,
Uwe -
Af:tree with command link
hi experts,
am using jdeveloper 11g version 11.1.1.5.0 - adfbc components - oracle db 10g.
am trying some examples regards,
af:tree with commandLink,
here what i did:
i achieved the af:tree with the help of some association between two tables and then i exposed in ui,
you can see in this pics1 :
http://www.4shared.com/photo/kGE2M1yl/pics1.html
and then af:tree output can also seen in pics2:
http://www.4shared.com/photo/GQTB9icb/pic2.html
this is the code for af:tree
<af:tree value="#{bindings.ApplBusFunSuiteView1.treeModel}"
var="node"
selectionListener="#{bindings.ApplBusFunSuiteView1.treeModel.makeCurrent}"
rowSelection="single" binding="#{backing_untitled1.t1}"
id="t1">
<f:facet name="nodeStamp">
<af:outputText value="#{node}"
binding="#{backing_untitled1.ot1}" id="ot1"/>
</f:facet>
</af:tree>ok thing which i did all are ok.
but my need is :
you may see in pics2.
http://www.4shared.com/photo/GQTB9icb/pic2.html
i make red mark on the on a child.
here am going to explain my need
in the picture you can see CRM as parent
MKG as first child
MKG3200 as last child.
command link should be appeared.
when i click that it will navigate to the corresponding page.
for eg: if i click MKG3200 navigate to the MKG3200 page.
how can i do this.? i need some guidance.
sorry for my poor english.
Edited by: Erp on Dec 1, 2011 4:34 AMhi am waiting for john
retrieves the page IDhere the author get the node id.
in my task n get the page id and navigate to it. as you said.
http://andrejusb.blogspot.com/search/label/Tree
thanks to andrejus and you(john)
package view.backing;
import java.util.Iterator;
import java.util.List;
import javax.el.ELContext;
import javax.el.ExpressionFactory;
import javax.el.MethodExpression;
import javax.faces.application.Application;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import oracle.adf.controller.TaskFlowId;
import oracle.adf.view.rich.component.rich.RichDocument;
import oracle.adf.view.rich.component.rich.RichForm;
import oracle.adf.view.rich.component.rich.data.RichTree;
import oracle.adf.view.rich.component.rich.fragment.RichRegion;
import oracle.adf.view.rich.component.rich.input.RichInputText;
import oracle.adf.view.rich.component.rich.layout.RichPanelGroupLayout;
import oracle.adf.view.rich.component.rich.layout.RichPanelSplitter;
import oracle.adf.view.rich.component.rich.nav.RichCommandButton;
import oracle.adf.view.rich.component.rich.nav.RichCommandLink;
import oracle.adf.view.rich.component.rich.output.RichMessages;
import oracle.jbo.Row;
import oracle.jbo.uicli.binding.JUCtrlHierBinding;
import oracle.jbo.uicli.binding.JUCtrlHierNodeBinding;
import org.apache.myfaces.trinidad.component.UIXGroup;
import org.apache.myfaces.trinidad.event.AttributeChangeEvent;
import org.apache.myfaces.trinidad.event.SelectionEvent;
import org.apache.myfaces.trinidad.model.CollectionModel;
import org.apache.myfaces.trinidad.model.RowKeySet;
import org.apache.myfaces.trinidad.model.TreeModel;
public class Main1 {
private RichForm f1;
private RichDocument d1;
private RichTree t1;
private RichMessages m1;
private RichCommandLink ot1;
private String taskFlowId = "/WEB-INF/dummy-task-flow-definition.xml#dummy-task-flow-definition";
private RichRegion r1;
private UIXGroup g1;
private RichCommandLink cl1;
private RichPanelSplitter ps1;
private RichPanelGroupLayout pgl1;
private RichInputText it1;
private RichCommandButton cb1;
private String i1;
public void setF1(RichForm f1) {
this.f1 = f1;
public RichForm getF1() {
return f1;
public void setD1(RichDocument d1) {
this.d1 = d1;
public RichDocument getD1() {
return d1;
public void setT1(RichTree t1) {
this.t1 = t1;
public RichTree getT1() {
return t1;
public void setM1(RichMessages m1) {
this.m1 = m1;
public RichMessages getM1() {
return m1;
public void setOt1(RichCommandLink ot1) {
this.ot1 = ot1;
public RichCommandLink getOt1() {
return ot1;
public TaskFlowId getDynamicTaskFlowId() {
return TaskFlowId.parse(taskFlowId);
public void setR1(RichRegion r1) {
this.r1 = r1;
public RichRegion getR1() {
return r1;
public String dynaminflow()
taskFlowId = "/WEB-INF/supplier-task-flow-definition.xml#supplier-task-flow-definition";
return null;
public String mainflow1()
taskFlowId = "/WEB-INF/dummy-task-flow-definition.xml#dummy-task-flow-definition";
return null;
public void setG1(UIXGroup g1) {
this.g1 = g1;
public UIXGroup getG1() {
return g1;
public void setCl1(RichCommandLink cl1) {
this.cl1 = cl1;
public RichCommandLink getCl1() {
return cl1;
public void setPs1(RichPanelSplitter ps1) {
this.ps1 = ps1;
public RichPanelSplitter getPs1() {
return ps1;
public void setPgl1(RichPanelGroupLayout pgl1) {
this.pgl1 = pgl1;
public RichPanelGroupLayout getPgl1() {
return pgl1;
public void setIt1(RichInputText it1) {
this.it1 = it1;
public RichInputText getIt1() {
return it1;
public void setCb1(RichCommandButton cb1) {
this.cb1 = cb1;
public RichCommandButton getCb1() {
return cb1;
public void setI1(String i1) {
this.i1 = i1;
public String getI1() {
return i1;
public String cb1_action() {
// Add event code here...
if(this.getI1().equalsIgnoreCase("SUP1000") ) {
dynaminflow();
else if(this.getI1().equalsIgnoreCase("MAIN1000") ) {
mainflow1();
else{
FacesContext ctx = FacesContext.getCurrentInstance();
FacesMessage fm =
new FacesMessage(FacesMessage.SEVERITY_ERROR, "Page Not found",
ctx.addMessage(null, fm);
return null;
return null;
public void onTreeSelect(SelectionEvent selectionEvent) {
/* //original selection listener set by ADF
//#{bindings.allDepartments.treeModel.makeCurrent}
String adfSelectionListener = "#{bindings.ApplBusFunSuiteView2.treeModel.makeCurrent}";
//make sure the default selection listener functionality is preserved.
//you don't need to do this for multi select trees as the ADF binding
//only supports single current row selection
/* START PRESERVER DEFAULT ADF SELECT BEHAVIOR */
/* FacesContext fctx = FacesContext.getCurrentInstance();
Application application = fctx.getApplication();
ELContext elCtx = fctx.getELContext();
ExpressionFactory exprFactory = application.getExpressionFactory();
MethodExpression me = null;
me = exprFactory.createMethodExpression(elCtx, adfSelectionListener, Object.class, new Class[] { SelectionEvent.class });
me.invoke(elCtx, new Object[] { selectionEvent });
/* END PRESERVER DEFAULT ADF SELECT BEHAVIOR */
// RichTree tree = (RichTree)selectionEvent.getSource();
// TreeModel model = (TreeModel)tree.getValue();
//get selected nodes
// RowKeySet rowKeySet = selectionEvent.getAddedSet();
// Iterator rksIterator = rowKeySet.iterator(); */
//for single select configurations, thi sonly is called once
/* while (rksIterator.hasNext())
List key = (List)rksIterator.next();
JUCtrlHierBinding treeBinding = null;
CollectionModel collectionModel = (CollectionModel)tree.getValue();
treeBinding = (JUCtrlHierBinding)collectionModel.getWrappedData();
JUCtrlHierNodeBinding nodeBinding = treeBinding.findNodeByKeyPath(key);
Row rw = nodeBinding.getRow();
System.out.println(""+nodeBinding.getRow()); */
//print first row attribute. Note that in a tree you have to determine the node
//type if you want to select node attributes by name and not index
/* String rowType = rw.getStructureDef().getDefName();
System.out.println(""+rw.getStructureDef().getDefName());
if(rowType.equalsIgnoreCase("SuplrDocHdView")){
System.out.println("This row is a department: " + rw.getAttribute("SuphdBu"));
else if(rowType.equalsIgnoreCase("EmployeesView")){
System.out.println("This row is an employee: " + rw.getAttribute("EmployeeId"));
else{
System.out.println("Huh ????");
// ... do more usefuls stuff here
RowKeySet selection = this.getT1().getSelectedRowKeys();
if (selection != null && selection.getSize() > 0) {
for (Object facesTreeRowKey : selection) {
this.getT1().setRowKey(facesTreeRowKey);
JUCtrlHierNodeBinding root = (JUCtrlHierNodeBinding) this.getT1().getRowData();
JUCtrlHierNodeBinding node = this.getFirstChild(root);
while (node != null)
System.out.println(node.getRow().getAttribute(0));
if(node.getRow().getAttribute(0).toString().equalsIgnoreCase("APM2010") )
dynaminflow();
else if(node.getRow().getAttribute(0).toString().equalsIgnoreCase("APM2020") ) {
mainflow1();
//node.getRow().remove();
if ( node.getChildren() != null) {
node = this.getFirstChild(node);
} else {
while (this.getNextSibling(node) == null && node != root)
node=node.getParent();
if(node != root) {
node = this.getNextSibling(node);
} else {
node = null;
System.out.println(root.getRow().getAttribute(0));
if(root.getRow().getAttribute(0).toString().equalsIgnoreCase("APM2010") )
dynaminflow();
else if(root.getRow().getAttribute(0).toString().equalsIgnoreCase("APM2020") ) {
mainflow1();
//root.getRow().remove();
private JUCtrlHierNodeBinding getFirstChild(JUCtrlHierNodeBinding node) {
if (node.getChildren() != null) {
return (JUCtrlHierNodeBinding)node.getChildren().get(0);
return null;
private JUCtrlHierNodeBinding getNextSibling(JUCtrlHierNodeBinding node) {
JUCtrlHierNodeBinding parent = node.getParent();
int index = parent.getChildren().indexOf(node);
index = ++index;
if(index < parent.getChildren().size()) {
return (JUCtrlHierNodeBinding)parent.getChildren().get(index);
return null;
}i get my output. what i need.
you must check whether am going correct?
please suggest me.
sorry : pulling this thread to up. -
hi all,
i am having a problem with activeX objects.
my activeX ( Tree View) is wrking fine with windows2000
but when i am trying the same code with XP its saying dll missing.
do these activeX depends on OS also..
plz help me.hey Vishwas!
did you register the .dll?
do you work with vb.net?
which ServicePack do you have in Windows XP?
greetz
Matthias -
Programatically creating ADF Tree with nodes,child nodes & links?
Hi,
Currently I am using Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660. Please provide me detailed code for programatically creating ADF Tree with nodes, child nodes and links in it.
Thanks,
VikYou need to create a model for the tree. ADF has a build in model that you can use to build your own tree.
This is what you need to write in your JSPX:
<af:tree summary="Navigation" id="treeNav" value="#{pageFlowScope.treeNavigationBackingBean.model}"
var="node" contextMenuSelect="true" rowSelection="single" fetchSize="30">
<f:facet name="nodeStamp">
<af:outputText id="txtText" value="#{node.text}"/>
</f:facet>
</af:tree>This is the code to retreive the model:
public TreeModel getModel() {
if(model == null)
model = new ChildPropertyTreeModel(instance,"children");
return model;
}instance contains the actual tree. I build it in the constructor of my managed bean:
public BeanTreeNavigation() {
ArrayList<TreeItem> rootItems = new ArrayList<TreeItem>();
TreeItem node1 = new TreeItem("Root node");
ArrayList<TreeItem> level1 = new ArrayList<TreeItem>();
TreeItem level1Node1 = new TreeItem("Level1 Node1");
level1.add(level1Node1);
node1.setChildren(level1);
rootItems.setChildren(node1);
this.setListInstance(rootItems);
root = rootItems;
public void setListInstance(List instance) {
this.instance = instance;
model = null;
}The TreeItem class is not a default one. I created it myself. You can make of it whatever you want:
public class TreeItem {
private String text;
private List<TreeItem> children = null;
public TreeItem(String text){
this.text = text;
public void setText(String text) {
this.text = text;
public String getText() {
return text;
public void setChildren(List<TreeItem> children) {
this.children = children;
public List<TreeItem> getChildren() {
return children;
}I wrote the TreeItem as an inner class of the managed bean.
The most important part is the getModel methode. There you need to specify an Object and the name of the getter that will return a List of the children.
Hope this helps.
Edited by: Yannick Ongena on Feb 22, 2011 7:30 AM -
Hi,
I'm having trouble with filling a tree with the result to
calls to a document/wrapped soap 1.1 webservice.
I first declared the webservice in the mxml file as it was in
the examples and tried to call it with no luck. The fault was it
wasn't finding the document type for the call's unique parameter. I
figured out the solution to this, I added a method in the
webservice declaration having a single element named the same as
the required parameter, and inside it, the "actual" parameters,
bound to variables defined elsewhere.
The reason for wanting the tree to be filled programatically,
is the potential whole contents of the tree can be about 1.000.000
nodes. Huge.
quote:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" applicationComplete="initM()">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.controls.treeClasses.TreeListData;
[Bindable] public var aParentId:String = null;
[Bindable] public var aLevel:Number = 0;
]]>
</mx:Script>
<mx:WebService id="lws" wsdl="
http://myServer/myContext/myPortURI?WSDL"
useProxy="false" makeObjectsBindable="true">
<mx:operation name="getNodes" resultFormat="object">
<mx:request>
<getNodesElement>
<parentId>{aParentId}</parentId>
<level>{aLevel}</level>
</getNodesElement>
</mx:request>
</mx:operation>
</mx:WebService>
<mx:Tree x="0" y="0" width="326" height="100%"
id="layoutTree" enabled="true" labelField="nodeName">
<mx:dataProvider>{lws.getNodes.lastResult}</mx:dataProvider>
</mx:Tree>
<mx:Script>
<![CDATA[
public function initM():void {
lws.getNodes.send();
return;
]]>
</mx:Script>
</mx:Application>
So, here's the problem:
1.- In both Java2 and .NET, I've been able to produce sets of
proxy classes from the webservice wsdl, these include a proxy class
for the service port and a set of classes for both the call
parameter types and the call result types. I have not found yet a
way to do the same with flex2, so I wonder, can I produce the
required classes for dealing with such a webservice in an automatic
way with flex2?
2.- The second problem, is I haven't found a way to make a
webservice call in sychronous mode, and I can't seem to find a way
to set the parameters for the subsequent calls to the webservice.
Is there a way to make a call to such webservice programatically? I
mean, I've been able to make the first call I need programatically,
but what if I end up making 2 or more simultaneous calls? I can't
rely on setting the `variables defined elsewhere` before each call,
because of possible concurrency issues (calls will be long after
the 2nd level of the tree), so I wonder if there's a way to make a
call to such webservice (document/wrapped, soap1.1) passing it the
parameters programatically. If so, can I just put the parameters or
do I have to produce the complete enclosure? If I have to produce
also the enclosure, any hint on how to do so? I will need to pass
different parentId, level pairs probably triggered by tree events.
3.- the other problem, finally, is Tree looks quite different
to me than the Java2 one. In java2, I can easily produce a changing
model for the tree wich will even handle the calls to the
webservice as needed (triggered by the tree itself), making it a
`live model`. If there is a way to produce the same behaviour in
flex2, I haven't found it yet. Sure, I've only downloaded the trial
version yesterday, so I may have overlooked some docs or blogs.
Any hints would be appreciated, specially on programatically
modifying the tree, and making calls to the webservice changing the
parameters every time.1. Not yet, but we're looking into supporting this in an
upcomming release.
2. All RPC requests must be made asynchronously... this is a
restriction of the way the Flash Player makes network requests
(otherwise movies, which are single threaded, would hang waiting
for results). You should be able to use the ActionScript API to
programmatically call web services with normal parameters.
3. If you leave makeObjectsBindable="true" (which it is by
default) the Objects and Arrays will be wrapped in ObjectProxies
and ArrayCollections automatically and will report change events,
however I don't believe that we have an example that links these
change events up to subsequent web service calls, but it would be
possible (but not automatic). A feature that does do this sort of
thing automatically is the Data Service, although this does not use
WSDL/SOAP to describe/communicate with remote services and you have
to setup a Java assembler to work with our adapters on the
server. -
Performance issue with Business Objects Java JRC API in CRXI R2 version
A report is developed using java JRC API in CR XI release 2. When I generate the report in the designer, it took less than 5 seconds to display the results in crystal report viewer inside the designer. But in the QA environment, when I generate the same report from the application, it takes almost 1 to 1.5 minutes to display the same results in PDF. I also noticed that if the dataset contains bigger volume of data, then the reports are taking even longer almost 15 to 20 minutes.
While generating the report from the application, I noticed that most of time is taken during the execution of the com.crystaldecisions.report.web.viewer.ReportExportControl Object method as shown in following line of code
exportControl.processHttpRequest(request, response, context, null)
We thought the delay in exporting the report to PDF might be the layout of the report and data conversion to PDF for such a bigger volume of data.
Then we investigated the issue and experimented quickly to generate the same report with same result set data from the application using XML, XSL and converted the output XSL-FO to PDF using Apache FOP (Formatting Objects Processor) implementation. The time taken to export the report to PDF is less than 6 seconds. By doing this experiment, it is proved that the issue is not with conversion of data to PDF but it is the performance problem with Business Objects Java JRC API in CR XI R2.
In this regard, I searched for the above issue in the SAP community Network Forums -> Crystal Reports and Xcelsius -> Java Development -> Crystal Reports. But I did not find any answers or solutions for this kind of issue in the forums.
Any suggestion, hint in this matter is very much appreciated.Ted, The setReportAppServer problem is resolved. Now I could able to generate the report with hardcoded values in the SQLs in just 6 seconds where as the same report was generated in CRXI R2 in 1 minute 15 seconds as mentioned in the earlier message.
But, our exisiting application passes the parameter values to the SQLs embedded in the report. For some reason the parameters are not being passed to the report and the report displays only the labels without data.
As per the crj 12 samples codes, the code is written as shown below.
1. Created ReportClient Document
2. SetReportAppServer
3. Open the report
4. Getting DatabaseController and switching the database connection at runtime
5. Then setting the parameters as detailed below
ParameteFields parameterFieldController = reportClientDoc.getDataDefController().getParameterFieldController();
parameterFieldController.setCurrentValue("", "paramname",paramvalue);
parameterFieldController.setCurrentValue("", "paramname",paramavalue);
byteArrayInputStream = (ByteArrayInputStream)reportClientDoc.getPrintOutputController().export(ReportExportFormat.PDF);
6. Streaming the report to the browser
Why the parematers are not being passed to the report? Do I need to follow the order of setting these parameters? Did I miss any line of code for setting Params using crj 12?
Any help in this regard would be greatly appreciated. -
Report with OLE Object Problem (Crystal Report 11)
Post Author: ibertola
CA Forum: General
Hi all,I'm a new user, and I've got a problem with OLE object. I would like to have a report that show me ONLY one of many OLE (word document) in Crystal structure.I've created 3 section detail, and in each one I've insert OLE object (creating from a file, and LINK).So, if I change one document stored locally, and then refresh the report, the content doesn't change like the linked file! Actually I've got all locally Please help me.CR XI r2 is not supported on WIN 2008. See the [supported platforms|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7081b21c-911e-2b10-678e-fe062159b453]
documentation and [this|https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=56787567] wiki.
Ludek -
Documents with Smart Objects - Very slow to open and Save - CS6 Photoshop
When opening and saving documents with smart objects photoshop freezes the adobe PS loader (circle dots) is replaced and the system loader (multi colored wheel of death) spins for 30 seconds or more.
What I've tried so far based off looking at various posts.
Photoshop Preferenes
Save in Background off
Maximise PSD and PSB file compatability never
Cache Tile Size: 128k
Advanced Graphic Processor Settings: Basic & Normal
Layer Panel options: No Thumbnail
Observations and workthroughs to date
The file size and amount of smart objects effects the file expotentially i.e. The more smart objects you have the worse it gets
These files worked perfectly in PS CS5
It also happens on files natively created in PS CS6
The CPU is maxing out at 100% while PS loads
Closing or opening suitcase has no effect.
System:
iMac 27-inch, Mid 2011
Processor 3.4 GHz Intel Core i7
Memory 16 GB 1333 MHz DDR3
Graphics AMD Radeon HD 6970M 1024 MB
Mac OS X Lion 10.7.5 (11G63)
Suitcase 4
Anyone got any ideas? This is making me go nuts!A solution!
It turns out the problem in my case was in fact Suitcase. Previously, I'd tried turning it off, but that didn't fix the problem, so this time, I uninstalled it completely and the problem disappeared. I then began re-adding it (installed 15.0.1, upgraded it, etc.) and the problem resurfaced with the addition of the Photoshop-specific plugin. Deleting that plugin solved the problem. So it seems that "disabling" Suitcase by stopping the TypeCore doesn't seem to actually disable all of the tentacles it sticks into your system.
You can find the plugin here: Applications / Adobe Photoshop CS6 / Plug-ins / Automate / ExtensisFontManagementPSCS6.plugin
(After a restart, I also had to delete the font cache, as described here http://helpx.adobe.com/photoshop/kb/troubleshoot-fonts-photoshop-cs5.html but your mileage may vary.)
Alternately, if you don't want to delete the plugin, disabling it from within Photoshop seems to work as well. To do that, go to File > Automate > Extensis, click Preferences..., then deselect Enable Suitcase Fusion 4 Auto-Activation.
Fortunately, the plugin doesn't seem necessary at all to use the the core functionality of Suitcase (enabling and disabling fonts) in Photoshop. I didn't even know what these app-specific plugins did until researching this problem, and I still don't quite understand the point of them. I guess they allow you to let the apps for which they're installed do a little bit more of their own management (enable a font via Suitcase that isn't enabled system-wide), but that seems like more control than I need--if I'm enabling a font, I want all my software to be able to use it.
Anyway, the problem seems to be completely solved on my system now, though I just did all this, so more testing over the next few days is required. I'll post here if any issues crop up. I'm interested in hearing if this solves it for anyone else as well. -
I'm trying to make an android game and I want that when a collision with another object change of sc
I'm trying to make an android game and I want that when a collision with another object change of scene
how i can do thishere is the doc on htiTestObject for detecting collisions.
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayOb ject.html#hitTestObject()
for scene change use the second parameter in gotoandplay() to define scene name doc below
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/MovieClip .html#gotoAndPlay() -
Can an email address be a member of an LDAP group even if it isn't
associated with an object in the Directory Server?
<P>
General members of a group are the members defined in the
Directory Server. They are full-fledged members of the group who
may have a set of permissions associated with their membership,
a title, or other attributes. Mail-specific users are users who
are not full-fledged members of the group, but who receive mail
sent to the group. Mail-specific users need not be identified as
a user in the Directory Server--an email address is sufficient.
An example of this is a group of salespeople, all of whom are in
the group "North American Sales Team." They have access to a
sales-tracking database, on-line quota information, and
competitive information. The mail-specific users of this group
are the admins who support the members of the sales team, who need
to get the mail that goes out to the group, but don't need access
to the applications and information that the salespeople do.Hey EllyK,
Welcome to the BlackBerry Support Community Forums.
Thanks for the question.
I would suggest performing this workaround and then try to login to BlackBerry Link:
Open BlackBerry World on the BlackBerry smartphone and sign in using the BlackBerry ID.
Connect the BlackBerry 10 smartphone to the computer.
Open BlackBerry Link
Sign in using the BlackBerry ID.
Let me know if the issue still persists.
Cheers.
-ViciousFerret
Come follow your BlackBerry Technical Team on Twitter! @BlackBerryHelp
Be sure to click Like! for those who have helped you.
Click Accept as Solution for posts that have solved your issue(s)!
Maybe you are looking for
-
Everytime I export from FCP using comressor I am lose my audio, any ideas as to why this is happening. Or do I have somthing turned off and I am just missing it? Dual 2.7 Ghz PowerPC G5 1.5 GB DDR SDRAM, Mac OS X (10.4.6)
-
Aironet 1300 dropping every 36-48 hours, help please
Within the past month our 1300's have begun going down around every 36 hours. They are setup with a root bridge and 4 non-root bridges and are set to use the least congested frequency. I am interested in solving this problem as well as setting up the
-
MY IPAD MINI WONT SYNC WITH LOGITECH KEYBOARD?
mu ipad mini has stopped syncing with my logitech keyboard....blue light flashes on keyboard but thats it billy145
-
Meta text not showing on mouse over
Certain sites (such as [http://xkcd.com/789/]) use meta text to add more information, etc. when you run the mouse over the picture. This feature isn't working for me.
-
Envelopes won't print after W 7 upgrade
No custom or alternative sizes are available in properties or quick print from two different word processing programs. I'm pretty sophisticated at this stuff, but stumped, or annoyed. Seems as though the driver for W7 is somehow incomplete.