Child node initialization.
Hi all,
i have a parent node and one child node.
cardinality of both is "0...n". both are tables. now i want to bind a table to the child node but its dumping giving error as
"Access via 'NULL' object reference not possible"..when i checked i found the child node is not getting initialized.
how to initialize the child node so tht i can use the method "bind_table" using node for tht child node table
...please help
Well you likely need the parent node to have an element first. However an important question needs to be answered first. What is the Singelton setting on the parent node? This has a consider effect on how you populate the child node.
Similar Messages
-
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! -
When in a hierarchy, a user right clicks on a node to crate a new node, he has two options
-Child
-Sibling
Is it possible to restrict the user from creating a sibling and allow him to ONLY create child nodes?
Business cases:
1. different level nodes need to have different prefixes.
- Thus, the default prefix property definition uses the level number to assign a prefix
- Also, a validation, to ensure the correct prefix, uses the level number
But if the user can create a child and a sibling then the default prefix will only be right for a single case and not both.
ThanksIf the images are exactly the same size then make sure the layer with the mask
is the active layer and in the other documents go to Select>Load Selection and choose
your document with the layer mask under Source document and under channel choose the layer mask.
After the selection loads press the layer mask icon at the bottom of the layers panel.
MTSTUNER -
How to avoid the selection of a Parent node and its child node at a time?
Example:
consider the below JTree.
Parent1
---->Parent2
-------->Child3
Parent3
---->Parent4
My requirement :
Parent1 and Parent3 can be selected at a time(using ctrl keys)
Parent2 and Parent4 can be selected at a time
Parent1 and Parent2 should not allowed to select at a time.
In general : A parent and any of its child should not be selected at a time.
How to achieve this? Anyone please help me.Thanikai wrote:
I am very sorry.Whatever for? It's a valid question.
How do i implement a custom TreeSelectionModel?I would start by going through the source of DefaultTreeSelectionModel so see how the default selection is handled. Also probably check out JTree.EmptySelectionModel to see how selection is prevented.
Which methods to override?Methods in the class you choose to extend, obviously. But before that you need to firm up certain design decisions: if a parent node is selected and the user attempts to select one of its child nodes, do you select the child and deselect the parent or do nothing/ and vice versa.
etc.... may form the basis for a future, more specific question accompanied by a [_SSCCE_|http://mindprod.com/jgloss/sscce.html].
luck, db -
How to find out if a NODE has any CHILD NODES in a hierarchical tree?
I want to find out programmatically if a node in a tree has CHILDREN.
My requirement is this: I want to only show nodes for which the user has permission to execute the program that node is associated with.
Problem is, my tree population query will not show the child nodes, BUT the sub-menu nodes are displayed and I need to get rid of these nodes.
There is a function to find out the PARENT of a tree node (FTree.Get_Tree_Node_Parent), but noting to find out if children exist for a node or not?
What I thought of was to display the tree and then traverse it from the ROOT onwards and then if a NODE is a submenu node (I can find this out by checking the PROGRAM value. If this is NULL it is a sub-menu node) and IF IT HAS NO CHILD NODES then I can delete the node.Please provide the examples with DATA
as far as i know we cannot get the Child Nodes but NODE's Parents we can get
parent_node := Ftree.Get_Tree_Node_Parent(htree, :SYSTEM.TRIGGER_NODE);I faced the similar problem but i solved it with query.
Provide the data and your Tree query then we can help -
Regarding : Creation of child nodes in a outlinefield
Hi,
I am facing a few problems in creating a child node. I read elements from an array to populate the outline field. The array has exact definitions as to what should be a parent and child respectively. While I am able to create nodes at the parent level, I am unable to create child nodes for any parent. I discovered that the value for the parent node is getting lost. I have tried to use some of the methods to arrive at the parent node, but to no anvil. Could some one suggest how exactly to get the value of the parent node so that the child node can be assigned to the parent.
Thanks In advance.
Balasubramaniam Sures
[email protected]
P.S : I have seen the examples Simple Outline field and File Browser. No clues from here.I take it that you are traversing through the array and loading each
element into the OutlineField. At the risk of stating the obvious, for
each element you must also identify it's parent. This is necessary to
set the relationship from the child to the parent or vise versa.
If you are already doing this and are still having difficulty, the
problem may be as simple as setting the IsFolder property of the parent
node. Unless this is done, it's child nodes will not be visible.
Van Vuong
Lead Technical Analyst
Office: 972.985.5289
VoiceNow: 972.330.0822
Internet: [email protected]
PAGE NET
From: bala[SMTP:[email protected]]
Sent: Friday, October 03, 1997 12:32 PM
To: '[email protected]'
Subject: Regarding : Creation of child nodes in a outline field
Hi,
I am facing a few problems in creating a child node. I read elements from an
array to populate the outline field. The array has exact definitions as to
what should be a parent and child respectively. While I am able to create
nodes at the parent level, I am unable to create child nodes for any parent.
I discovered that the value for the parent node is getting lost. I have
tried to use some of the methods to arrive at the parent node, but to no
anvil. Could some one suggest how exactly to get the value of the parent node
so that the child node can be assigned to the parent.
Thanks In advance.
Balasubramaniam Sures
[email protected]
P.S : I have seen the examples Simple Outline field and File Browser. No
clues from here. -
How can provide parent-child nodes relation ships?
how can provide parent-child nodes relation ships?
I was under the impression that scenegraph is like a JTree. But in JavaFX only leaf node rendering in scenegraph. This situation was confusing my mind. In JavaFX CustomNode must be extending and return a group for custom leaf. If we want to a create parent-child node hierarchy we are create CustomNode that return a group and this group contain an another group,etc. So there is maybe only a way. If you learning to JavaFX first time.This way don't look familiar.
-
How to differentiate parent and child node in af:treeTable ?
Greetings,
I have a requirement, I display master child view objects using <af:treeTable> component, When user expands a parent row, I have to make parent row is in read only and expanded(child) row in editable. To accomplish this I have to identify the 'node' whether it belongs to parent or child view object. In this example Tree table binds with EmpVO, There is a view link beteween EmpVO and DepartmentVO.
<af:treeTable value="#{bindings.EmpVO.treeModel}"
var="node"
rowSelection="single" id="tEqSum"
summary="Employee Summary"
<af:column sortProperty="#{bindings.EmpVO.hints.LocCity.name}"
filterable="true" sortable="true" width="90"
headerText="#{bindings.EmpVO.hints.LocCity.label}"
id="c3">
<af:outputText value="#{node.LocCity}" id="ot21"/>
expandAllEnabled="false">
</af:treeTable>
Thanks in Advance,Hi,
You can find out the node depth by using
#{bindings.<your_tree_binding>.treeModel.depth}Based on the depth, you can decide whether its a parent node or child node (for a 1 level tree- say dept and emp, the depth for parent would be 0 and for the child it would be 1).
-Arun -
Problem in delting child node from tree
Hello friends I have a problem in tree component
I am using Xml File with creator .
I am showing company name as a root node
then department name as a child of company name
then employee name as a child of department
Initialy its working fine ,user can add edit and delete any node
In add and edit option I have no problem but in delete I hava a problem
when I am deleting any child node and after deleting the node I am clicking on the root node of the deleted node the it gives me null pointer Ecxeption .
but user added any child node and then delete it then Application work properly .
What is the problem I can't Understand please help me
thanks
Raviraj Gangradethanks deepsix for helping me
it gives me java.lang.NullPointerException and class name is
net.sf.saxon.dom.NodeWrapper$ChildEnumeration
here is my Stack Trace
javax.faces.FacesException: #{Graphs.childNode_action}: javax.faces.el.EvaluationException: java.lang.NullPointerException
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78)
at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:57)
at javax.faces.component.UICommand.broadcast(UICommand.java:312)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:307)
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:79)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
at sun.reflect.GeneratedMethodAccessor270.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)
Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
... 44 more
Caused by: java.lang.NullPointerException
at pegasusweb.Graphs.childNode_action(Graphs.java:1075)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
... 45 more
|#]
[#|2006-11-30T14:51:30.000+0530|SEVERE|sun-appserver-pe8.2|javax.enterprise.system.container.web|_ThreadID=16;|StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
com.sun.rave.web.ui.appbase.ApplicationException: #{Graphs.childNode_action}: javax.faces.el.EvaluationException: java.lang.NullPointerException
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.destroy(ViewHandlerImpl.java:601)
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:302)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at sun.reflect.GeneratedMethodAccessor270.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)
Caused by: javax.faces.FacesException: #{Graphs.childNode_action}: javax.faces.el.EvaluationException: java.lang.NullPointerException
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78)
at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:57)
at javax.faces.component.UICommand.broadcast(UICommand.java:312)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:307)
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:79)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
... 36 more
Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
... 44 more
Caused by: java.lang.NullPointerException
at pegasusweb.Graphs.childNode_action(Graphs.java:1075)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
... 45 more
|#] -
Need to chart attribute value of just one child node of XML document
I have a XML document with (for example) 7 parent nodes, each
parent node has 5 child nodes. The parent nodes have an attribute
@EarlierDTS (DateTime type) that is the x-axis category of a chart.
Each child node has an attribute @eventid which specifies the id of
the event, and another atttribute @NumOccurs which specifies how
many times that event occured in that period.
How do I tell Flex I want a simple line chart of the eventID
= 215? What if I want two lines, for both eventID=215 and
eventid=307?
I have studied the posts and blogs for over a week now, and
have seen this question or similar come up quite a few places, with
no answer.
1) Should I focus on learning how to create a filterfunction
for the XMLList that underlies my XMLListCollection so that the
filtered data view is just one child node per parent node ( or two
child nodes for the second case)? And set the filtered data view as
the dataprovider of my chart's vertical series?
2) Should I focus on learning how to create a XML Filter
query that selects just one or two child nodes for each parent
node, and set the charts' series' dataprovider to this filter
expression? (I don't think this is allowed - but I'm checking with
the forum members...)
3) Should I focus on learning how to convert the
XMLListCollection into a HierarchicalData object, and then learning
how to filter this object so there is only one (or two) childs per
parent? This seems like a lot of coding - I almost have to create a
pair of classes - one for the parent and one for the child - so I
can create nested ArrayObjects.
4) Should I create a brand new XMLList by walking the
original XML list, and inserting Parent nodes and just the child
nodes that match the eventID(s) I want to chart, into the new
XMLList?
I believe that the easiest way would be to create a
Filterfunction for the XMLList, and bind the chart series to the
(filtered) XML List. But the problem with this approach is that I
have seen more than 2 posts asking how to accomplish filtering that
removes specific children from the view, with no solutions posted.
Help! What is the best way to get just one child for each
parent, from an XMLList?"whertzing" <[email protected]> wrote in
message
news:[email protected]...
>I have a XML document with (for example) 7 parent nodes,
each parent node
>has 5
> child nodes. The parent nodes have an attribute
@EarlierDTS (DateTime
> type)
> that is the x-axis category of a chart. Each child node
has an attribute
> @eventid which specifies the id of the event, and
another atttribute
> @NumOccurs
> which specifies how many times that event occured in
that period.
>
> How do I tell Flex I want a simple line chart of the
eventID = 215? What
> if I
> want two lines, for both eventID=215 and eventid=307?
>
> I have studied the posts and blogs for over a week now,
and have seen this
> question or similar come up quite a few places, with no
answer.
>
> 1) Should I focus on learning how to create a
filterfunction for the
> XMLList
> that underlies my XMLListCollection so that the filtered
data view is just
> one
> child node per parent node ( or two child nodes for the
second case)? And
> set
> the filtered data view as the dataprovider of my chart's
vertical series?
>
> 2) Should I focus on learning how to create a XML Filter
query that
> selects
> just one or two child nodes for each parent node, and
set the charts'
> series'
> dataprovider to this filter expression? (I don't think
this is allowed -
> but
> I'm checking with the forum members...)
>
> 3) Should I focus on learning how to convert the
XMLListCollection into a
> HierarchicalData object, and then learning how to filter
this object so
> there
> is only one (or two) childs per parent? This seems like
a lot of coding -
> I
> almost have to create a pair of classes - one for the
parent and one for
> the
> child - so I can create nested ArrayObjects.
>
> 4) Should I create a brand new XMLList by walking the
original XML list,
> and
> inserting Parent nodes and just the child nodes that
match the eventID(s)
> I
> want to chart, into the new XMLList?
>
> I believe that the easiest way would be to create a
Filterfunction for the
> XMLList, and bind the chart series to the (filtered) XML
List. But the
> problem
> with this approach is that I have seen more than 2 posts
asking how to
> accomplish filtering that removes specific children from
the view, with no
> solutions posted.
>
> Help! What is the best way to get just one child for
each parent, from an
> XMLList?
I'd just look at a dataFunction. There's an example here that
may point you
in the right direction:
http://flexdiary.blogspot.com/2008/08/charting-example.html
HTH;
Amy -
Check the value of attribute of a child node in datatype xmltype.
Hello,
I have a xml stored in column having datatype as "XMLTYPE"
<?xml version="1.0" encoding="ISO-8859-1"?>
<Settings>
<Setting Name="A1" Value="N"/>
<Setting Name="A2" Value="N"/>
<Setting Name="A3" Value="SOMEVALUE"/>
<Setting Name="A4" Value="N"/>
<Setting Name="A5" Value="Y"/>
<Setting Name="A6" Value="N"/>
</Settings>I do not want to loop into each child node. But want to find out if the value of setting A5 is Y or N? Is there a way I can find that without doing the extract of "Setting" child node and then looping each node to find the value?
Regards,You didn't specify your version of Oracle so here are two options. If 10.2 or greater, use XMLTable, else use the ExtractValue option.
-- The WITH simply simulates your existing table that I do not have.
WITH fake_tab AS
(SELECT XMLTYPE('<?xml version="1.0" encoding="ISO-8859-1"?>
<Settings>
<Setting Name="A1" Value="N"/>
<Setting Name="A2" Value="N"/>
<Setting Name="A3" Value="SOMEVALUE"/>
<Setting Name="A4" Value="N"/>
<Setting Name="A5" Value="Y"/>
<Setting Name="A6" Value="N"/>
</Settings>
') tab_col
FROM dual)
-- For 10.2 and higher use this SELECT
SELECT a5
FROM fake_tab,
XMLTABLE('/Settings'
PASSING fake_tab.tab_col
COLUMNS
a5 VARCHAR2(10) PATH 'Setting[@Name="A5"]/@Value');
-- For 10.1 and before
SELECT ExtractValue(tab_col, '/Settings/Setting[@Name="A5"]/@Value')
FROM fake_tab; -
Context Mapping: child-nodes of non-mapped parent nodes
I am somewhat curious about Context Mapping in WebDynpro.
Which parents nodes need to be mapped in order to map child nodes ? Does a child node has more than one parent node (e.g. grandparent - two steps above) ?
A.1 -
MAPPED----
> B.1
- A1.1 NOT MAPPED
- A1.2 NOT MAPPED
- A.1.2.1 MAPPED TO> B.1.2.4
- A.1.2.2 NOT MAPPED
- A1.3 NOT MAPPED
Is it sufficient that only one of these parent nodes (e.g. direct parent node not mapped, but parent node of this parent node is mapped) need to be mapped so that the child node can be mapped ?
Is this assumption true or not ?
The SAP library states:
"Conversely, child nodes of non-mapped parent nodes cannot be mapped, otherwise this would result in irresolvable conflicts at runtime with respect to the parent-child relation in the context and the mapping relation." (http://help.sap.com/saphelp_nw04/helpdata/de/51/a3384162316532e10000000a1550b0/content.htm)
This statement is not absolutely clear on this issue.Let me put it this way
You have a node vehicle and you have a child node for that the car. The car node have parameters car1, car2.
Let the vehicle node have parameters veh1 and veh2
Then if you map vehicle node one to any other node (say in the comp. controller) you have the option of mapping its children i.e veh1,veh2 and carnode.
You can have that veh1 is mapped and veh2 is not mapped.
vehicle node(mapped)
veh1(may or may not be mapped)
veh2(may or may not be mapped)
car node(may or may not be mapped)
If instead you try to map only the car node the vehicle node will also get mapped automatically but not it's child parameters like veh1 and veh2.
vehicle node(mapped)
veh1(may or may not be mapped)
veh2(may or may not be mapped)
car nodemapped)
car1(may or may not be mapped)
car2(may or may not be mapped)
Hope this would help.
Do revert for further clarification
Regards
Noufal
Maybe you are looking for
-
Version 1.5.0.53 Build MAIN-53.58, running on Mac OS X 10.5.2 All of a sudden, the "Data" tab for editing table data is no longer working. Clicking on it does nothing at all - no change in the icons, no apparent network activity - its as if you were
-
We would want to default the Requisition Header description to get imported onto the Purchase Order Header description. After the Requisition approval the Purchase Order gets created but the Header description is empty and I expect this to be default
-
Can someone please help me with a layout problem. As far as I can tell the page looks as it should in Netscape, Firefox, etc., but IE6 and 7 refuse to work correctly. The page I am working on is: http://www.vmtampademo.com/localangler/testpage.html M
-
I've done everything in the troubleshooting (checked .dll's, uninstalled, rebooted, downloaded and installed new) and I am still getting the R6034 C Runtime library error and the Windsow 1114 iTunes did not install properly error. Is there anything
-
Installment with some Bills of Exchange
Guys, good morning. I've a doubt about some installments with Bill of Exchange... How can I do about it? For instance, if I have a AR Invoice , based on Sales Order and i need to pay it with 1 installment + 4 bills of exchange...How can I do about it