Expanding tree2 child nodeHello Friends,
Hello Friends,
I am new to myfaces tree2 component. I am trying to implement the an example
given at
http://www.jroller.com/plainoldweblog/entry/use_tomahawk_tree2_and_ajax4jsf
I am not able to expand the child node in the given example. Can somebody help
me, I need to recursively expand the child node. I have given the source below.
Thank you.
Sudheer
treeBean.java
=============
public class TreeBean implements Serializable {
private TreeModel treeModel;
public TreeModel getTreeModel() {
if(treeModel == null) {
//you don't really have to initialize the treeModel here
TreeNode root = new TreeNodeBase("folder", "root", "1", false);
List<TreeNode> rootChildList = root.getChildren();
//constructs real folder tree
TreeNode documents = new TreeNodeBase("folder", "Documents", "10", false);
List<TreeNode> childList = documents.getChildren();
TreeNode home = new TreeNodeBase("folder", "User Home", "101", false);
home.getChildren().add(new TreeNodeBase("folder", "user", "1011", false));
TreeNode tmp = new TreeNodeBase("folder", "Temporary", "102", false);
tmp.getChildren().add(new TreeNodeBase("folder", "junks", "1021", false));
childList.add(home);
childList.add(tmp);
rootChildList.add(documents);
treeModel = new TreeModelBase(root);
return treeModel;
* set folder tree model
* @param p_treeModel
public void setTreeModel(TreeModel p_treeModel) {
treeModel = p_treeModel;
* This method listens to expand and collapse folder events.
* @param p_event
public void processToggle(ActionEvent p_event) {
UIComponent component = (UIComponent) p_event.getSource();
while (!(component != null && component instanceof HtmlTree)) {
component = component.getParent();
if (component != null) {
HtmlTree tree = (HtmlTree) component;
TreeNode node = tree.getNode();
if (!tree.isNodeExpanded()) {
loadChildren(node);
} else {
//unloadChildren(node);
* when tree node is expanded, this method will load its children
* @param p_parentNode
public void loadChildren(TreeNode p_parentNode) {
List<TreeNode> childList = p_parentNode.getChildren();
//This is where you need to load the actual child nodes
childList.add(new TreeNodeBase(p_parentNode.getType(),
"folder"+System.currentTimeMillis(),
p_parentNode.getIdentifier()+1, false));
tree.xhtml
==========
<h:form id="ajaxform">
<h:panelGroup id="treePanel">
<t:tree2 id="tree" value="#{treeBacker.treeModel}"
var="node" varNodeToggler="t"
clientSideToggle="false"
showRootNode="false" showNav="false"
showLines="false">
<f:facet name="folder">
<h:panelGroup id="folderPanelGroup">
<!-- expand collapse -->
<a4j:commandLink id="expandCollapseLink" immediate="true"
styleClass="treeNode"
reRender="treePanel"
action="#{t.toggleExpanded}"
actionListener="#{treeBacker.processToggle}">
<t:graphicImage style="border:0px" url="#{t.nodeExpanded ? '/images/yellow-folder-open.png' : '/images/yellow-folder-closed.png' }" />
</a4j:commandLink>
<!-- load folder content -->
<h:outputText value="#{node.description}" />
</h:panelGroup>
</f:facet>
</t:tree2>
</h:panelGroup>
</h:form>
...........
The config looks OK for this Gen 1 VM, except the odd memory configuration.
Can you look up the Hyper-V logs on the host:
particularly hypervisor/operational and VMMS/admin?
You can use Powershell to collect the logs if you like.
Here's a sample script. After running the script to load the function you can run:
Get-HVEventLog -Computername MyHVHost-Days 7
Sam Boutros, Senior Consultant, Software Logic, KOP, PA http://superwidgets.wordpress.com (Please take a moment to Vote as Helpful and/or Mark as Answer, where applicable) _________________________________________________________________________________
Powershell: Learn it before it's an emergency http://technet.microsoft.com/en-us/scriptcenter/powershell.aspx http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx
Sam,
i corrected the memory settings & assigned static memory as 1024 MB.
there was two blocks of scripts in that website, i don't which of them i must run.
i verified my event viewer as i had done earlier, i the following are the only events which are are logged in all hyper-v related notes:
hyper-v-hyperVisor node:
Hyper-V successfully created a new partition (partition 3).
Hyper-v-synthnic node:
'test4' Network Adapter (7F8B9901-BBF5-4541-B586-33A5EE906B49) started successfully. (Virtual Machine ID D3589B09-C269-46CE-9BD1-51A3C95C04BF)
'test4' Network Adapter (d3589b09-c269-46ce-9bd1-51a3c95c04bf--7f8b9901-bbf5-4541-b586-33a5ee906b49) Disconnected from virtual network. (Virtual Machine ID D3589B09-C269-46CE-9BD1-51A3C95C04BF)
Hyper-v-worker node:
'test4' started successfully. (Virtual machine ID D3589B09-C269-46CE-9BD1-51A3C95C04BF)
and also in Custom node\ Administrative events, an error is logged continuously ---->
Microsoft-Windows-Kernel-EventTracing/Admin :
Session "" failed to start with the following error: 0xC000000D (event ID 2)
Similar Messages
-
Jim2178: my point is the one who purchased the applicaitons or credit is not the one who is the credit card holder. It means the credit holder didn't permit the account holder to purchase. the problem is Apple requests all the Apple ID account holder to enter credit card information to be granted the Apple account. Does your 13y child have credit card? Of course, it will be the parents' credit card. How to prevent from such inadvertent purchase? My son's friend recently purchased ~S$1,288 applicaitons and credits with my son's iPhone in the past month. It was discovered when the credit card bill is received. What a pitty...
Thanks, I have not but I am going to. I don't know which one I should talk to? Mayme I should send to all 8 persons from iTunes supports. However, I have done the "Report a Problem" with the "advertenly purchase reason" and stated the reason for the refund request on every APP items of the purchase history. It is about 94 items. But, Apple supports(8 of them) replied they have made some exception to refunds(4 of 94) and some requried more time(6 of 94) from the few latest purchses. There are ~180 In APP purchase which represents ~U$900. These cannot be reported the problem. Don't know who I should talk to.
What I am going to do is to reply the emails to [email protected] with the 270 purchase list and tell them what happened. I can only hope that Apple can look into such issue and give some help. -
$expand multiple child entity sets on master item selection
Hi,
I have OData service with following entityset structure:
Deals -> Master
Systems -> Detail
Documents -> Detail
References -> Detail
On Master view, I am displaying list of Deals. And when user selects any particular Deal from master view, it should show Systems, Documents and References list on details view.
Problem is its calling OData service 3 times, each for Systems, Documents and References. I want to fetch all these 3 details in one call.
I know we can use $expand. I have written following code in Master view for select event of List. And I notice its fetching data correctly here.
handleListSelect : function (evt) {
//alert("context.getPath(): " + context.getPath());
var context = evt.getParameter("listItem").getBindingContext();
var oModel = this.getView().getModel();
var newContext = null;
oModel.read(context.getPath(), null, {"$expand":"SystemCollection,DocumentCollection,ReferenceCollection"}, false, function(oData, oResponse){
var model = new sap.ui.model.json.JSONModel(oData);
newContext = new sap.ui.model.Context(model, context.getPath());
this.nav.to("Detail", newContext);
And in App.controller.js following code is written to set the context binding.
to : function (pageId, context) {
var app = this.getView().app;
// load page on demand
var master = ("Master" === pageId);
if (app.getPage(pageId, master) === null) {
var page = sap.ui.view({
id : pageId,
viewName : "test.demo.view." + pageId,
type : "XML"
page.getController().nav = this;
app.addPage(page, master);
jQuery.sap.log.info("app controller > loaded page: " + pageId);
// show the page
app.to(pageId);
// set data context on the page
if (context) {
var page = app.getPage(pageId);
page.setBindingContext(context); // Data is coming correctly here
And in Detail view item mapping is done:
<Table id="IbOverview" headerText="Systems" items="{path : 'SystemCollection'}">
<List id="AttachmentList" items="{path : 'DocumentCollection'}"
<List items="{path : 'ReferenceCollection'}" headerText="Document References" >
I notice data is coming correctly in context but still Details view making individual calls for fetching Systems, Documents and Reference data. Am I missing something?
Regards,
VikramHi,
You link more than one Child table to a header table with document type, through code. It is highly possible. -
After typing in the apple ID then I am asked to type in the verification code which I never answered in the first place
Click here for information. If you can't get the answers emailed to you for some reason(the email may take a few hours to arrive), contact the iTunes Store staff via the link in that article.
(85528) -
Unable to expand child links in ALV Tree
Hi,
I have written the following code for ALV Tree using function modules.
REPORT ZSID_ALV_TREE.
type pool declarations for tree
TYPE-POOLS : fibs,stree.
tables: ekko.
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
it_ekpo TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
it_emptytab TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko,
wa_ekpo TYPE t_ekko.
DATA:w_repid type sy-cprog.
*Data declaration for additional node information
DATA : t_node TYPE snodetext.
*Internal table and wa decl for nodes
DATA : it_node LIKE TABLE OF t_node INITIAL SIZE 0,
wa_node LIKE t_node.
*Start of selection event
START-OF-SELECTION.
*Select the data for tree
PERFORM fetch_data.
*Build the hierarchy for tree
PERFORM build_hierarchy.
*Build Tree for display
PERFORM build_tree.
*& Form fetch_data
text
--> p1 text
<-- p2 text
FORM fetch_data .
SELECT ebeln
up to 10 rows
FROM ekko
INTO corresponding fields of TABLE it_ekko .
loop at it_ekko into wa_ekko.
SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
FROM ekpo
appending TABLE it_ekpo
where ebeln eq wa_ekko-ebeln.
endloop.
endform.
*& Form build_hierarchy
text
--> p1 text
<-- p2 text
FORM build_hierarchy .
*Building the nodes and hierarchy for tree
CLEAR : it_node[], wa_node.
wa_node-type = 'T'.
wa_node-name = 'Product Hierarchy Level'.
wa_node-tlevel = '01'.
wa_node-nlength = '35'.
wa_node-color = '4'.
wa_node-text = 'Test'.
wa_node-tlength ='20'.
wa_node-tcolor = 3.
APPEND wa_node TO it_node.
CLEAR wa_node.
loop at it_ekpo into wa_ekpo.
wa_node-type = 'P'.
wa_node-name = 'Purchasing Doc'.
wa_node-tlevel = '02'.
wa_node-nlength = '25'.
wa_node-color = '4'.
wa_node-text = wa_ekpo-ebeln.
wa_node-tlength ='20'.
wa_node-tcolor = 3.
APPEND wa_node TO it_node.
CLEAR wa_node.
*Filling the values of internal table into tree
wa_node-type = 'P'.
wa_node-name = 'Material No'.
wa_node-tlevel = '03'.
wa_node-nlength = '20'.
wa_node-color = '1'.
wa_node-text = wa_ekpo-matnr.
wa_node-tlength ='20'.
wa_node-tcolor = 4.
APPEND wa_node TO it_node.
CLEAR wa_node.
ENDLOOP.
ENDFORM. " build_hierarchy
*& Form build_tree
text
--> p1 text
<-- p2 text
FORM build_tree .
*Fm for constructing the tree
CALL FUNCTION 'RS_TREE_CONSTRUCT'
TABLES
nodetab = it_node.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
w_repid = SY-CPROG.
*FM for displaying the tree
CALL FUNCTION 'RS_TREE_LIST_DISPLAY'
EXPORTING
CALLBACK_PROGRAM = w_repid
CALLBACK_USER_COMMAND = 'USER1_COMMAND'
CALLBACK_TEXT_DISPLAY =
CALLBACK_MOREINFO_DISPLAY =
CALLBACK_COLOR_DISPLAY =
CALLBACK_TOP_OF_PAGE =
CALLBACK_GUI_STATUS =
CALLBACK_CONTEXT_MENU =
STATUS = 'IMPLICIT'
CHECK_DUPLICATE_NAME = '0'
COLOR_OF_NODE = '4'
COLOR_OF_MARK = '3'
COLOR_OF_LINK = '1'
COLOR_OF_MATCH = '5'
LOWER_CASE_SENSITIVE = 'X'
MODIFICATION_LOG = 'X'
NODE_LENGTH = 40
TEXT_LENGTH = 75
TEXT_LENGTH1 = 0
TEXT_LENGTH2 = 0
RETURN_MARKED_SUBTREE = 'X'
SCREEN_START_COLUMN = 0
SCREEN_START_LINE = 0
SCREEN_END_COLUMN = 0
SCREEN_END_LINE = 0
SUPPRESS_NODE_OUTPUT = 'X'
LAYOUT_MODE = ' '
USE_CONTROL = 'L'.
IMPORTING
F15 =
ENDFORM. " build_tree
FORM USER1_COMMAND TABLES node STRUCTURE seucomm
USING command
CHANGING value(exit)
VALUE(LIST_REFRESH).
write 'Hi'.
endform.
But I have a problem
1. I can expand the child links in tree structure when I comment the exporting parameter CALLBACK_USER_COMMAND in the function Module 'RS_TREE_LIST_DISPLAY'.
2 But when i uncomment the exporting parameter I am unable to expand the child links in output.
Please let me know if i have missed something in the code.
Useful answers will be rewarded
Regards,
SiddharthHi Sidhhart,
Check out this prog.
REPORT Z_KULDEEP_ALV_HIERARCHY
message-id zord
line-size 270.
Tables:
Vbap,
Vbak.
*& PROGRAM VARIABLES
type-pools slis.
*& INTERNAL TABLES & STRUCTURES
data:
begin of t_header occurs 0,
EXPCOL type c,
vbeln type vbak-vbeln,
audat type vbak-audat,
vkorg type vbak-vkorg,
vtweg type vbak-vtweg,
spart type vbak-spart,
end of t_header,
begin of t_item occurs 0,
vbeln type vbap-vbeln,
posnr type vbap-posnr,
matnr type vbap-matnr,
arktx type vbap-arktx,
pstyv type vbap-pstyv,
end of t_item,
t_fieldcat type standard table of slis_fieldcat_alv with header line,
t_event type standard table of slis_alv_event with header line,
x_keyinfo type slis_keyinfo_alv,
x_layout type slis_layout_alv,
x_variant like disvariant.
*& GLOBAL VARIABLES
data:
g_repid type sy-repid,
g_formname type slis_formname value 'TOP_OF_PAGE'.
*& SELECTION SCREEN *
selection-screen begin of block a with frame title text-000.
Select-options : s_date for vbak-audat obligatory.
p_date type vbak-audat.
selection-screen end of block a.
*& INITIALIZATION *
initialization.
clear : g_repid,t_header,t_item.
refresh : t_header,t_item.
g_repid = sy-repid.
*& AT SELECTION-SCREEN *
at selection-screen.
if s_date-high > sy-datum.
message e001.
endif.
start-of-selection.
select vbeln audat vkorg vtweg spart from vbak
into corresponding fields of table t_header
where audat in s_date.
select vbeln posnr matnr arktx pstyv from vbap
into table t_item
for all entries in t_header
where vbeln = t_header-vbeln.
end-of-selection.
perform sub_display_alv.
*& Form sub_display_alv
text
--> p1 text
<-- p2 text
form sub_display_alv.
*column 1
perform sub_populate_fieldcatalog using:
'VBELN' " field name
'T_HEADER' " table name
'ORDER' " column heading
'8' " column width
' ' " fix column?
' ' " key
' ' " no display
' ' " sum this column
'X' " do not sum
' ' " input allowed?
' ' " currenct type field name
' ' " data type
'X'. " hotspot.
*column 2
perform sub_populate_fieldcatalog using:
'AUDAT' " field name
'T_HEADER' " table name
'ORDERDATE' " column heading
'10' " column width
' ' " fix column?
' ' " key
' ' " no display
' ' " sum this column
'X' " do not sum
' ' " input allowed?
' ' " currenct type field name
' ' " data type
'X'. " hotspot.
*column 3
perform sub_populate_fieldcatalog using:
'VKORG' " field name
'T_HEADER' " table name
'SALES ORG' " column heading
'6' " column width
' ' " fix column?
' ' " key
' ' " no display
' ' " sum this column
'X' " do not sum
' ' " input allowed?
' ' " currenct type field name
' ' " data type
'X'. " hotspot.
*column 4
perform sub_populate_fieldcatalog using:
'VTWEG' " field name
'T_HEADER' " table name
'DIVISION' " column heading
'2' " column width
' ' " fix column?
' ' " key
' ' " no display
' ' " sum this column
'X' " do not sum
' ' " input allowed?
' ' " currenct type field name
' ' " data type
'X'. " hotspot.
*column 5
perform sub_populate_fieldcatalog using:
'SPART' " field name
'T_HEADER' " table name
'CHANNEL' " column heading
'4' " column width
' ' " fix column?
' ' " key
' ' " no display
' ' " sum this column
'X' " do not sum
' ' " input allowed?
' ' " currenct type field name
' ' " data type
'X'. " hotspot.
*column 6
perform sub_populate_fieldcatalog using:
'vbeln' " field name
'T_item' " table name
'Order' " column heading
'8' " column width
' ' " fix column?
' ' " key
' ' " no display
' ' " sum this column
'X' " do not sum
' ' " input allowed?
' ' " currenct type field name
' ' " data type
'X'. " hotspot.
*column 7
perform sub_populate_fieldcatalog using:
'POSNR' " field name
'T_ITEM' " table name
'SALES DOC.ITEM' " column heading
'8' " column width
' ' " fix column?
' ' " key
' ' " no display
' ' " sum this column
'X' " do not sum
' ' " input allowed?
' ' " currenct type field name
' ' " data type
'X'. " hotspot.
*column 8
perform sub_populate_fieldcatalog using:
'MATNR' " field name
'T_ITEM' " table name
'MATERIAL' " column heading
'8' " column width
' ' " fix column?
' ' " key
' ' " no display
' ' " sum this column
'X' " do not sum
' ' " input allowed?
' ' " currenct type field name
' ' " data type
'X'. " hotspot.
*column 9
perform sub_populate_fieldcatalog using:
'ARKTX' " field name
'T_ITEM' " table name
'SALES ORDER ITEM' " column heading
'8' " column width
' ' " fix column?
' ' " key
' ' " no display
' ' " sum this column
'X' " do not sum
' ' " input allowed?
' ' " currenct type field name
' ' " data type
'X'. " hotspot.
*column 10
perform sub_populate_fieldcatalog using:
'PSTYV' " field name
'T_ITEM' " table name
'ITEM CATEGORY' " column heading
'8' " column width
' ' " fix column?
' ' " key
' ' " no display
' ' " sum this column
'X' " do not sum
' ' " input allowed?
' ' " currenct type field name
' ' " data type
'X'. " hotspot.
perform sub_assign_events.
Create a Layout for the ALV
perform sub_layout.
Define the key fields that links the header & item tables
perform sub_define_key.
dispaly list
perform sub_call_list_display.
endform. " sub_display_alv
*& Form sub_populate_fieldcatalog
text
-->P_G_FIELDCAT text
-->P_0198 text
-->P_0199 text
-->P_0200 text
-->P_0201 text
-->P_0202 text
-->P_0203 text
-->P_0204 text
-->P_0205 text
-->P_0206 text
-->P_0207 text
-->P_0208 text
-->P_0209 text
-->P_0210 text
-->P_0211 text
-->P_0212 text
-->P_0213 text
form sub_populate_fieldcatalog using
l_fieldname
l_tabname
l_column_heading
l_outputlen
l_fix_column
l_key
l_no_out
l_do_sum
l_no_sum
l_input
l_cfieldname
l_datatype
l_hotspot.
t_fieldcat-fieldname = l_fieldname.
t_fieldcat-tabname = l_tabname.
t_fieldcat-reptext_ddic = l_column_heading.
t_fieldcat-outputlen = l_outputlen.
t_fieldcat-fix_column = l_fix_column.
t_fieldcat-key = l_key.
t_fieldcat-no_out = l_no_out.
t_fieldcat-do_sum = l_do_sum.
t_fieldcat-no_sum = l_no_sum.
t_fieldcat-cfieldname = l_cfieldname.
t_fieldcat-datatype = l_datatype.
t_fieldcat-hotspot = l_hotspot.
append t_fieldcat.clear t_fieldcat.
endform. " sub_populate_fieldcatalog
*& Form sub_assign_events
text
--> p1 text
<-- p2 text
form sub_assign_events.
refresh t_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 1
importing
et_events = t_event[]
exceptions
list_type_wrong = 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.
Read the record for the top-of-page event
read table t_event with key slis_ev_top_of_page.
if sy-subrc = 0.
t_event-form = g_formname.
append t_event.
endif.
endform. " sub_assign_events
*& Form SUB_LAYOUT
text
--> p1 text
<-- p2 text
form sub_layout.
clear x_layout.
x_layout-f2code = 'QUOTE'.
x_layout-zebra = 'X'.
x_layout-expand_fieldname = 'EXPCOL'. " Field for expand/collapse
*Stat
x_layout-colwidth_optimize = 'X'.
x_layout-no_totalline = 'X'. " 0001+
endform. " SUB_LAYOUT
*& Form SUB_DEFINE_KEY
text
--> p1 text
<-- p2 text
form sub_define_key.
clear x_keyinfo.
x_keyinfo-header01 = 'VBELN'.
x_keyinfo-item01 = 'VBELN'.
endform. " SUB_DEFINE_KEY
form top_of_page.
write :/10 sy-datum, 20 sy-pagno, 30 sy-uname.
endform.
form sub_user_command using f_ucomm like sy-ucomm
f_selfield type slis_selfield.
if f_ucomm = 'QUOTE'.
if f_selfield-fieldname = 'VBELN'.
Set Parameter id 'AUN' field f_selfield-value.
call transaction 'VA03'.
endif.
endif.
endform.
*& Form sub_call_list_display
text
--> p1 text
<-- p2 text
form sub_call_list_display.
call function 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
exporting
i_callback_program = g_repid
i_callback_user_command = 'SUB_USER_COMMAND '
is_layout = x_layout
it_fieldcat = t_fieldcat[]
i_save = 'A'
it_events = t_event[]
i_tabname_header = 'T_HEADER'
i_tabname_item = 'T_ITEM'
is_keyinfo = x_keyinfo
tables
t_outtab_header = t_header[]
t_outtab_item = t_item[]
exceptions
program_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.
endform. " sub_call_list_display -
I cant purchase a album on itunes because this is the first time purchasing something on this computer and it says that i need to answer "who was your best child hood friend?" and "who was your least favorite teacher?" but i dont remember my answers. and i dont know how to get my answers back.
ChrisJ4203,
Thank you for the help. Every app on my phone was downloaded using my old I-tunes ID. I just hope that they will re-download under my new ID because I still can't change it on my phone. In order to change to the new ID it says I have to sign out from the old ID and change to the new one. My problem is that I don't remember my password to be able to sign out from my old ID. Then the phone says it can change my password through e-mail and I agree but I never get an e-mail at my old address or the new one.
BHuyett -
Not able to expand Treetable structure programmatically
We had implemented expanding Treetable structure programmatically. But when we are uptaking our UI to PS4, the expand operation is not working and we are getting exceptions.
We are expanding Treetable through program, for example when try to expand first child of first node, we are passing Disclosed keys like 0,0 to the Treetable using the setDisclosedRowKeys() method.
While trying to expand we are getting the following exception:
No data found for key 0, 0
ADF_FACES-60097:For more information, please see the server's error log for an entry beginning with: ADF_FACES-60096:Server Exception during PPR, #5
Please correct me if I miss anything.this code works for me..
disclosedRowKeys="#{pageFlowScope.orderBean.disclosedTreeRowKeySet}"
rowDisclosureListener="#{pageFlowScope.orderBean.rowDisclosureListener}">
public void rowDisclosureListener(RowDisclosureEvent rowDisclosureEvent)
Iterator added = rowDisclosureEvent.getAddedSet().iterator();
if (added!=null)
while (added.hasNext())
Object rowKey = added.next();
//disclosedTreeRowKeySet.clear();
List path = (List)rowKey;
for( int i=0; i< path.size(); i++ )
List<Object> nodePath = new ArrayList<Object>();
for( int j=0; j<i; j++ )
nodePath.add( path.get( j ) );
disclosedTreeRowKeySet.add( nodePath );
disclosedTreeRowKeySet.add( rowKey );
System.out.println( "disclosed Keys...... " + disclosedTreeRowKeySet );
private void expandSelectedFundingNode(RowKeySet addedObj) {
if (sourceTreeTable != null) {
Iterator added = (Iterator)addedObj.iterator();
if (added!=null)
while (added.hasNext())
Object rowKey = added.next();
List path = (List)rowKey;
for( int i=0; i< path.size(); i++ )
List<Object> nodePath = new ArrayList<Object>();
for( int j=0; j<i; j++ )
nodePath.add( path.get( j ) );
disclosedTreeRowKeySet.add( nodePath );
disclosedTreeRowKeySet.add( rowKey );
sourceTreeTable.setDisclosedRowKeys(disclosedTreeRowKeySet);
} -
Method to expand a particular node in a HGrid
I have an enhancement where I create a child node under a parent node in a HGrid and once I create the child and come back to the Grid page I need to see the parent node expanded and child node visiible. By default the parent node is collapsed as a result child node is not visible.
Please suggest.
Also let u know if there is any api for expanding specific node in HgridI have this same requirement and I am encountering java.lang.NullPointerException. This line works fine for finding the HGrid:
OAHGridBean oaHgrid = (OAHGridBean)webBean.findIndexedChildRecursive("SupHgridRN");
Either of these suggested methods:
oaHgrid.setExpandAllEnabled(true);
oaHgrid.setAutoExpansionMaxLevels(99);
results in the attached error stack. Any ideas?
oracle.apps.fnd.framework.OAException: java.lang.NullPointerException
at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:603)
at oracle.apps.fnd.framework.webui.OAWebBeanTableHelper.processRequest(OAWebBeanTableHelper.java:2084)
at oracle.apps.fnd.framework.webui.OAWebBeanHGridHelper.processRequest(OAWebBeanHGridHelper.java:1633)
at oracle.apps.fnd.framework.webui.beans.table.OAHGridBean.processRequest(OAHGridBean.java:684)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.OASubTabLayoutHelper.processRequest(OASubTabLayoutHelper.java:436)
at oracle.apps.fnd.framework.webui.beans.layout.OASubTabLayoutBean.processRequest(OASubTabLayoutBean.java:465)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processRequest(OAHeaderBean.java:389)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2336)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1735)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:509)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:430)
at oa_html._OA._jspService(_OA.java:84)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
at oracle.jsp.JspServlet.service(JspServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
at oa_html._OA._jspService(_OA.java:94)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
at oracle.jsp.JspServlet.service(JspServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
at oa_html._RF._jspService(_RF.java:102)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
at oracle.jsp.JspServlet.service(JspServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
at org.apache.jserv.JServConnection.run(JServConnection.java:294)
at java.lang.Thread.run(Thread.java:534)
## Detail 0 ##
java.lang.NullPointerException
at hack.oracle.apps.per.selfservice.mgrviews.webui.hackEmpSupHrchyCO.processRequest(hackEmpSupHrchyCO.java:42)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:587)
at oracle.apps.fnd.framework.webui.OAWebBeanTableHelper.processRequest(OAWebBeanTableHelper.java:2084)
at oracle.apps.fnd.framework.webui.OAWebBeanHGridHelper.processRequest(OAWebBeanHGridHelper.java:1633)
at oracle.apps.fnd.framework.webui.beans.table.OAHGridBean.processRequest(OAHGridBean.java:684)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.OASubTabLayoutHelper.processRequest(OASubTabLayoutHelper.java:436)
at oracle.apps.fnd.framework.webui.beans.layout.OASubTabLayoutBean.processRequest(OASubTabLayoutBean.java:465)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processRequest(OAHeaderBean.java:389)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2336)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1735)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:509)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:430)
at oa_html._OA._jspService(_OA.java:84)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
at oracle.jsp.JspServlet.service(JspServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
at oa_html._OA._jspService(_OA.java:94)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
at oracle.jsp.JspServlet.service(JspServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
at oa_html._RF._jspService(_RF.java:102)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
at oracle.jsp.JspServlet.service(JspServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
at org.apache.jserv.JServConnection.run(JServConnection.java:294)
at java.lang.Thread.run(Thread.java:534)
java.lang.NullPointerException
at hack.oracle.apps.per.selfservice.mgrviews.webui.hackEmpSupHrchyCO.processRequest(hackEmpSupHrchyCO.java:42)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:587)
at oracle.apps.fnd.framework.webui.OAWebBeanTableHelper.processRequest(OAWebBeanTableHelper.java:2084)
at oracle.apps.fnd.framework.webui.OAWebBeanHGridHelper.processRequest(OAWebBeanHGridHelper.java:1633)
at oracle.apps.fnd.framework.webui.beans.table.OAHGridBean.processRequest(OAHGridBean.java:684)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.OASubTabLayoutHelper.processRequest(OASubTabLayoutHelper.java:436)
at oracle.apps.fnd.framework.webui.beans.layout.OASubTabLayoutBean.processRequest(OASubTabLayoutBean.java:465)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processRequest(OAHeaderBean.java:389)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2336)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1735)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:509)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:430)
at oa_html._OA._jspService(_OA.java:84)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
at oracle.jsp.JspServlet.service(JspServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
at oa_html._OA._jspService(_OA.java:94)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
at oracle.jsp.JspServlet.service(JspServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
at oa_html._RF._jspService(_RF.java:102)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
at oracle.jsp.JspServlet.service(JspServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
at org.apache.jserv.JServConnection.run(JServConnection.java:294)
at java.lang.Thread.run(Thread.java:534) -
Expand first node of pannel accordion initially
i have a navigation pane when clicked on navigation item panel accordion gets displayed when clicked on panel accordion disclosure listener gets called and tree is displayed i want that when navigation item is clicked first node of the panel accordion should be expanded containing child of the tree.is there any way to do so???
Edited by: 935592 on May 21, 2012 2:11 AM<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<af:document title="untitled1.jsf" id="d1">
<af:messages id="m1"/>
<af:form id="f1">
<af:panelStretchLayout id="psl1" bottomHeight="19px">
<f:facet name="bottom"/>
<f:facet name="center">
<af:panelStretchLayout id="psl2">
<f:facet name="center">
<af:panelSplitter id="ps1">
<f:facet name="first">
<af:panelAccordion id="pa1" partialTriggers="::np1">
<af:forEach items="#{bindings.VerticalMenus.children}" var="row">
<af:showDetailItem text="#{row.MenuLabel}" id="sdi1"
disclosureListener="#{appmenusbean.getid}"
disclosed="true" partialTriggers="np1">
<f:attribute name="currentMenu" value="#{row.MenuId}"/>
<af:tree value="#{bindings.treeeVO.treeModel}" var="node"
selectionListener="#{bindings.treeeVO.treeModel.makeCurrent}"
rowSelection="single" id="t1">
<f:facet name="nodeStamp">
<af:group id="g1">
<af:commandLink id="ot1" text="#{node.MenuLabel}"
actionListener="#{applicationScope.regionbean.selectedTreeValue}">
<f:attribute name="menuId" value="#{node.MenuDestination}"/>
</af:commandLink>
</af:group>
</f:facet>
</af:tree>
</af:showDetailItem>
</af:forEach>
</af:panelAccordion>
</f:facet>
<f:facet name="second">
<af:region value="#{bindings.dynamicRegion2.regionModel}" id="r1"/>
</f:facet>
</af:panelSplitter>
</f:facet>
<f:facet name="top">
<af:navigationPane id="np1">
<af:forEach items="#{bindings.GlobalMenusVO.children}" var="row">
<af:commandNavigationItem text="#{row.MenuLabel}" id="cni1"
actionListener="#{appmenusbean.makeCurrent}"
showRequired="true" rendered="true">
<f:attribute name="currentMenuId" value="#{row.MenuId}"/>
</af:commandNavigationItem>
</af:forEach>
</af:navigationPane>
</f:facet>
</af:panelStretchLayout>
</f:facet>
<f:facet name="top"/>
</af:panelStretchLayout>
</af:form>
</af:document>
</f:view>
i think its not about task flow.Tree doesn't get refreshed at first time but when i collapse and than expand pannel accordion tree is refreshed.....
i just want Tree to be filled inside panel accordion with first node of panel accordion expended as navigation item is clicked
Edited by: 935592 on May 21, 2012 3:27 AM -
Let's say a tree has 3 children, and each children has a hierarchy of subtrees. Is there any way to just expand one children and its subtrees??
root
|_A
|_SUBTREE
|_B
|_SUBTREE
|_C
|_SUBTREE
If I do the following, it will expand the whole big tree.
JTree tree;
//etc...
1) /** Expand the tree */
for (int i=0; i<tree.getRowCount(); i++)
tree.expandRow(i);
If I do this, it own expands the first 6 children (including the subtrees of each children)
2) /** Expand the tree */
for (int i=0; i<6; i++)
tree.expandRow(i);
any ideas?? please help!!I think u mistook my point. Let's say a JTree has 3 children as follows:
and each child has its own tree hierarchy.
root
|_SUBTREE1
|_SUBTREE2
|_SUBTREE3
All I want is when the user click a particular tree node, the whole subtree will expand.
I tried the following, but it only expands the child of the tree node I selected.
public void treeExpanded(TreeExpansionEvent evt)
{ System.out.println("treeExpanded...");
TreePath path = evt.getPath();
int pathCount = path.getPathCount();
System.out.println(pathCount);
for (int i=0; i<pathCount; i++)
tree.expandPath(path);
Any ideas??? -
Hi,
I have done a application with Tree by NST table .
The initial screen will contains around 6 fields , the first field (ObjKey) will be displayed. I have stored in one internal table and i i want to display the child node for correponding objkey,for that child node again im storing in to the same internal table . now when i to expand the child node from the output there was no details coming , i got one empty line thats it .
I have seen many links available in the forum. but not helpful , please explainhi andre .
i am also facing same problem .......
my context is like ......
folder
| folder_content (recurcive node)
| file
| | file attribute
| folder attribute.
can u plz tell me about recurcive node .... if have any doc. then plz give the link ....
thanks . -
Expansion of Child table rows under each master table rows
Hi,
I am using JDeveloper 11.1.1.5 version for developing ADF application.
I need to display a master table rows and its child table rows such that
When I expand master table row, I need to display child rows under the master row which is I expanded.
Like this each master table row should expand its child rows between the next master table row (like ShowDetail or detailStamp)
So kindly suggest ideas on what can be used to bring out this requirement on page.
If any links available for reference or guidance , kindly mention it and help me out.
Thanks,
VinoYou can use a tree table for this. A sample you can find at http://andrejusb.blogspot.ch/2009/11/tree-table-component-in-oracle-adf.html
or http://dstas.blogspot.ch/2011/11/master-detail-detail-using-tree-table.html
Timo -
DidSelectRowAtIndexPath causes my app to crash
Hi,
I'm just learning Cocoa. I've implemented a tab bar, and the first view (a UIViewController) contains a table view. I've implemented a separate class as the tableview datasource and delegate. Everything works fine, until I add either didSelectRowAtIndexPath or accessoryButtonTappedForRowWithIndexPath. Even if these methods have absolutely no code in them, just adding their implementation to my delegate creates a problem: when I click on a table row or on the disclosure button, my app breaks, and when I "step into" the code, it crashes with a “EXCBADACCESS”. I do not have any symbolic breakpoints defined.
Here's the error I see in gdb:
Loading program into debugger…
GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26 08:14:40 UTC 2008)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin".warning: Unable to read symbols for "/System/Library/Frameworks/UIKit.framework/UIKit" (file not found).
warning: Unable to read symbols from "UIKit" (not yet mapped into memory).
warning: Unable to read symbols for "/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics" (file not found).
warning: Unable to read symbols from "CoreGraphics" (not yet mapped into memory).
Program loaded.
sharedlibrary apply-load-rules all
Attaching to program: `/Users/Beth/Library/Application Support/iPhone Simulator/User/Applications/24242BF8-FA78-4360-A519-593EC497D8CE/NDQ.app/NDQ', process 237.
Program received signal: “EXCBADACCESS”.
I currently suspect one of two things, but honestly, have no idea what is causing the problem. I suspect that either, because I'm not using a Navigation controller, it's looking for a stack, but not finding one. Or I haven't hooked something up right in IB.
As I mentioned, the table is working fine without these method implementations - that is, it is displaying some simple string data and without those method implementations, I can click on a table row and of course, nothing happens, but it doesn't crash.
Thanks so much in advance for any help.
ElisabethElisabeth Freeman wrote:
I've made a lot of progress since I last posted!
I can see that!!
I have set the View Controllers property (using IB) to the Navigation Controller (topicsTableNavController in the code below) for the first tab.
Neither your code nor your IB conections should set the navigationController property of a view controller. That property is set by the nav controller when the vc is pushed onto its stack. Your code can then use the property to get the nc's address when it wants to push another vc onto the stack.
Then, I have set the view (through IB) of the Navigation Controller to the Table View Controller.
Similarly, you should normally consider nc.view to be read only. The nc's view content is a composite of the nav bar and the top vc's view. It's managed by the nc, so neither your code nor your IB connections should change nc.view.
I think you've simply made a wrong (and very common!) assumption about the relationship between a nav controller and the view controllers it manages: The nc's view is the one that needs to be added to the hierarchy (the tab view in this case). The vc's view is then added to the nc's view, not the other way around. So when we visualize the relationship, the nav controller is always the parent of the view controllers that are pushed on and popped from its stack.
Since you defined your controllers and their connections in IB, the solution you're looking for is in the xib file, not your code. It turns out that IB already knows the correct structure, so it's deceptively easy to build it. That can make it harder to learn what's going on, so you're lucky you managed to scramble the stucture this time, else you might have never learned it.
Try building a new test bed in IB as follows:
1) File->New Project->iPhone OS->Application->Tab Bar Application;
2) Open MainWindow.xib in IB and bring up the window named MainWindow.xib (Window->Document);
3) Switch View Mode (upper left corner) to the center position (2 columns with small-icon tree view to the left);
4) Expand Tab Bar Controller and select (not expand) the first View Controller so it's highlighted in blue;
5) Delete the first View Controller by pressing the Delete key or Edit->Delete while that controller is highlighted;
6) Drag a Navigation Controller to the MainWindow.xib tree (Tools->Library->Objects->Controllers);
7) Position the nav controller over the tab bar controller icon until the tbc is shaded and outlined;
8) Drop the nc so that the tbc becomes its parent--i.e. the nc takes the place of the deleted vc;
9) Expand the nc and expand its child root controller to see the structure;
10) Select the root vc, open the Attributes panel (Tools->Attributes Inspector) and enter a title for the root vc;
11) If you want to define the root vc's view in it's own xib, enter a name for the new xib;
12) else you can now drag a view (e.g. UIView or UITableView from the library onto the root vc's icon;
13) If you want the root vc to be a UITableViewController. go back to step 10 and replace the root UIViewController;
14) After you have the structure you want, right click on each icon to see the connections IB has already made.
Btw, if you decide to make a separate xib in step 11, make sure you set the controller's class id in both MainWindow.xib and the new xib. I.e. both the icon that creates the controller and its proxy need to have the same class (else you get a very common crash).
I'm counting on you to let me know if the above is as clear as mud, ok? I've recently tried to help in two other threads that involved the same misunderstanding about nav controllers. Start reading each of these threads at the quoted paragraph:
The reason your current code isn't producing the transition you expect is that the tab bar has attached the table controller's view to the hierarchy (i.e. using addSubview) instead of the nav controller's view. You want the nav controller's view because that's the one which will change when you push a new controller. [http://discussions.apple.com/thread.jspa?messageID=9592005�];
It's the nav controller's view that contains the content view, not the other way around. This point is worth taking a moment to see, and it seems to be commonly misunderstood. [http://discussions.apple.com/message.jspa?messageID=9607946#9607946]. -
Displaying custom drawn panels in a panel with FlowLayout vs GridLayout
I am having trouble to display my custom panels(on which I have drawn) in another panel with FlowLayout. When I use this layout only a small part of their top-left corner appears, when using the GridLayout they are displayed as should, all. Why is this? Is there any way around it?
The following is the code:
package diagramillustrator;
import java.awt.*;
import java.util.Vector;
import javax.swing.*;
public class ClassDiagram extends JPanel
//fields
//<editor-fold>
//general info
public String title = "class";
public String name;
public Vector interfaces;
public Vector exceptions;
public String superclass;
public Vector subClasses;
public boolean superClass;
public boolean subClass;
public String dPackage;
public String dExtends;
//variables
public FieldStructure field;
//methods
public MethodStructure constructor;
public MethodStructure metho;
//</editor-fold>
/** Creates a new instance of ClassDiagram */
public ClassDiagram()
super();
super.setSize(132,75);
protected void paintComponent(Graphics g)
setBackground(Color.WHITE);
Graphics2D g2d = (Graphics2D) g;
super.paintComponent(g2d);
g2d.setStroke(new BasicStroke(2f));
g2d.drawRect(1,1,132,25);
g2d.setFont(new Font("arial", Font.BOLD, 12));
g2d.drawString(title, 4,18);
g2d.setColor(Color.LIGHT_GRAY);
g2d.fillRect(1,25,132,25);
g2d.setColor(Color.BLACK);
g2d.drawRect(1,25,132,25);
g2d.setColor(Color.WHITE);
g2d.fillRect(1,51,132,25);
g2d.setColor(Color.BLACK);
g2d.drawRect(1,50,132,25);
public static void main(String[] args)
JFrame f = new JFrame("Testing ClassDiagram");
f.setSize(500,400);
//layout shows it correctly
JPanel panel1 = new JPanel(new GridLayout());
//layout shows it incorrectly
//JPanel panel1 = new JPanel(new FlowLayout());
panel1.setSize(200,200);
ClassDiagram c1 = new ClassDiagram();
ClassDiagram c2 = new ClassDiagram();
ClassDiagram c3 = new ClassDiagram();
panel1.add(c1);
panel1.add(c2);
panel1.add(c3);
f.add(panel1);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.show();
}Here is the main method included in the class(the main method is used for testing here) where the adding etc is done.
public static void main(String[] args)
JFrame f = new JFrame("Testing ClassDiagram");
f.setSize(500,400);
//layout shows it correctly
JPanel panel1 = new JPanel(new GridLayout());
//layout shows it incorrectly
//JPanel panel1 = new JPanel(new FlowLayout());
panel1.setSize(200,200);
ClassDiagram c1 = new ClassDiagram();
ClassDiagram c2 = new ClassDiagram();
ClassDiagram c3 = new ClassDiagram();
panel1.add(c1);
panel1.add(c2);
panel1.add(c3);
f.add(panel1);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.show();
}Please help.
Thanks,
AndXerLayout managers.
JPanel panel1 = new JPanel(new GridLayout());GridLayout divides the availabale space into equal cells and expands each child component to fill the cell.
JPanel panel1 = new JPanel(new FlowLayout());FlowLayout attempts to show each child component at its preferred size. The preferredSize is determined by the layout manager in the process of laying out the children. For a graphic component, ie, a component with no child components, the request for the components preferredSize will return the default size which is 10,10 for JPanel. Therefore you will need to either set the preferredSize for the gtaphic component or override the getPreferredSize method and return the desired Dimension. Another limitation of FlowLayout is that it attempts to lay its children out in–line.
GridBagLayout also respects the preferredSize of child components and offers more versatility.
import java.awt.*;
import javax.swing.*;
public class CD extends JPanel
public String title = "class";
public CD()
super();
setPreferredSize(new Dimension(132,75));
setBackground(Color.WHITE);
protected void paintComponent(Graphics g)
Graphics2D g2d = (Graphics2D) g;
super.paintComponent(g2d);
g2d.setStroke(new BasicStroke(2f));
g2d.drawRect(1,1,130,25);
g2d.setFont(new Font("arial", Font.BOLD, 12));
g2d.drawString(title, 4,18);
g2d.setColor(Color.LIGHT_GRAY);
g2d.fillRect(1,25,130,25);
g2d.setColor(Color.BLACK);
g2d.drawRect(1,25,130,25);
g2d.setColor(Color.WHITE);
g2d.fillRect(1,51,130,25);
g2d.setColor(Color.BLACK);
g2d.drawRect(1,50,130,25);
public static void main(String[] args)
JPanel panel1 = new JPanel(new GridBagLayout());
// This has little affect until after realization and
// is then subject to its parent layout manager. Use
// the preferredSize for better results.
//panel1.setSize(200,200);
GridBagConstraints gbc = new GridBagConstraints();
gbc.insets = new Insets(5,5,5,5);
gbc.weightx = 1.0;
gbc.weighty = 1.0;
// Add some components
int n = 5;
// and specify columns
int cols = 3;
for(int j = 0; j < n; j++) {
gbc.gridwidth = ((j+1) % cols == 0) ? GridBagConstraints.REMAINDER
: 1;
panel1.add(new CD(), gbc);
JFrame f = new JFrame("Testing ClassDiagram");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.add(panel1);
f.setSize(500,400);
f.setLocation(200,200);
f.setVisible(true);
} -
Custom DefaultTreeCellRender not rending node labels correctly.
In our JTree we need to display the state of our custom nodes, the state can be cycled by the user clicking on the node. Our problem is that since upgrading from Java 1.4 if a node is clicked before it is expanded the child nodes will not be rendered correclty, some nodes may not have the label showing, some may not have the label or icon showing.
Under Java 1.4 the following code works correctly.
Under Java 1.5 and 1.6 If you click on a node before expanding it (which changes the node's icon) then expand the node the child nodes are not completely rendered, some may be missing a icon or label or both.
package com.test;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.Box;
import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JPanel;
import javax.swing.JTree;
import javax.swing.UIManager;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeCellRenderer;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreePath;
* Example to demonstate differences between Java 1.4 and Java 1.5/1.6
* node rendering.
* <p>
* Under Java 1.4 nodes are always rendered correctly.
* <p>
* Under Java 1.5 and 1.6 If you click on a node before expanding it (which
* results in the icon changing) then expand the node not all child nodes
* will be fully rendered.
public class TreeNodeRenderExample extends javax.swing.JFrame {
private static final long serialVersionUID = 7963956320358601702L;
private JTree tree1;
* Entry point.
* @param args Arguments are ignored.
public static void main(String[] args) {
TreeNodeRenderExample inst = new TreeNodeRenderExample();
inst.setVisible(true);
* Constructor.
* <br>
* Create a instance of TreeNodeRenderExample.
public TreeNodeRenderExample() {
super();
initGUI();
populateTree();
postInitGUI();
* Create the Frame and JTree.
private void initGUI() {
try {
this.setTitle("Checkbox node Render Example");
tree1 = new JTree();
getContentPane().add(tree1, BorderLayout.CENTER);
setSize(400, 300);
} catch (Exception e) {
e.printStackTrace();
* Add the custom cell renderer and a mouse listener.
private void postInitGUI() {
tree1.setCellRenderer(new NodeRenderer());
tree1.addMouseListener(new TreeMouseClickSelectionListener(tree1));
* Populate the tree.
private void populateTree() {
TreeNode root = new TreeNode("Render Example");
TreeNode colourNode = new TreeNode("Colours");
TreeNode modelNode = new TreeNode("Models");
colourNode.add(new TreeNode("Black"));
colourNode.add(new TreeNode("White"));
colourNode.add(new TreeNode("Blue"));
modelNode.add(new TreeNode("Ford"));
modelNode.add(new TreeNode("Fiat"));
modelNode.add(new TreeNode("Nissan"));
root.add(modelNode);
root.add(colourNode);
tree1.setModel(new DefaultTreeModel(root));
* Custom tree node to allow the icon to be changed when the node
* is clicked.
* <p>
* This is a simple example, our custom nodes hold much more state
* information and get node children on the fly.
class TreeNode extends DefaultMutableTreeNode {
private static final long serialVersionUID = 7527381850185157388L;
* Constructor.
* <br>
* Create a instance of TreeNode.
* @param name Tree node display name.
public TreeNode(String name) {
this.name = name;
this.state = "u";
* Just cycle through some states so that the icon can
* can be changed depending on how may 'clicks' on the node.
public void updateSelectionStatus() {
if (state.equals("u")) {
state = "s";
} else if (state.equals("s")) {
state = "d";
} else if (state.equals("d")) {
state = "u";
* Get the icon to be used for the check box, shows the current
* state of a node to the user.
* @return A icon.
public Icon getIcon() {
Icon icon = null;
if (state.equals("u")) {
icon = UIManager.getIcon("FileView.directoryIcon");
} else if (state.equals("s")) {
icon = UIManager.getIcon("FileView.fileIcon");
} else if (state.equals("d")) {
icon = UIManager.getIcon("FileView.computerIcon");
return icon;
* String representation of a node.
* @see javax.swing.tree.DefaultMutableTreeNode#toString()
public String toString() {
return name;
private String name;
private String state;
* Custom node render, adds a checkbox in front of the node, could be
* any object that we can change the icon for, this will show the
* user the current state of the selected node.
class NodeRenderer extends DefaultTreeCellRenderer {
private static final long serialVersionUID = -7358496302112018405L;
protected JCheckBox checkBox = new JCheckBox();
//protected JButton checkBox = new JButton();
private Component strut = Box.createHorizontalStrut(5);
private JPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER,0,0));
* Constructor.
public NodeRenderer() {
setOpaque(false);
this.checkBox.setOpaque(false);
this.panel.setBackground(UIManager.getColor("Tree.textBackground"));
this.panel.setOpaque(false);
this.panel.add(this.checkBox);
this.panel.add(this.strut);
this.panel.add(this);
* Render the label, then change the icon if necessary.
* @see javax.swing.tree.DefaultTreeCellRenderer#getTreeCellRendererComponent(javax.swing.JTree, java.lang.Object, boolean, boolean, boolean, int, boolean)
public Component getTreeCellRendererComponent(JTree tree, Object value,
boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus)
super.getTreeCellRendererComponent(tree, value,
sel, expanded, leaf, row, hasFocus);
updateDisplayedStatus((TreeNode)value);
return this.panel;
* Set the node's icon.
* @param node Rendered node.
private void updateDisplayedStatus(TreeNode node) {
this.checkBox.setIcon(node.getIcon());
* Listener to allow cycling of node states by clicking on the node.
class TreeMouseClickSelectionListener extends MouseAdapter {
private JTree tree;
private int hotspot = new JCheckBox().getPreferredSize().width;
* Constructor.
* <br>
* Create a instance of TreeMouseClickSelectionListener.
* @param tree Tree listener is attached to.
public TreeMouseClickSelectionListener(JTree tree) {
this.tree = tree;
* Cycle the state of a clicked node.
* @see java.awt.event.MouseAdapter#mouseClicked(java.awt.event.MouseEvent)
public void mouseClicked(MouseEvent me) {
int x = me.getX();
int y = me.getY();
int row = tree.getRowForLocation(x, y);
TreePath path = tree.getPathForRow(row);
if (path != null)
if(x <= tree.getPathBounds(path).x + hotspot)
TreeNode node = (TreeNode) path
.getLastPathComponent();
if (node != null)
node.updateSelectionStatus();
tree.repaint();
}I can't recreate your problem. I'm running 1.5.0_09. When I open the program and JUST expand the nodes I see all "file" icons and all the labels work correctly. If i Select a node before expanding it, I get the same result.
What Am I supposed to witness happening?
-Js
Maybe you are looking for
-
What cable do I need to connect my MacBook Pro 17 inch to an Epson EX71 Projector
My old MacBook Pro had a video adaptor port that is no longer on the newest MacBook Pro that I purchased in June 2011. Not sure which cable I need.
-
How do I add hotmail.co.uk to my ipad 2
Hi guys Hope you all had a fab Xmas Does anyone know how I add a hotmail.co.uk email address to my ipad 2 please Thank you
-
SAP R/3 4.7 EX 2 SR1 - IDES (Unicode), Problem during DB load
Dear Experts, Details of the system: Solaris 10, Oracle 9.2.0.7. R/3 Enterprise 4.7 X 2 SR1 - IDES (Unicode) Please help me in solving this problem. I have received this error during DB load Phase 25/37. Errors are related to code page conversion fai
-
I had a word document from my Microsoft office. When extracting it to edit on my MAC, i realize that pages has omitted the table of content. The table of content was obvious so I noted it. My fear was, that there are other things that get omitted of
-
Title explains. Also, I tried disconnecting it and then reconnecting it, but no luck. I am writing to you on my iPod touch(5th gen ) so as you can see it has Internet access.