Tree label editable
hi, i would like to edit the labels in the tree... i put menu
on the left side of the node, and when i choose edit, i make the
tree editable, but it focuses on the first node, not on the
selecteditem, can anyone felp me on this? tnx..
Not directly as Andreas said but alternately you can do by
You can set the label of NODE and update into the BASE table block and re-populate the tree
- on Double click the label call custom Stack canvas contains new label in text item and user will press OK
- Sets the Label of the Tree node
- Update the new label to the base table block
- Commit and re-populate the tree
if responses are helpful or correct please mark it
Baig,
http://baigsorcl.blogspot.com
Similar Messages
-
Hierarchical tree node editable
hi,
is there a property to make a tree node label editable? it would be kind to click on the label, change it and save to DB, instead of copying its value into a text field.
thanksNot directly as Andreas said but alternately you can do by
You can set the label of NODE and update into the BASE table block and re-populate the tree
- on Double click the label call custom Stack canvas contains new label in text item and user will press OK
- Sets the Label of the Tree node
- Update the new label to the base table block
- Commit and re-populate the tree
if responses are helpful or correct please mark it
Baig,
http://baigsorcl.blogspot.com -
Property Tree IN Edit Report Template
Hi Expert,
I am working on labels in WWI, and wanted to generate a report for which I need my customize property tree in CG42. Please suggest how to get property tree in Edit report Template(CG42). Attaching the screenshot for the same.
Advance Thanks,
Mayank AgrawalDear mayank,
You can create a new node in the property tree only by customizing.
First you need to know what characteristics it should have as this is part of a class.
I have listed the steps below which might be helpful.
First Create a characteristic(s) for the node which is actually a Value assignment type using CT04.
Create a Class using CL01 with class 100 and Assign all the characteristics to this particular class.
identify under which property tree, your node should appear.
for eg: Goto the txn CG02, select any real substance, in the property tree of IH, select any value assignment type under a node Limit values and regulations such as labelling(EU) and press F1 to view its description and u will find the Value assignment type as SAP_EHS_1023_001.
In customisizing, Select Setup Property trees under EHS - basic data tools - specification management - Specification database structure - Settings for value assignment type .
Select your property tree eg IH, select value assignment type assignment and insert your node.
By this way, U will be able to insert your node in the property tree. Now exit the screen and goto txn CG02 to find your node listed in property tree.
Go to Set Up Property Trees under SPRO; select the standard property tree and click on Value Assignment Type and assign the Class to a Node under which you want to.
i.e adding a node in a property tree.
Prerequisites for adding an node to a property tree.
Creation of class (T_code CL02) & Charactertics (T_Code CL04)
Assigning the charactertics to class.
Assigning the VAT to the Property Tree
Now you need to assign the VAT to the property tree, make sure you give the correct ID & level so that the new node appears in the exact level as you desired.
Check the following threads as well.
http://help.sap.com/saphelp_erp60_sp/helpdata/en/a7/286ec70a6c11d28a220000e829fbbd/content.htm
http://help.sap.com/saphelp_470/helpdata/en/a7/286d1d0a6c11d28a220000e829fbbd/content.htm
http://scn.sap.com/docs/DOC-40989
Regards
Dhinesh -
Tree Label - verticalAlign??
I've gone round and round with this tree component trying to
get the labelField to verticalAlign to the middle and still I can't
get it to stop aligning to the top.
I would like help in figuring this out so that I may use
bigger icons with my Tree component.
If someone would be so kind to share the css code or the
direct style declaration for the tree label it would be greatly
appreciated.
Thank you in advance to the kind soul who chooses to help outFound the solution...
Of course an item renderer has be incorporated into the
solution.
You make a class that extends the TreeItemRenderer and then
override
the protected function createChildren()
then you put in that function the following:
super.createChildren();
super.label.multiline = true;
super.label.autoSize = TextFieldAutoSize.LEFT;
and that's all you need to get the label to render correctly
with the vertical align property on the tree component. Don't
forget to set your new component class as the tree's
itemRenderer. -
ALV Tree with editable checkbox
Hi all,
I have a ALV Tree with editable checkbox (for all the parent & leaf nodes) , as one of the column.On clicking of a button in toolbar , i should get the nodes which are checked in checkbox.
But the problem is i am not able to get the nodes which are checked through checkbox in the PAI of the screen,when the button is clicked.
I tried using
CALL METHOD wf_tree->get_checked_items
IMPORTING
et_checked_items = lint_selected_node.
but the return table is not containing any entries , even if check boxes are checked in ALV tree.I tried the GET_CHECKED_ITEMS method in event handler method of AFTER_USER_COMMAND and also CHECKBOX_CHANGE , but no success.
lfs_item_layout-fieldname = 'CHECK'.
lfs_item_layout-class = cl_gui_column_tree=>item_class_checkbox.
lfs_item_layout-editable = 'X'.
lfs_item_layout-CHOSEN = 'X'.
APPEND lfs_item_layout TO lint_item_layout.
CALL METHOD wf_tree->add_node
EXPORTING
i_relat_node_key = p_lfs_final_key
i_relationship = cl_gui_column_tree=>relat_last_child
i_node_text = l_node_text
is_outtab_line = p_gfs_final
is_node_layout = lfs_node
it_item_layout = lint_item_layout
IMPORTING
e_new_node_key = p_loc_qmnum_key.
Friends ,if you can suggest something.
Thanks
Abhijeethi ,
i have written below code for registering the CHECKBOX_CHANGE event of CL_GUI_ALV_TREE.
APPEND lfs_event TO lint_events.
lfs_event-eventid = cl_gui_column_tree=>eventid_CHECKBOX_CHANGE.
APPEND lfs_event TO lint_events.
CALL METHOD wf_tree->set_registered_events
EXPORTING
events = lint_events
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
illegal_event_combination = 3.
IF sy-subrc EQ 0.
* MESSAGE X208(00) WITH 'ERROR'. "#EC NOTEXT
ENDIF.
SET HANDLER lo_event_receiver->handle_checkbox_change FOR wf_tree.
* SET HANDLER lo_event_receiver->handle_button_click FOR wf_tree.
ENDIF.
Also according to below code , i have put a break point in the event handler method of CHECKBOX_CHANGE event , so that control shall come here when check box is checked on ALV tree ...
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS:
* handle_checkbox_change FOR EVENT checkbox_change OF cl_gui_alv_tree,
* importing fcode.
* handle_button_click FOR EVENT AFTER_USER_COMMAND OF cl_gui_alv_tree
* IMPORTING ucomm,
handle_CHECKBOX_CHANGE for event checkbox_change of cl_gui_alv_tree
importing CHECKED
FIELDNAME
NODE_KEY.
ENDCLASS. "lcl_event_receiver DEFINITION
* CLASS lcl_event_receiver IMPLEMENTATION
CLASS lcl_event_receiver IMPLEMENTATION.
METHOD handle_checkbox_change.
data : lint_selected_node TYPE LVC_T_CHIT.
BREAK abhijeetg.
* CHECKED
* FIELDNAME
* NODE_KEY
* case fcode.
* when 'SELALL'.
* perform select_all.
* CALL METHOD WF_TREE->GET_OUTTAB_LINE
* EXPORTING
* I_NODE_KEY =
** IMPORTING
** e_outtab_line =
** e_node_text =
** et_item_layout =
** es_node_layout =
** EXCEPTIONS
** node_not_found = 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.
* call method cl_gui_cfw=>dispatch.
CALL METHOD wf_tree->get_checked_items
IMPORTING
et_checked_items = lint_selected_node.
break abhijeetg.
ENDMETHOD.
ENDCLASS.
So according to you , I should get the control in the break point , but its not happening with this .. any thing missing ???
Edited by: abhijeet_7013 on Jun 21, 2011 10:31 PM -
I am trying to force changes made in a tree cell edit when focus to that tree node has been lost(like on an enter button press) but it always reverts to the old value. i have tried adding a CellEditorListener to force an enter key press on the editingCanceled action but this still reverts the value.
Anyone have any ideas on how to fix this?
Thanks.Hi,
Try to use
call method cl_gui_control=>set_focus exporting control = grid1.
a® -
Trigger label edit on node when added to Tree
I have a button which adds a node to a tree (through the
tree's data provider); the new node appears on the tree and is
automatically selected, which is great ---but how can I
automatically switch this node's label into edit mode without the
user having to click on it?
The effect I'm going for is, the new node appears, is
selected and is in edit mode, e.g. a new folder that was created
with the label "New Folder" the value of which should be changed.
So far I've only accomplished the first 2 (new node appears and is
selected) I haven't yet figured out how to pro grammatically
trigger the ItemClick event on the tree component for the final
step.Hi Tom,
Just had a similar issue that we were able to resolve successfully.
In our case, it appears that an Oracle DB JDBC driver can cause this random issue as described in <b>SAP notes #886596 and #1003198</b> ("Certain Oracle JDBC driver can cause data inconsistence.").
The notes include a resolution process and a work around recommendation to this issue, without having to apply a new SPS level...
Hope this helps (time has passed by since you asked this question, but it's never too late to get the right answer, as this issue seems to be persistent!).
Regards,
Joseph -
First, sorry for my English.
It is necessary to rename a treenode by selecting of a
menuitem from the contextual menu like to rename folder in Windows
explorer.
Did so:
1.) Last used treenode:
(- Tree in MXML)
<mx:Tree id="computerTree" width="100%" height="100%"
labelField="@label" showRoot="true"
dataProvider="{treeData}"
contextMenu="{treeMenu}"
itemRollOver="SetLastTreeItem(event)"
editable="false"
itemEditBeginning="Tree_itemEditBeginning(event)"/>
(- in ActionScript)
public function SetLastTreeItem(event:ListEvent):void
lastTreeItem = event.itemRenderer.data as XML;
2.) eventListener when ContextMenu item "rename" selected:
public function
ContextMenu_SelectItemRename(event:ContextMenuEvent):void
var y:int;
y=computerTree.getItemIndex(lastTreeItem);
tree.editedItemPosition={columnIndex:0, rowIndex:y};
tree.createItemEditor(0,y);
But that didn't work:
- itemEditor appears in necessary position, but empty.
- When itemEditor is closed there is an error in List.as.
(TypeError: Error #1009: Cannot access a property or method
of a null object reference.
at
mx.controls::List/endEdit()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\controls\Li st.as:2174]
at
mx.controls::List/editorKeyDownHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\m x\controls\List.as:2444])
May be someone knows the ways to rename a treenode by
selecting of a menuitem from the contextual menu, not by
mouseClick?
In adobe manual I has read:
"To create an editor at other times, set the
editedItemPosition property to generate the itemEditBegin event"
But this event does not come.
Textbrother,Tell us how to solve this problem, which method to use
-
Put it a String in my tree label
I have a tree and i print the tree putting newTree.labelField = "@label";, but i want to put something more in the labelField. Now I'm printing
Inbox
Sent
Folder
Folder2
And I want to put:
Inbox (8)
Sent (2)
Folder
Folder2 (1)
(x) can be a string or.. I don't know what. I don't know how can I put that, I try put it @label + '(2)' but don' work, the structure is different.
I can do it or not?use labelFunction.
private function tree_labelFunc(item:XML):String {
var label:String;
label = item.@label + '(' + item.@number_field + ')';
return label;
<mx:Tree id="tree"
dataProvider="{your_xmllist}"
labelFunction="tree_labelFunc"/> -
Hi,
I'm struggling with a tree problem.
Normal labels show up like this:
Very long labels however show up like this:
Problems:
1. Indent of the first line
2. following lines are too close to the icon
3. icon should be placed at the top
This is how I want the label to be presented:
Any help is welcome,
Thx,
DanyYou may have to make a custom TreeItemRenderer that extends the TreeItemRenderer class and do your stuff there. I looked at the updateDisplayList method of TreeItemRenderer.as and that seems to be the part of interest to you which is where the set the y variable for the icon and disclosureIcon. There is a style parameter in that method too that is used alight the label also.
-
Hey guys,
I'm new to developing in Flex, so please excuse any
ignorance.
I followed the basic tutorial to use Flex to import external
fonts... here's my CSS code:
@font-face {
src: url(components/fonts.swf);
fontFamily: "Blue Moon";
global
color: #000000;
fontFamily: "Blue Moon";
fontSize:20px;
Here's what's happening:
1) On my development machine, I have the "Blue Moon" font
installed. Everything works fine here - I see the Blue Moon font on
everything in my project, from the titles of Panels to Buttons, and
so on. Everything's great.
2) On all other machines, which do NOT have the Blue Moon
font installed, I see the Blue Moon font properly on the labels and
edit boxes, but NOT on the buttons or on the title areas of panels.
Here is my site, so you can see what I mean:
http://thedemenscycle.com/
Assuming you don't own the Blue Moon font, you should notice
that the panel titles are a default font, where the "Username" and
"Password" and edit box fields are the Blue Moon font.
I am forced to conclude that for whatever reason my code is
not applying the externally imported font to the panels and buttons
for whatever reason. But it DOES apply the local font on the
machine, if availible. I'm really quite confused.
Any insight / help would be greatly appreciated!
Thanks,I had this same problem, ended up just droping the fonts,
would be nice to see an official response to this issue. -
Synchronize recursive tree with edit form
Hi,
I am trying to synchronize recursive tree with form, i have followed this post exactly Oracle ADF Developer: ADF - Synchronizing form with recursive tree
the first level of the tree works but the inner levels does not.
I am using JDEV 11.1.2.3Try sample 83 here -
http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html#CodeCornerSamples -
Hello guys,
I need (again) your help!!!
How to I set focus (select text) when the Tree Item is in
edit mode???
I searched in web, but I could'nt find it.
See my code:
=====================================================================
editTree.mxml
=====================================================================
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import mx.managers.CursorManager;
import mx.core.UIComponent;
import mx.controls.Tree;
import mx.controls.listClasses.IListItemRenderer;
import mx.events.ListEvent;
import myComponents.TreeEditor;
private function disableEditing(event:ListEvent):void {
if (event.rowIndex==0) {
event.preventDefault();
public function processData(event:ListEvent):void {
event.preventDefault();
tree.editedItemRenderer.data.@label =
TreeEditor(event.currentTarget.itemEditorInstance).playlistName.text;
tree.destroyItemEditor();
tree.dataProvider.notifyItemUpdate(tree.editedItemRenderer);
]]>
</mx:Script>
<mx:Style>
Tree {
backgroundAlpha: 0;
borderStyle: none;
indentation: 6;
TextInput {
borderStyle: none;
backgroundAlpha: 0;
focusThickness: 1;
</mx:Style>
<mx:XML id="treeData" xmlns="">
<node label="PLAYLIST" type="lists" data="MA">
<node label="Musics" type="list" />
<node label="My Top Musics" type="list" />
<node label="Recently Added" type="list" />
</node>
</mx:XML>
<mx:Panel width="350" height="350" title="Edit">
<mx:Tree id="tree"
width="200"
height="220"
dataProvider="{treeData}"
labelField="@label"
editable="true"
itemEditor="myComponents.TreeEditor"
itemEditBeginning="disableEditing(event);"
itemEditEnd="processData(event);" >
</mx:Tree>
</mx:Panel>
</mx:Application>
=====================================================================
and...
=====================================================================
TreeEditor.mxml
=====================================================================
<?xml version="1.0" encoding="iso-8859-1"?>
<mx:VBox xmlns:mx="
http://www.adobe.com/2006/mxml"
implements="mx.managers.IFocusManagerComponent">
<mx:Script>
<![CDATA[
public var newName:String;
override public function drawFocus(isFocused:Boolean):void {
// This method can be empty, or you can use it
// to make a visual change to the component.
]]>
</mx:Script>
<mx:TextInput id="playlistName"
text="{data.@label}"
backgroundAlpha="1"
height="18"
change="newName=playlistName.text;" />
</mx:VBox>
=====================================================================
Thanks!!!
KleberHi there,
You can set the navigable and mouse-navigate property to no.
Then create a visual-attribute which you want to show when the user can't change the item.
When you want to change the visual_attribute for the item use:
set_item_property('<block>.<item>', VISUAL_ATTRIBUTE, '<name of attribute>'.
when you use enabled, the field is simply grey, but with the visual attribute you can show any color you like!
Hope this helps... -
How to make field editable in ALV tree in OOPs?
Hi Gems,
Again I need help from you all.
I am writing a program using OOPs and the uotput will be in ALV tree. I need to make a field editable in a perticular row.
I am doing it using layout but the program is giving error during
CALL METHOD CL_GUI_CFW=>FLUSH
EXCEPTIONS
CNTL_SYSTEM_ERROR = 1
CNTL_ERROR = 2.
This method is returning sy-subrc = 2 and I am unable to get the output.
I am using below code to make the field editable:
DATA: LT_LAYOUT_ITEM TYPE LVC_T_LAYI,
LS_LAYOUT_ITEM TYPE LVC_S_LAYI.
LS_LAYOUT_ITEM-FIELDNAME = 'ACPCKTWRT'. "ACPCKTWRT is the field name in the Internal table
LS_LAYOUT_ITEM-EDITABLE = 'X'.
APPEND LS_LAYOUT_ITEM TO LT_LAYOUT_ITEM.
CALL METHOD G_ALV_TREE->ADD_NODE
EXPORTING
I_RELAT_NODE_KEY = FP_RELAT_KEY
I_RELATIONSHIP = CL_GUI_COLUMN_TREE=>RELAT_LAST_CHILD
IS_OUTTAB_LINE = LS_TMP_FINFCNO "structure of the internal table
IS_NODE_LAYOUT =
IT_ITEM_LAYOUT = LT_LAYOUT_ITEM "Added layout to make the field editable
I_NODE_TEXT = LV_NODE_TEXT "Node text
IMPORTING
E_NEW_NODE_KEY = FP_NODE_KEY
EXCEPTIONS
RELAT_NODE_NOT_FOUND = 1
NODE_NOT_FOUND = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Please help me and let me know how to get the solution.Hello
The ALV tree control is not intended for making values editable (e.g. see
[How to make ALV tree columns editable|http://sap.ittoolbox.com/groups/technical-functional/sap-abap/how-to-make-alv-tree-columns-editable-2052414])
However, if you need an editable tree control then you have to use a different class (e.g. CL_ITEM_TREE_MODEL or CL_COLUMN_TREE_MODEL) but you will not have the ALV functionality of the ALV tree control.
Regards
Uwe -
Nokia C6-00 : 'Edit label' option is missing
Can anyone tell how to edit a label in a contact's details. If there is a label called Mobile, how can I change to Mobile (my place) ?.
This option is present in my Nokia N79 and Nokia 5320 expressmusic.nokia people have lost their mind and business. they must enable contact label edit in nokia e6 as in their all symbian phone. guys unite and oppos nokia for the same. need contact improvement update for nokia e6 soon from nokia.i
please support.i have 1800 contacts with edited labels in under each contact. they must also provide backup and restore option for atleast nokia to nokia phones..
Maybe you are looking for
-
How many devices can you have on Family sharing
I haven't set this up yet, but each family member has more than one device so I wondered if there was a limit.
-
Can you import more pictures into a photo book that is already in work?
Can you import more pictures into a photo book that is already in work? I have already spent many hours trying to create a photo album but came across more pictures to choose from. However, I don't know how to get these new pictures into the "list" o
-
Export And Import Agreements in B2B 11g (After renaming)
Hi All I am aware about the process to Export and Import the B2B agreements in Oracle B2B 11g. But, I want to export an agreement, rename the agreement name, Channel Name, Trading Partner name and re-import in the same instance. For e.g. If I have an
-
Where is the youku support?
in the update blurb for 10.1, it states there is added support for youku but even on apples screenshot of the sharing tab its not there!
-
How to transfer photos when upgrading from ver 6 to ver 11 HELP!!
Can someone please HELP. I have version 6 on my computer. I have a new version 11 FULL install on cd. After I install version 11, how do I transfer all of my pictures over from version 6? After that is completed, I assume that I can just uninstall