Invalidate( ) doesn't invalidate child nodes
Hello everyone,
I've created context nodes dynamically through:
new_node = node_info->add_new_child_node( name = nodename
is_singleton = abap_false
is_multiple = abap_false
is_mandatory = abap_true
is_initialize_lead_selection = abap_true
is_static = abap_false ).
I've then invalidated the parent node through:
lo_nd_contract = wd_context->path_get_node( path = `CONTRACT` ).
lo_nd_contract->invalidate( ).
lo_nd_contract = wd_context->path_get_node( path = `CONTRACT.COMPANY_CONTACTS.COMPANY_CONTACT_1` ).
lo_el_contract = lo_nd_contract->get_element( ).
lo_el_contract->get_attribute(
EXPORTING
name = `COMPANY_CONTACT_1`
IMPORTING
value = lv_company_contact_0 ).
but the variable lv_company_contact_0 still retains the old value.
Any ideas as to what's going on?
Thank you!
Edited by: Development Themis on May 3, 2011 6:25 PM
I've fixed the problem.
> The thing is that I created the node as
is_mandatory = abap_true
and the node was not deleted (actually it disappeared from the context in the Debug but appeared back in whenever I tried to access it).
If you understand the purpose of these properties while creating dynamic nodes , you will not run into issues again.
IS_MENDATORY --> Used to specify lower canrdinality
IS_MULTIPLE --> used to specify higher cardinality
So by specifying is_mandatory = abap_true , you had set lower cardinality to 1 and that caused the problem.
Regards,
Ashish Shah
Similar Messages
-
GetChildNodes() doesn't returns child nodes
I have an element "logic" [Element logic] which printed looks like this:
<logics>
<start-element>
<trace attrName="id"/>
</start-element>
<end-element/>
</logics>
When I call "NodeList list = logic.getChildNodes()", list length is 0. "getFirstChild()" isn't working too. Why ?I have found an error. I am sorry about wasting your time
-
Inconsistent results for adding child node in a JTree
I have a JTree where I add child nodes when a user clicks on the node or handle. When the user clicks on the node, through implementing TreeSelectionListener interface, I add a node, the tree expands, and I see the newly added node. However, when the user clicks on the handle, through implementing the TreeExpansionListener, the tree does not expand and I do not see the newly added node. The problem is repeatable by compiling the code below.
Why is there this difference? Aren't all the methods implemented through the TreeSelectionListener and TreeExpansionListener in the SWT thread?
public class TestFrame extends JFrame implements TreeSelectionListener, TreeExpansionListener {
public TestFrame() {
String[] alphabets = {
"a", "b", "c", "d", "e", "f", "g",
"h", "i", "j", "k", "l", "m", "n",
"o", "p", "q", "r", "s", "t", "u",
"v", "w", "x", "y", "z"
DefaultMutableTreeNode top = new DefaultMutableTreeNode("CEDICT");
for(int i=0; i < alphabets.length; i++) {
DefaultMutableTreeNode node =
new DefaultMutableTreeNode(alphabets) {
public boolean isLeaf() { return false; }
top.add(node);
JTree tree = new JTree(top);
tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
tree.addTreeSelectionListener(this);
tree.addTreeExpansionListener(this);
tree.setShowsRootHandles(true);
JScrollPane treePane = new JScrollPane(tree);
treePane.setHorizontalScrollBarPolicy(
JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
treePane.setVerticalScrollBarPolicy(
JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
treePane.setSize(new Dimension(200,400));
treePane.setPreferredSize(new Dimension(200,400));
getContentPane().setLayout(new BorderLayout());
getContentPane().add(treePane, BorderLayout.CENTER);
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
int inset = 50;
setBounds(inset, inset,
screenSize.width - inset*2,
screenSize.height - inset*2);
setLocationRelativeTo(null);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
pack();
show();
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
JFrame.setDefaultLookAndFeelDecorated(true);
TestFrame frame = new TestFrame();
public void valueChanged(TreeSelectionEvent e) {
JTree tree = (JTree)e.getSource();
DefaultMutableTreeNode node =
(DefaultMutableTreeNode) tree.getLastSelectedPathComponent();
System.out.println(node);
Date date = new Date();
node.add(new DefaultMutableTreeNode(date.toString()));
public void treeCollapsed(TreeExpansionEvent event) {
JTree tree = (JTree)event.getSource();
TreePath path = event.getPath();
DefaultMutableTreeNode node =
(DefaultMutableTreeNode) path.getLastPathComponent();
System.out.println(node);
Date date = new Date();
node.add(new DefaultMutableTreeNode(date.toString()));
tree.invalidate(); //does not help to show newly added child
public void treeExpanded(TreeExpansionEvent event) {
JTree tree = (JTree)event.getSource();
TreePath path = event.getPath();
DefaultMutableTreeNode node =
(DefaultMutableTreeNode) path.getLastPathComponent();
System.out.println(node);
Date date = new Date();
node.add(new DefaultMutableTreeNode(date.toString()));
tree.invalidate(); //does not help to show newly added childI couldn't figure out why inserting a node in the valueChanged(...) method works. In all three methods no listeners are notified about the change, so you would think all three would fail.
For a JTree using the DefaultTreeModel the nodesWereInserted(...) method needs to be called. For example, if I change your last three methods to this
public void valueChanged(TreeSelectionEvent e) {
insertNode((JTree) e.getSource(),
(MutableTreeNode) e.getPath().getLastPathComponent());
public void treeCollapsed(TreeExpansionEvent event) {
insertNode((JTree) event.getSource(),
(MutableTreeNode) event.getPath().getLastPathComponent());
public void treeExpanded(final TreeExpansionEvent event) {
insertNode((JTree) event.getSource(),
(MutableTreeNode) event.getPath().getLastPathComponent());
public void insertNode(JTree tree, MutableTreeNode parent) {
Date date = new Date();
MutableTreeNode child = new DefaultMutableTreeNode(date.toString());
int index = parent.getChildCount();
parent.insert(child,index);
((DefaultTreeModel) tree.getModel())
.nodesWereInserted(parent,new int[]{index});
}then it works as you desire. You can (and should) of course use the DefaultTreeModel's own insert method.
DefaultTreeModel#insertNodeInto(MutableTreeNode,MutableTreeNode, int) -
ADF Tree setting focus back to parent node after deletion of child node
Hi,
Is there a way to get the focus back to the parent node (or rather any particular node) in a tree?
I have a use case where we need to get the focus back to the parent node after a child node is deleted.
Currently the focus is shifted to the next node in the tree, but the need is to get the focus shifted back to the parent node. Also the parent node should be re-invoked to populate to get the latest status after deletion of the child node.
Any help/pointers?
ThanksThanks for the reply Frank.
I saw the link http://sreevardhanadf.blogspot.in/2012/07/showing-next-row-as-current-row-after.html
However the issue is since I am using custom created tree using POJO tree item (composite object).
calling myTree.getWrappedData() doesn't gives me a handle to JUCtrlHierBinding and subsequent access to JUCtrlHierNodeBinding.
my program gives me data like -
List<MyTreeItem> treeData = (List<MyTreeItem>)treeModel.getWrappedData();
because my tree model is build using -
treeModel = new ChildPropertyTreeModel(items, "children");
where items is List of <MyTreeItem>
Hence I am unable to get a handle using -
List nodeParentList = nodeParent .getKeyPath();
I am programmatically able to invoke the parent node to get the fresh data, only issue is the focus/selection of that node is not happening
Is there a way around?
Thanks
Sachin -
Refresh Child Nodes of an af:treeTable
I have two VOs with a master/detail relationship defined with a View Link. The master VO has a bind variable to change which set of master rows to return.
I have an af:panelStretchLayout. The top facet has a form created by dragging the ExecuteWithParms from the Data Control for the master VO as a parameter form, and the center facet has an af:treeTable derived from the master VO with child nodes derived from the detail VO.
When you see this on first page load, it is right: bind variable was set from the default for the bind variable, tree table shows correct information.
But when I choose a different value for the bind variable and click the button to re-execute the query, the parent nodes are refreshed, but any parent nodes that weren't in the initial query results have no children, even though there ARE child rows in the database. In short, it re-queries the master VO, refreshes the treeTable, but does NOT re-query the detail VO.
Now, I know that this is expected behavior - for better performance, ADF caches results and since the initial query didn't include children for these parents, there is no data to show. So my first thought was to add CacheResults="false" to the iterator. Nope. Tried a few different settings for Refresh attribute - nope (since the parent nodes ARE refreshing, I figured this wouldn't help, but it was worth a try). I tried the following method in the backing bean based on a suggestion in a blog entry:
* Executes the query with the new parameter, then requeries the codes for each category.
* @param actionEvent
public void requeryServices(ActionEvent actionEvent) {
DCBindingContainer bindings = (DCBindingContainer)JSFUtils.resolveExpression("#{bindings}");
// First execute the query for the Categories
bindings.getOperationBinding("ExecuteWithParams").execute();
// Get the iterator and its View Object
DCIteratorBinding categoriesViewIterator = bindings.findIteratorBinding("ServiceCategoriesView1Iterator");
ViewObject categoriesView = categoriesViewIterator.getViewObject();
// From the VO, get all the category rows.
Row[] categoryRows = categoriesView.getAllRowsInRange();
// For each category, find the ViewLinkAccessor, and execute the query for the codes.
for (Row thisCategory : categoryRows) {
RowSet codes = (RowSet)thisCategory.getAttribute("ServiceCodesView");
codes.executeQuery();
// Refresh the treeTable
AdfFacesContext.getCurrentInstance().addPartialTarget(getServicesSelectionTree());
}This doesn't work either - same results - parent is re-queried, children are not.
What should I try next to get the child nodes to refresh?Sure, I know that I can get the binding container the other way - the sample code I was copying just happened to use JSFUtils, and I just happened to have it.
Using JDev 11.1.2.3.
The code I showed was just one of the ways I tried to solve this. The problem is that when I do an ExecuteWithParams on the tree binding, the children of that tree don't get re-executed. Suppose I have a tree table that looks like this when the page first displays and the tree is expanded:
Item One
<ul>
<li>Child OneDotOne</li>
<li>Child OneDotTwo</li>
<li>Child OneDotThree</li>
</ul>
Item Two
<ul>
<li>Child TwoDotOne</li>
<li>Child TwoDotTwo</li>
<li>Child TwoDotThree</li>
</ul>
Item Four
<ul>
<li>Child FourDotOne</li>
<li>Child FourDotTwo</li>
<li>Child FourDotThree</li>
</ul>
Now I re-execute the parent query (using ExecuteWithParams) and give it a parameter that should give me:
Item Two
<ul>
<li>Child TwoDotOne</li>
<li>Child TwoDotTwo</li>
<li>Child TwoDotThree</li>
</ul>
Item Three
<ul>
<li>Child ThreeDotOne</li>
<li>Child ThreeDotTwo</li>
<li>Child ThreeDotThree</li>
</ul>
Item Four
<ul>
<li>Child FourDotOne</li>
<li>Child FourDotTwo</li>
<li>Child FourDotThree</li>
</ul>
But what I actually get is:
Item Two
<ul>
<li>Child TwoDotOne</li>
<li>Child TwoDotTwo</li>
<li>Child TwoDotThree</li>
</ul>
Item Three
Item Four
<ul>
<li>Child FourDotOne</li>
<li>Child FourDotTwo</li>
<li>Child FourDotThree</li>
</ul>
Notice that even though Item Three has children, they don't show. The difference is that Items Two and Four were in the original results, but Item Three wasn't. If I browse the VOs in the AM Tester, Item Three's children show when I execute the parent with different parameters.
I suppose I could try to replicate this problem with the HR schema. I'll try it Monday. -
Problem when selecting child node in Hierarchical Tree
I have a hierarchical tree on a form populated thru a table query(form1). When I click on a child node, it opens form2 which contains a tab canvas. After closing forms, I return to the form1(containing Tree). At this point If I want to click on the same child node, I should be able to open form2 again. This doesn't happen.
I have the following code in my When-Tree-node_selected trigger:
Declare
htree item;
vnode_label varchar2(50);
node_clicked FTREE.NODE;
vnode_value number;
vnode_depth number;
v_type number;
v_value varchar2(100);
v_form_name varchar2(100);
v_alert_return number;
begin
-- Find the tree itself.
htree := FIND_ITEM('tree_block.tree');
node_clicked := :SYSTEM.TRIGGER_NODE;
vnode_value := FTREE.NODE_label;
-- Find the value of the node clicked on.
vnode_label := FTREE.GET_TREE_NODE_PROPERTY (htree,:SYSTEM.TRIGGER_NODE,FTREE.NODE_label);
vnode_depth := to_number(ftree.get_tree_node_property(htree,:SYSTEM.TRIGGER_NODE,ftree.Node_depth));
--Open form for node selected on tree and/or specific tab page
if vnode_depth <> 1 then
if :system.trigger_node_selected = 'TRUE' then CASE vnode_label
WHEN 'Personal' then
v_form_name :='HR_PERSONAL_INFO_UPDATE';
WHEN 'Citizenship' then
v_form_name :='HR_PERSONAL_INFO_UPDATE';
WHEN 'Emergency Contact' then
v_form_name :='HR_PERSONAL_INFO_UPDATE';
if id_null(Find_form(v_form_name)) then
open_form(:global.application_path || v_form_name,ACTIVATE,NO_SESSION,SHARE_LIBRARY_DATA);
else
go_form(v_form_name);
end if;
END IF;
elsif vnode_depth = 1 then
if :system.trigger_node_SELECTED = 'TRUE' then CASE vnode_label
WHEN 'EMPLOYEE INFO' then
v_form_name :='HR_PERSONAL_INFO_UPDATE';
vnode_label := 'Personal';
WHEN 'REPORTS' then
v_form_name :='HR_REPORTS';
vnode_label := '';
if id_null(Find_form(v_form_name)) then
v_form_name := :global.application_path || v_form_name;
open_form(v_form_name,ACTIVATE,NO_SESSION,SHARE_LIBRARY_DATA);--,p_list);
else
go_form(v_form_name);
end if;
end if;
end;
Can anyone please help me? I don't want the user to double click. They should only click once.
Thanks,
MercedesRight clicking does not change the current selection. The tree has no way to report what node was right clicked. Only work around is to left click the node you wish then right click it.
--pat -
Xpath: get attributes from first child node
Hi,
I have some problems by getting the attributes from the first child node, if i try to get child elements everything works fine, but whenever i need the elementvalue from a node with attributes i doesn't return anything.
The xpath expression works fine if i want to get the element value from all childs, but not when i just want from one of them.
This one works,
XPathFactory factory1 = XPathFactory.newInstance();
XPath xpath = factory1.newXPath();
xpath.setNamespaceContext(new PersonalNamespaceContext());
XPathExpression expr
= xpath.compile("//default:DeviceExchange[1]/default:Status/text()");
// gets the value of the node picked out
Object result = expr.evaluate(doc, XPathConstants.NODESET);
NodeList nodes = (NodeList) result;
for (int i = 0; i < nodes.getLength(); i++) {
names[i] = nodes.item(i).getNodeValue();
String a = names;
// checks if status is exchanged, if it is sets status to 1
if (a.length() == 9){
names[i] = "1"; }
else{ names[i] = "0";}
System.out.println(names[i]);This doesn'tXPathFactory factory2 = XPathFactory.newInstance();
XPath xpath2 = factory2.newXPath();
xpath2.setNamespaceContext(new PersonalNamespaceContext());
XPathExpression expr2 = xpath2.compile("//default:DeviceExchange[1]/default:Field[@names='MLPKTID']/text()");
Object result2 = expr2.evaluate(doc, XPathConstants.NODESET);
NodeList nodes2 = (NodeList) result2;
for (int i = 0; i < nodes2.getLength(); i++) {
names2[i] = nodes2.item(i).getNodeValue();
System.out.println(names2[i]);}Does anyone have any ideas? I will apreciate all help!
Edited by: fusen on Oct 25, 2007 1:12 AMSorry, solved myself. Just � typo that that i couldn't detect.
-
Drag Child node to make it a Parent Node
Hello All
I have implemented Drag -Drop functionality in my tree. Which
consists of root and child nodes. I hide the Root node of the tree now
is there any way to make a child node as a parent node because when I
drag the child node in backward( <--) direction at the level of parent
node no drop method calls in this case then how can I make this child
node a parent node ????? I will be very thankful to your for your kind
suggestion
Regards
Sunny KhanAh
I think it is actually an Apple App switcher thing.
So if the finder window does noy cover the After Effects Project window, it works, but if you have to use the app switcher, sometimes it works and sometimes it doesn't.
I don't think it is a file type issue, so much as a live application issue, or maybe GPU related.
It's a weird thing, not that important, but it does limit where you can and can't drag from.
Tris -
How to retrieve a child node's immediate parent node from a tree table?
Hello
Hi,
I have a category_subcategories table, and I would like to know how to construct a sql and sub-sql for retrieving a child node's immediate parent node.
Here is my first part of the sql, it only returns the node "Flash"'s parent and its grand-parents:
SELECT parent.category_name, node.lft, node.rgt
FROM category_subcategories AS node,
category_subcategories AS parent
WHERE node.lft > parent.lft AND node.lft < parent.rgt
AND node.category_name = 'FLASH'
ORDER BY parent.lft;
| name |
| ELECTRONICS |
| PORTABLE ELECTRONICS |
| MP3 PLAYERS | |
how can I modify this query so that it returns Flash' parent - 'MP3 Players'?
Thanks a lot
SamHi,
This is an Oracle forum. If you're not iusing Oracle, make that clear. Always say what version of your softwate you're using, whether it's Oracle or anything else.
Whenever you have a question, post a little sample data (CREATE TABLE and INSERT statements), and the results you want from that data. Explain how you get those results from that data.
It looks like you're using the Nested Sets technique for modeling a tree. To get the parents of given nodes, do something like this:
SELECT parent.category_name
, node.lft
, node.rgt
FROM category_subcategories node -- Can't use AS with table alias in Oracle
, category_subcategories parent
WHERE parent.lft IN (
SELECT MAX (lft)
FROM category_subcategories
WHERE lft < node.lft
AND rgt > node.rgt
AND node.category_name = 'FLASH'
ORDER BY parent.lft; This should work in Oracle 8.1 and up. (I can't actually test it unless you post CREATE TABLE and INSERT statements for some sample data). You may need to modify the syntax a little for your database.
785102 wrote:
Hello,
I tried to implement the solution as follow:
mysql> select parent.*
-> from category_subcategories as parent
-> having parent.lft =
-> (select max(parent.lft) from
-> (SELECT parent.category_name, parent.lft, parent.rgt
-> FROM category_subcategories AS node,
-> category_subcategories AS parent
-> WHERE node.lft > parent.lft AND node.lft < parent.rgt
-> AND node.category_name = 'Sofa'
-> ORDER BY parent.lft
-> )
-> );
ERROR 1248 (42000): Every derived table must have its own alias
mysql>
But I got an error.
What is wrong with it?What does the error message say?
Apparantly, in your system (unlike Oracle), every sub-query must have a name. Try something like this:
select parent.*
from category_subcategories as parent
having parent.lft = (
select max(parent.lft)
from (
SELECT parent.category_name
, parent.lft
, parent.rgt
FROM category_subcategories AS node,
category_subcategories AS parent
WHERE node.lft > parent.lft
AND node.lft < parent.rgt
AND node.category_name = 'Sofa'
ORDER BY parent.lft -- Is this a waste of effort?
) AS got_name_lft_and_rgt
) AS got_lft
;What is the purpose of having the inner sub-query, the one I called got_name_lft_and_rgt?
Also, in Oracle, an ORDER BY clause in a sub-query doesn;t guarantee that any super-queries will keep that order. Why do you have an ORDER BY clause in the sub-query, and not in the main query? -
Table with DropDownBox with data from child node
Hi,
I have following context:
Node Parent (0..n)
-- Node Child (0..n)
Child Attribute 1
Child Attribute 2
-- Parent Attribute 1
-- Parent Attribute 2
The parent node has a child node with cardinality 0..n. Now I created a table from the Parent node with several columns. In one column is a
DropDownBox that should display the data of the Child node, depending on the Parent node element.
Parent | Parent DropDownBox |
Parent 1 | Parent 1 Child Attribute 1 |
Parent 1 Child Attribute 2
Parent 2 | Parent 2 Child Attribute 1 |
Parent 2 Child Attribute 2
How can I fill the child node with data depending on the parent node element? How is the mapping between both?
IParentElement parentElement;
IChildElement childElement;
while (rs.next()) {
parentElement = wdContext.createParentElement();
parentElement.setAttribute1(rs.getLong("ID"));
parentElement.setAttribute2(rs.getString("SYSTEM"));
wdContext.nodeParent().addElement(parentElement);
while (rs2.next()){
childElement = wdContext.createChildElement();
childElement.setAttribute1(rs2.getLong("ID"));
childElement.setAttribute2(rs2.getString("NAME"));
wdContext.nodeChild().addElement(childElement);
If the child node is non-singleton I have the following option
parentElement.nodeChild.addElement(childElement);
But this doesn't work for singleton nodes. How can I do something similar for singleton nodes?
Thanks for your help,
AndiNot quite correct.
You can add more than one <b>element</b> to a singleton node (if cardinality is *:N).
But a singleton child node exists only once per parent <b>node </b>and not once per parent <b>element</b>.
That's an important difference.
Armin -
Hi All,
I am getting a problem when i call child node.
I created a nodeA,under that nodeB and attr in both nodes.
because i have button in table column that will take some details of current row.
How to do it
i give single ton false in nodeB.
when iam clicking button it is giving some values.
if i click button of 2nd row it is giving same values of first row.
when i select the row it is giving some values.but jest pressing the button it doesn't giving
Corresponding values.and also telll me how to call attributes of child node
if we use iprivate element.and how to update those elements.Plese help me.Hi Srikanth,
You can achieve the required result by using "parameter mapping" for the button which you are using inside table.
Follow the step
1.You need to put the below code in wdDoModifyView() :
IWDButton btn = (IWDButton) view.getElement(<ButtonID>);
btn.mappingOfOnAction().addSourceMapping("nodeElement","nodeElement");
2. create a parameter with the same name" nodeElement" in the onAction event of your button. The type of the parameter should be IWDNodeElement or type of your viewnode element.
At runtime it will pass the table node element for which you are pressing the button and you can get directly attribute value from this nodeelement also you can get the child node direclty form this element.
Regards
Ravindra -
Problem with childs nodes and automatic key mapping in a Data Object
Hi experts!
I'm doing the service order tutorial from the mobile help at [this link|http://help.sap.com/saphelp_nwmobile71/helpdata/en/21/9b5b924c3b434fba4767731794b029/frameset.htm] and I have a problem...
In the topic "Modeling the Equipment Data Object", says you have to mark the "Automatic Key Mapping" checkbox. So when I had to create a third child node ( the location node ) the system raised an exception with the message "Deselect automatic key mapping flag for more than two-level nodes". I'm trying deselecting the flag and creating the location node, but when I want mark again the automatic key mapping flag, this is disabled.
What can I do to solve this and create the three child nodes with the flag marked? It's a configuration thing?
Any help it's very welcome. Thanks in advance.
Best regards,
Simon.The thing is: Its not allowed to use automatic keymapping if you have more than two levels. This is why the message showed up, and this is why its been disabled.
What automatic keymapping does: Figures out automatically which child node belongs to which parent (by guessing from the field name and type, which fields in the child correspond to which key fields of the parent).
On three levels, this becomes more complicated => Its disabled.
How to do keymapping yourself instead of having the DOE do it automatically: Do 'Explicit keymapping' from each child to its parent. Explicit keymapping is done by clicking on the corresponding menu button in the child node. Here you need to associate child node fields (they need not be key fields of the child, but they are allowed to be that as well) to each of its parent nodes key fields (so that each child can be associated to its parent).
Cheers -
How do I create multiple types of child nodes in ADF Faces Tree Component
Hi,
I am trying to construct a tree using ADF Faces. The tree I am trying to develop should look something like:
- Departments
+ Dept 10
+ Dept 20
+ Dept 30
+ Dept 40
- Employees
+ SCOTT
+ALLEN
+ BLAKE
The nodes shown at the top level should serve as labels, indicating the various types of nodes available.
I have created the top level RootLabelsViewObj, with a SQL clause:
select rn, node_label
from (
select 1 rn
, 'Employees' node_label
from dual
union all
select 2 rn
, 'Departments' node_label
from dual
union all
select 3 rn
, 'Bonusplans' node_label
from dual
I have created ViewLinks between the RootLabelsViewObj and the DeptView and EmpView respectively (created on top of DEPT and EMP table in SCOTT schema), based on the LABEL attribute in the RootLabelsViewObj and with ViewLink SQL specified like:
:Bind_NodeLabel = 'Departments' for the link with DeptView and :Bind_NodeLabel = 'Employees' for the link with EmpView.
In the ADF BC Application Module Tester, I get exactly what I want.
However, when I create a JSF JSPX page and drag the RootLabelsViewObj from the Data Control Panel to the page as ADF Tree, I run into a little issue: it seems like I cannot create a second Branch Accessor rule for the RootLabelsViewObj1: I have created a first Branch Accessor Rule referring to DeptView and now try to create a second one for EmpView, to allow Employees to be displayed under the root label "Employees" - but I cannot.
The PageDefinition looks like:
<tree id="RootLabelsViewObj1" IterBinding="RootLabelsViewObj1Iterator">
<AttrNames>
<Item Value="Rn"/>
<Item Value="NodeLabel"/>
</AttrNames>
<nodeDefinition DefName="model.RootLabelsViewObj"
id="RootLabelsViewObjNode">
<AttrNames>
<Item Value="NodeLabel"/>
</AttrNames>
<Accessors>
<Item Value="DeptView"/>
</Accessors>
</nodeDefinition>
<nodeDefinition DefName="model.EmpView" id="EmpViewNode">
<AttrNames>
<Item Value="Ename"/>
</AttrNames>
</nodeDefinition>
<nodeDefinition DefName="model.DeptView" id="DeptViewNode">
<AttrNames>
<Item Value="Deptno"/>
</AttrNames>
</nodeDefinition>
</tree>
Does anyone know:
- whether it is possible (intended) to have more than one branch accessor per node (i.e. more than one type of child under a node in the tree)
- if so, how this can be achieved?
Right now it looks like I am limited to each node in the tree having only one type of child node.
Please tell me I am wrong.
best regards,
LucasGive this a shot mate
event.getNativeEventTarget();That will allow you to access the DOM object directly
Id can be retrieved via
event.getNativeEventTarget().id; -
Getting the value of a child node in an array
How do you get the value of a child node in an array titled "entries"? I used to do this in AS2, and now I'm trying in AS3. To top it off, I'm forced to use an XML format I'm unfamiliar with. So I'm not sure how to access these nodes in AS3. An example of the XML is;
<Row>
<Cell><Data ss:Type="String">Absorption Areas</Data></Cell>
<Cell><Data ss:Type="String">Drain fields where left over liquid from the septic system soak into the ground.</Data></Cell>
</Row>
How would I access ether of the <Cell> rows?
ThanksGiven that you declared ss namespace (otherwise it will throw an error) you have two options:
xml.Cell[0].Data - will output:
Absorption Areas
xml.Cell.Data will output:
<Data ss:Type="String">Absorption Areas</Data>
<Data ss:Type="String">Drain fields where left over liquid from the septic system soak into the ground.</Data>
So, xml.Cell.Data[1] will output:
Drain fields where left over liquid from the septic system soak into the ground. -
How to add a button in the child node of the Tree Table?
Hi All,
I am having a requirement to create a tree table and it should have a delete button to each child node (screenshot attached).
Can anyone provide me a sample for how to implement this.
Thanks in Advance
AravindhHi Aravindhan,
Try something like this:
var ttDesvios = new sap.ui.table.TreeTable();
var cbDesviacion = new sap.ui.commons.CheckBox();
ttDesvios.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Col1"}),
template: new sap.ui.commons.Label({text: "Info"}),
width: "50px",
ttDesvios.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Action"}),
template: new sap.ui.commons.Button({text: "Delete"}).bindProperty("visible", "pathPropertyChild", function(value){
if(value .............){ return true;} //For child
else{ return false;} //For parent
width: "160px",
Regards
EDIT: Wrong paste code, that's better!
Maybe you are looking for
-
How to open a bookmark folder in new tabs without removing previously opened tabs ?
I love Safari, I think it's the smoothest experience on a Mac. However, not being able to open multiple tabs at once without overwriting my previous ones is a deal breaker. I know you can click the back button to restore previous tabs but then the ne
-
Scripts totals prinint in main window
Hi, i want to print gross value, discount,output tax and total amount after printing all line items in main window. can any one tell me where i have to write the code for this gross value, discount,output tax and total amount. i mean how to check the
-
Transaction F.13 - Flag on "GR/IR Account Special Processing"
Hello, I have a question regarding the functionalities of the transaction F.13. When the flag "GR/IR Account Special Processing" has to be flagged? There is any relationship with the field XREF3? Thanks a lot, Emanuela
-
Earphone doesn't sound but speaker! android lollipop xperia Z (C6603)
I had earphone problem for the all incoming and outgiong calls. Ther was no sound at all, no ring tone, no sound nothing... But the speaker was working normally. when I had kit kat as an update the problem started and soon it was obvious that chrome
-
Error Msg - "You must add the Class files for this enterprise bean"
Hi, I am creating creating new enterprise bean using j2sdkee1.2. I am able to create .ear file in desired folder, but can not create .jar. Please help. Getting above error message. remote, home interface files and file having business logic (EJB) is