Tree control with Nodes in ALV
Hi ABAP Gurus,
I am trying to create tree control with nodes in ALV. I have referred to standard BCALV_TREE* programs but new to OO programming. Not sure as to how I can display my internal table data than the SFLIGHT information in these programs. Can you please let me know how this can be done or if I can use any ALV function modules for the node display.
thanks,
Chaitanya
Maybe you could use this. Call this VI from a Value Change event of the tree.
Attachments:
Check_Tree_Items.vi 28 KB
Similar Messages
-
Tree Control Property Node for Accessing "Child Text" String Array
When adding items to a tree control using the EditTreeItems invoke nodes, the inputs include "Child Tag", "Item Indent", "Child Only?", "Glyph Index", "Child Text", and "Left Cell String" as can be seen in this screenshot.
There are property nodes for the tree control for accessing each of these elements, except for the "Child Text", which is an array of strings. It is possible to access this data as outlined in this forum post, but this method is somewhat involved and round about.
I suggest that a property for the Tree class be created to access the Child Text array directly.The work around only works if you do not have an empty string element some where in the middle.
At lest could the "Active Celltring Property" read return an error when you have gone beyond the end of the array. -
Change the selection of tree control with a right click
How is it possible to change the item selected in a tree control (LabVIEW7) with a mouse right click ?
Filippo,
Here is a popup menu toolkit, with an additional example for a listbox. If I
understand your problem, it shouldn't be hard to change it to a tree
control.
Regards,
Wiebe.
"Filippo" wrote in message
news:[email protected]..
> Sorry for my english ! If you can send me an example, it could be very
> useful for me.
> My e-mail is : [email protected]
> Thanks.
> Regards,
>
> Filippo
[Attachment Menu 042004.zip, see below]
Attachments:
Menu_042004.zip 175 KB -
Hi All,
I have a need for a tree control which supports having a
combobox. I've done extensive research on Google, but came up
empty. If anyone has or can point me to any examples, it would be
greatly appreciated.
Thanks in advance!
-jfHere's a follow-up to my first question.
I found an example of a tree with checkboxes and set out to
modify it so that it would fit my needs. I'm really stumped here,
because it will render a checkbox or radio button fine, but I can't
get it to render a combobox or button. I'd also like the combobox
and button to be on the right side of the parent/child label, is
that possible?
Any help anyone can provide is greatly appreciated.
Content of ComboBoxTreeRenderer:
package util
import mx.controls.Image;
import mx.controls.Tree;
import mx.controls.treeClasses.*;
import mx.collections.*;
import mx.controls.ComboBox;
import mx.controls.Button;
import mx.controls.RadioButton;
import mx.controls.listClasses.*;
import flash.events.Event;
import flash.events.MouseEvent;
import mx.events.FlexEvent;
import flash.display.DisplayObject;
import flash.events.MouseEvent;
import flash.xml.*;
import mx.core.IDataRenderer;
public class ComboBoxTreeRenderer extends TreeItemRenderer
protected var myImage:Image;
// set image properties
protected var myComboBox:ComboBox;
protected var myRadioButton:RadioButton;
protected var myButton:Button;
public function ComboBoxTreeRenderer ()
super();
mouseEnabled = false;
override protected function createChildren():void
super.createChildren();
myRadioButton = new RadioButton();
addChild(myRadioButton);
myComboBox = new ComboBox();
addChild(myComboBox);
myButton = new Button();
myButton.setStyle( "label", "Button" );
addChild(myButton);
override protected function
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
super.updateDisplayList(unscaledWidth, unscaledHeight);
if(super.data)
if (super.icon != null)
myRadioButton.x = super.icon.x;
myRadioButton.y = 2;
super.icon.x = myRadioButton.x + myRadioButton.width + 17;
super.label.x = super.icon.x + super.icon.width + 3;
else
myRadioButton.x = super.label.x;
myRadioButton.y = 2;
super.label.x = myRadioButton.x + myRadioButton.width + 17;
Content of comboBoxTree_test.mxml:
<?xml version="1.0" encoding="iso-8859-1"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
creationComplete="init();" >
<mx:Script>
<![CDATA[
import mx.collections.*;
[Bindable]
public var treeList:XMLList =
<>
<folder isBranch="true" label="Branch 1" >
<folder isBranch="false" label="Leaf 1" />
<folder isBranch="false" label="Leaf 2" />
</folder>
</>;
[Bindable]
public var folderCollection:XMLListCollection;
private function init() : void
folderCollection = new XMLListCollection(treeList);
comboBoxTree.dataProvider = folderCollection;
]]>
</mx:Script>
<mx:Tree
id="comboBoxTree"
itemRenderer="util.ComboBoxTreeRenderer"
labelField="@label"
width="100%" height="100%" >
</mx:Tree>
</mx:Application>
************************************************************** -
Don't see parent and child nodes in tree control with switcher, enclose xml
Hi, i.m a novice for jdev 11.1.1.2,
i need to create a tree menu, but when i put the switcher + n°2 face whith link object, inside the tree and
run my application i don't see the node, but i see the bookmarks that collapease and expand Why ????
Thanks for your help
Gio
enclose xml for better clarification:
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document id="d1">
<af:messages id="m1"/>
<af:form id="f1">
<af:panelStretchLayout id="psl1">
<f:facet name="center">
<af:panelGroupLayout layout="scroll"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
id="pgl4">
<af:panelSplitter id="ps1" splitterPosition="156"
inlineStyle="width:534px;">
<f:facet name="first">
<af:panelGroupLayout layout="scroll"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
id="pgl3">
<af:panelHeader text="panelHeader 1" id="ph1">
<f:facet name="context"/>
<f:facet name="menuBar"/>
<f:facet name="toolbar"/>
<f:facet name="legend"/>
<f:facet name="info"/>
<af:tree value="#{bindings.DepartmentsViewTree.treeModel}"
selectionListener="#{bindings.DepartmentsViewTree.treeModel.makeCurrent}"
rowSelection="single" id="t1" var="node">
<f:facet name="nodeStamp">
<af:switcher id="s1"
facetName="#{node.hierType.viewDefName}">
<f:facet name="DepartmentsView">
<af:panelGroupLayout id="pgl1">
<af:commandLink text="#{node}"
action="#{MainPageBean.departmentRegionLayout}"
id="cl1">
<af:setActionListener from="#{node.DepartmentId}"
to="#{pageFlowScope.TreeKey}"/>
</af:commandLink>
<af:commandLink text=" (Edit)"
action="createEdit" id="cl2">
<af:setActionListener from="#{node.DepartmentId}"
to="#{pageFlowScope.DeptTreeKey}"/>
</af:commandLink>
</af:panelGroupLayout>
</f:facet>
<f:facet name="EmployeesView">
<af:commandLink text="#{node}"
action="#{MainPageBean.employeeRegionLayout}"
id="cl3">
<af:setActionListener from="#{node.EmployeeId}"
to="#{pageFlowScope.TreeKey}"/>
</af:commandLink>
</f:facet>
</af:switcher>
</f:facet>
</af:tree>
</af:panelHeader>
</af:panelGroupLayout>
</f:facet>
<f:facet name="second">
<af:panelGroupLayout layout="scroll"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
id="pgl2">
<af:region value="#{bindings.dynamicRegion1.regionModel}"
id="dynam1" partialTriggers="::t1"/>
</af:panelGroupLayout>
</f:facet>
</af:panelSplitter>
</af:panelGroupLayout>
<!-- id="af_one_column_stretched" -->
</f:facet>
</af:panelStretchLayout>
</af:form>
</af:document>
</f:view>
</jsp:root>
Edited by: user595664 on 5-dic-2009 2.54
Edited by: user595664 on 5-dic-2009 2.57Hi,
you need to provide the full naming for the facet names. So instead of DepartmentsView you provide mypackage.DepartmentsView where you replace mypackage with the package structure of the the ViewObject
Frank -
Tree control with xml last node!
The question is how to view the tree lastleaf as last
nodename + nodevalue in an xmlobject?
<node1>
<node1a>10
</node1a>
</node1>
<node2>
<node2a>
<node2b>20
</node2b>
</node2a>
</node2>
I want the tree structure like:
Node1 (folder icon)
Node1a = 10 (doc icon)
Node2
Node2a
Node2b = 20 (doc icon)
In Flex the tree views:
Node1 (folder icon)
Node1a (folder icon)
10 (doc icon)
Node2
Node2a
Node2b (folder icon)
20 (doc icon)
in my app I get a result from a webservice that returns some
nodes that can have one or more values. Say Node1a can have 10, 34,
43, so in the tree leaf I it should view Node1a = 10, 34, 43.
Any suggestions?The problem is when the value is between xml tags (
<node>value</node>) the node name gets folder icon and
value gets doc. icon.
With lot of last elements, one has to click every node to see
the values.
With labelFunction every leaf gets null value:
If hasComplex return localname
Else
Return localname + children
When I try to pars xml to new one, hasChildren returns true
for las element, and if there is no value the node shows null.
Then walking the xml recursively how do I insert the nodes in
new xml with the same structure but tags like (<node
data=”value” />)? (to XMLListCollection)
Hope it’s clearer -
Tree control's nodes and ites position
Hello,
Is there a way to get tree's nodes and items position,or
get it by ElementVisualizationMode and Hit event ?
Thanks,
AssafHi
Using the new features, and I think I have found a bug that I was wondering if anyone else can comment on.
GetNodeLeft(BSTR key) ... perfect
GetNodeTop(BSTR Key) ... perfect
GetNodeHeight(BSTR Key) ... perfect
BUT
GetNodeWidth(BSTR Key) ... returns weird values, except for the first item in the tree.
The function then returns what seems to be:
(Control Width - (Height * Absolute Position))
The deeper one goes into the tree, the smaller the width becomes ...
Surely this is a bug .... -
Tree control parent node label
The following code works fine (except the part in caps, which
isn't code). Suggestions?
private function changeEvt(event:Event):void {
var theData:String = ""
if (event.currentTarget.selectedItem.@value) {
theData = " Data: " +
event.currentTarget.selectedItem.@value;
trace(event.currentTarget.selectedItem.@label + theData);
//trace(NEED PARENT NODE LABEL HERE IF IT EXISTS);
}OK. So I stopped looking too soon. In my case:
trace(browserTree.selectedItem.parent().@label); -
Tree Control with mulitple columns
How can you retreive data from multiple columns? I can only retrieve data from first column in tree.
thx
Solved!
Go to Solution.You can set the Active Cell -> Active Column Number and then get the Active Cell -> String.
Regards, Vt133 -
Not able to get the database data into the Tree Control
Hi Everybody,
I have to populate the tree control with nodes and items, which is to be populated from the database, and the tree control is <b>dynamic</b>. I mean, there is a <b>toolbar</b>, whenever a <b>pushbutton is clicked</b>, depending on that the tree contents has to be changed.
If anybody had worked with <b>CL_GUI_COLUMN_TREE</b> control to get the data from database, depending upon the <b>pushbutton selected in Toolbar</b>, please paste the seudocode for it.
Regards,
Abdul,
Intelligroup.
P.S: Helpful answers will be rewarded.have you seen this demo program
SAPCOLUMN_TREE_CONTROL_DEMO
Regards
Raja -
Scaling in F.01 with ALV Tree Control
Hi Experts,
Is there any possibility of generating the financial statements in F.01 in ALV tree control with amount scaled to 3 or 5 zero's. When i try to use ALV with scaling, the scaling is reset to 0
Thanks in AdvanceNelow message will appear and not possible technically
Output option ALV Tree Control: Parameter Scaling set to 0/0
Message no. FR098
Diagnosis
You selected output option ALV Tree Control. For technical reasons, only the value 0/0 is possible for the parameter Scaling.
System Response
Parameter Scaling set to the value 0/0.
Procedure
If you want to compare the program output for output options ALV Tree Control and Classical list, you have to also set the parameter Scaling to '0/0' when running the program with output option Classical list. -
How to works with a tree control in LV7.1
Hi,
I am needing some help with a tree control.
I have a tree control with two colluns, and I would like to double click on a item in the first collun and this iten
must be send to the second collun in the first blank line avaible.
Can you guys help me with that ?
Thanks
EduardoHi
what erectly the problem is ?
Things are same in CE 7.1 also.
Check this [thread|Help on WebDynpro - Tree Structure in a Table;
BR
Satish Kumar
Edited by: satish jhariya on Mar 3, 2009 11:35 AM -
Items in Tree control move around when data is submitted using custom ItemRenderer
I'm working on a Tree control with an XMLListCollection as
its dataProvider.
The dataProvider has information looking like this :
quote:
<?xml version='1.0' encoding='utf-8'?>
<INFO>
<FIELD label="STR_USER_NAME"
type="text"
value=""
>
</FIELD>
<FIELD label="STR_USER_EMAIL"
type="text"
value=""
>
</FIELD>
<FIELD label="STR_OPTIONAL"
type="branch"
value="0"
>
<FIELD label="STR_USER_ADDRESS"
type="text"
value=""
>
</FIELD>
<FIELD label="STR_USER_POSTAL_CODE"
type="text"
value=""
>
</FIELD>
</FIELD>
</INFO>
So in the Tree control I'd like the information to show up
with a label and
an
editable textbox for each item :
[Label] [textbox]
To do this I made a tree like this :
quote:
<mx:Tree id="userTree"
editable="true"
rendererIsEditor="true"
editorDataField="curVal"
itemRenderer="{new ClassFactory(ItemRendererUser)}"
itemEditEnd="e_ProcessData(event);"
dataDescriptor="{new DataDescriptorUsers()}"
showRoot="false"
verticalScrollPolicy="{ScrollPolicy.AUTO}"
/>
where the e_ProcessData() function looks like this (I used
http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/js/html/wwhelp.htm?href=c
elleditor_073_16.html#202105 as a guide) :
quote:
public function e_ProcessData(event:ListEvent):void
event.preventDefault();
userTree.editedItemRenderer.data.@value =
ItemRendererUsers(event.currentTarget.itemEditorInstance).curVal;
userTree.destroyItemEditor();
userTree.dataProvider.notifyItemUpdate(userTree.editedItemRenderer);
} // END OF e_ProcessData()
I attached the rest of the files because they're a little
bit longer.
When I run the program, the data shows up fine when it is
initialized the
very
first time, and I made a test button that just dumps the
contents of the
dataProvider in a trace statement to verify that the data has
been set
properly.
The problem I've run into is whenever the textfield is
edited, the item
that
I've selected jumps around the list.
For example, if I edit the item "STR_USER_NAME" after I
finish the edit, it
will move from the very first position in the Tree to the
bottom of the
Tree.
I traced the contents of the dataProvider and the
dataProvider structure
stays
the same, with the "STR_USER_NAME" at the top, but if I look
at the flex app
in
the web browser, its position is at the bottom of the Tree.
This happens for every other item I try to edit... I read in
the
documentation
that the ItemRenderers are recycled, so it means I should be
checking to
make
sure the initial states are covered, but I'm not sure how
this affects my
application.
Can anyone help me out with this ? Its very confusing - I've
tried making
an
ItemRenderer using pure actionscript, mxml and the
combination you see in
this
example and I always end up with the same behaviour - So I
must be missing
something critical...
// ItemRendererUsers.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="
http://www.adobe.com/2006/mxml"
verticalScrollPolicy="{ScrollPolicy.OFF}"
horizontalScrollPolicy="{ScrollPolicy.OFF}"
creationComplete="initItemRendererUsers();"
>
From my FAQ:
Q: I've created a custom itemRenderer component to use in a
List
based component (Datagrid, TileList, HorizontalList, etc.).
When my List
first displays, everything looks fine, but when I scroll it
or change the
dataProvider, some of the itemRenderers show values or
formatting that
aren't right. How do I fix this?
A: List-based components don't draw a renderer for every item
in the
dataProvider. Instead, they create enough to display what is
on screen now,
plus one or two more waiting in the wings. This means they
recycle the
renderers rather than creating new ones when you change
dataProvider or
scroll up and down. When you use a creationComplete event to
set up the
itemRenderer, that event doesn't happen again when the
renderer is used for
a different set of data. The solution to this is to override
the set data
protected function that most components have.
For more information, check out the following resources:
http://www.adobe.com/devnet/flex/articles/itemrenderers_pt1.html?devcon=f1
http://blogs.adobe.com/aharui/2007/03/thinking_about_item_renderers_1.html
Please note, I post this FAQ weekly, and you can find a
permanent copy of it
here
http://www.magnoliamultimedia.com/flex_examples/Amys_Flex_FAQ.pdf"peterh8234" <[email protected]> wrote in
message
news:gaqttd$kft$[email protected]..
> Yes - the set and get functions are listed down below.
But the quirky
> behaviour
> is the same regardless of whether I override the set and
get functions or
> not.
>
> I noticed there was another variable called listData -
should I be using
> that
> one or the data variable to read and write to the
dataProvider ?
>
> // _data
> [Bindable] public var _data:Object;
> [Bindable("dataChange")]
> //
> override public function get data():Object
> {
> trace('[ItemRendererDefault.GET data()] called for {' +
> _data.attribute("label") + '}.');
> return _data;
> } // END OF get data()
>
> //
> override public function set data(value:Object):void
> {
> _data.@value = inputText.text;
> trace('[ItemRendererDefault.SET data()] called for {' +
> _data.attribute("label") + '}.');
>
> invalidateProperties();
> } // END OF set data()
Your set data needs to set a flag that gets picked up in
commitProperties()
and does your thing that you were doing before in
creationComplete. You
should see examples of this in the links I posted. Instead of
this:
_data.@value = inputText.text;
you should look at implementing IDropInListItemRenderer,
which will allow
you to dynamically determine which field to look at, instead
of hardcoding
it. You also might wind up overwriting the stored value with
a null value
when the List passes the stored value in. I'd encourage you
to really go
through those links I posted and make sure you understand
what they're
saying. The itemRenderer life cycle is one of the hardest
things to
understand, but once you understand it, it makes many things
in Flex much
easier. It's worth investing the time. -
I found that the oracle installation is using tree control with check box. I tried to use the same feature in my application. But I found that the tree control in swing and infoswing is not having the feature to add checkbox in the tree control. If anybody knows how to add checkbox in the tree control using the jdeveloper please help me.
You can see how to do it the next link http://www2.gol.com/users/tame/swing/examples/JTreeExamples2.html
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by S. Arun ([email protected]):
I found that the oracle installation is using tree control with check box. I tried to use the same feature in my application. But I found that the tree control in swing and infoswing is not having the feature to add checkbox in the tree control. If anybody knows how to add checkbox in the tree control using the jdeveloper please help me.<HR></BLOCKQUOTE>
null -
Need help regarding tree control
hello guys,
i m working on one Flex slideshow application and i m using Xml loaded tree control with swf loader for this. i want to create next previus button for nevigate this slideshow but i dont know much about action script... please help me
i will provide u code of my script if you need to correct it or suggest me how to make it.
thanks in advance
sagarhere is sourcecode of my file
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" showCloseButton="true" close="PopUpManager.removePopUp(this);" width="1366" height="768" title="Promotions" fontFamily="Verdana" fontSize="13">
<mx:Script>
<![CDATA[
import mx.managers.PopUpManager;
private function processLogin():void {
// Check credentials (not shown) then remove pop up.
PopUpManager.removePopUp(this);
import mx.effects.easing.*;
//index button script
private function toggleBtn(e:MouseEvent):void{
if(e.currentTarget.label== 'Open')
panelOut.play();
else
panelIn.play();
import mx.collections.ICollectionView;
import mx.events.ListEvent;
// tree control script
private function tree_itemClick(evt:ListEvent):void {
var t:Tree = evt.currentTarget as Tree;
var dataObj:Object = evt.itemRenderer.data;
var item:Object = Tree(evt.currentTarget).selectedItem;
if (dataObj.hasOwnProperty("@src")) {
swfLoader.source = dataObj.@src;
} else if (t.dataDescriptor.isBranch(t.selectedItem)) {
swfLoader.source = null;
tree.expandItem(item, !tree.isItemOpen(item), true);
panel1.status = "";
private function tree_labelFunc(item:Object):String {
var children:ICollectionView;
var suffix:String = "";
if (tree.dataDescriptor.isBranch(item)) {
children = tree.dataDescriptor.getChildren(item);
suffix = " (" + item.children().length() + ")";
return item.@label + suffix;
private function swfLoader_complete(evt:Event):void {
panel1.status = (swfLoader.bytesTotal/1024).toFixed(2) + 'KB';
private function init():void
systemManager.stage.displayState=flash.display.StageDisplayState.FULL_SCREEN;
]]>
</mx:Script>
<mx:XML id="dp" source="data/dp.xml" />
<mx:Canvas x="30" y="-1" width="1315" height="725">
<mx:Panel id="panel1"
width="1310"
height="712"
backgroundColor="white"
borderThickness="0"
borderThicknessBottom="0"
borderThicknessLeft="0"
borderThicknessRight="0"
borderStyle="none" cornerRadius="0"
headerHeight="0" left="2" y="3">
<mx:SWFLoader id="swfLoader"
scaleContent="true"
complete="swfLoader_complete(event);" />
<mx:ControlBar>
</mx:ControlBar>
</mx:Panel>
</mx:Canvas>
<mx:Move id="panelOut" target="{panel}" xTo="0" effectEnd="btn.label='Close'"
duration="500"/>
<mx:Move id="panelIn" target="{panel}" xTo="-283" effectEnd="btn.label='Open'"
duration="500"/>
<mx:Canvas id="panel" width="314" height="725" x="-283" backgroundColor="#00A2FF" verticalCenter="-1">
<mx:Grid x="10" y="10" width="299">
<mx:GridRow width="100%" height="707">
<mx:GridItem width="100%" height="100%">
<mx:Tree id="tree"
dataProvider="{dp}"
labelFunction="tree_labelFunc"
showRoot="false"
width="269"
height="706"
itemClick="tree_itemClick(event);" alpha="0.85" backgroundColor="#C0E1FF"/>
</mx:GridItem>
<mx:GridItem width="22" height="100%" verticalAlign="middle">
<mx:LinkButton label="" id="btn" width="22" height="707"
click="toggleBtn(event)" icon="@Embed(source='assets/index.png')" enabled="true"/>
</mx:GridItem>
</mx:GridRow>
</mx:Grid>
<!--Add the content of your sliding panel here -->
</mx:Canvas>
</mx:TitleWindow>
Maybe you are looking for
-
Lenovo 3000 N200 0769 BIOS problem
Hello everybody! I'm a new entry in the forum, but i am a 6 year old user of a Lenovo 3000 N200 (0769) and i am very happy with its services so far! However, after a format that i make, i saw a BIOS update for this model, so i decide to install it. B
-
Hi All, I am new to BPEL and trying to install it. I am getting following error on Configuration Assistant. Oracle BPEL Runtime Configuration Assistant status :canceled:- ===============================================================================
-
Passing parameters between views in different Web Dynpro applications
Hi everyone, I would like to pass the value of one parameter between one view in a webdynpro application and another view that is in other webdynpro application. How can I do this in a secure way?
-
Hi, I have bought an MSI H55-GD65 motherboard, and with that the following sticks of RAM : OCZ Intel Extreme Edition XMP 4 Go (kit 2x 2 Go) DDR3-SDRAM PC3-10600 - OCZ3X1333LV4GK I would like to have your opinion on this choice. For instance, I would
-
How to get dependencies assigned to Variant Configuration characteistics from program
Hi Experts, I want to get the details of the dependencies assigned to VC characteristics from ABAP program. Is there any function module/BAPI to get the dependency details? Thanks in advance.