Dynamic Tree menu with checkbox
Dear Boss
Now I am in a problem for some task. But I have not ever done these. Please help me if you possible for you. I need a tree menu in java which has the following attributes:
v This check box will implement on Oracle form
v Checkbox Event tracking
v On check event data will save in database
v On check event text item of form will be re-query
I am looking for your reply
Aktar Chowdhury
Play around with it, it is simpler than you think! Add a spry menu to a page with a css menu on it, see how it is structured, then make the changes to get the results you want. A Spry menu uses a UL/LI structure very similar to that generated by css_menu, you just need to add a class to the LI.
//CSS Dynamic Menus required file
require_once('includes/cssmenus2/gwb_Menu2.inc.php');
//Begin Menu1
$Menu1 = new MX_Menu2('MenuBar1');
$Menu1->setQuery($rs_Menu1);
$Menu1->setPK("MenuID");
$Menu1->setFK("ParentID");
$Menu1->setNameField("MenuLabel");
$Menu1->setTitleField("Tip");
//URL parameters
$Menu1->setLinkField("Link");
$Menu1->setTargetField("");
// Layout
$Menu1->setLevel(-1);
$Menu1->setSkin("MenuBarVertical"); <---------
//End Menu1
body
<?php // Dynamic CSS Menu
echo $Menu1->render();
?>
css_menu2.inc.php
foreach($this->DBItems[$id] as $key=>$val){
$li_class = ' class="MenuBarItemSubmenu"'; <-----
//the efective row
Similar Messages
-
Creating TREE REPORT with CHECKBOX against each row
Hi Friends,
I need to create a <b>TREE REPORT with CHECK BOX</b> against each row. when the user selects a row and clicks on a custom button then those should get populated into an internal table. <b>This is HIGH priority</b> one and I have tried my best but couldnt find any solution. Please advise me some sol.
thanks in advance for your valuable time and help.
Regards
srithan
Message edited by me for easyness
ReddyHi
Following code is to add checkboxes in ALV tree:
FORM add_root_request USING pls_data_ TYPE csg_gs_outtab_p_key__l_is_sub_node_ TYPE c
CHANGING pl_carrid_key._node = nodes->add_node( related_node = p_key
relationship = cl_gui_column_tree=>relat_last_child ).
... §0.2 if information should be displayed at
the hierarchy column set the carrid as text for this node
text = p_ls_data-object.
node->set_text( text ).
... §0.3 set the data for the nes node
node->set_data_row( p_ls_data ).
item = node->get_hierarchy_item( ).
item = node->get_item( 'FCHECKBOX' ). "FCHECKBOX is my radio button field in internal table which I am using to populate the ALV
item->set_type( if_salv_c_item_type=>checkbox ).
pl_carrid_key = node->get_key( )._
CATCH cx_salv_msg.
ENDFORM_._Following code is for handling checbox_change event
PERFORM application_action_events.
FORM application_action_events .
data: lr_events type ref to cl_salv_events_tree.
*data gr_events type ref to lcl_handle_events.
lr_events = gr_tree->get_event( ).
create object gr_events.
set handler gr_events->check for lr_events.
set handler gr_events->on_link_click for lr_events.
set handler gr_events->on_before_user_command for lr_events.
set handler gr_events->on_after_user_command for lr_events.
set handler gr_events->on_keypress for lr_events.
endform. " application_action_events----
CLASS lcl_handle_events DEFINITION.
PUBLIC SECTION.
METHODS:
check FOR EVENT checkbox_change OF cl_salv_events_tree IMPORTING node_key columnname checked. "Here node_key is the row number
ENDCLASS. "lcl_handle_events DEFINITION
CLASS lcl_handle_events IMPLEMENTATION
§4.2 implement the events for handling the events of cl_salv_table
CLASS lcl_handle_events IMPLEMENTATION_._
METHOD check_._
WRITE 'hello'_._
DATA lwa_modify_check_ TYPE REF TO csg_gs_outtab.
node_key = node_key - 1_._
READ TABLE csg_gt_list INDEX node_key REFERENCE INTO lwa_modify_check._
if columnname = 'FCHECKBOX'_._
IF checked = 'X'_._
If the value in internal table is set to X, then it is deselct
lwa_modify_check->fcheckbox =_ ' '_._
ELSE_._
lwa_modify_check->fcheckbox =_ 'X'_._
ENDIF_._
ENDIF_._
if columnname = 'CHECKBOX_READ'_._
IF checked = 'X'_._
If the value in internal table is set to X, then it is deselct
lwa_modify_check->checkbox_read =_ ' '_._
ELSE_._
lwa_modify_check->checkbox_read =_ 'X'_._
ENDIF_._
ENDIF_._
*MODIFY TABLE csg_gt_list from l_wa_modify_check.
flag_test = flag_test + 1_._
ENDMETHOD_._ "check
ENDCLASS_._ "lcl_handle_events IMPLEMENTATION
Please give me reward points -
ALV Tree Problem with Checkboxes
Hello,
i've got a problem.
I have an ALV-Tree and die ALV-Detaillist of the tree are type checkbox.
That's working correct.
But i want to fill initial data in the checkboxes but the checkbox isnt set.
i've done as followed:
CALL METHOD go_alv_tree->set_table_for_first_display
EXPORTING
I_STRUCTURE_NAME =
IS_VARIANT =
I_SAVE =
i_default = abap_false
is_hierarchy_header = ls_header
IS_EXCEPTION_FIELD =
IT_SPECIAL_GROUPS =
IT_LIST_COMMENTARY =
I_LOGO =
I_BACKGROUND_ID =
IT_TOOLBAR_EXCLUDING =
CHANGING
it_outtab = <go_data_tab>
IT_FILTER =
it_fieldcatalog = lt_fcat.
fieldcat are several fields all as checkbox.
Then i get a component of the output structure and set a X.
ASSIGN COMPONENT lv_help_arbpl OF STRUCTURE <go_data_struc>
TO <fs_arbl>.
IF <fs_arbl> IS ASSIGNED.
<fs_arbl> = lc_xfeld.
ENDIF.
CALL METHOD go_alv_tree->add_node
EXPORTING
i_relat_node_key = lv_matnr
i_relationship = cl_gui_column_tree=>relat_last_child
is_outtab_line = <go_data_struc>
is_node_layout = ls_layout
IT_ITEM_LAYOUT =
i_node_text = lv_node_text
IMPORTING
e_new_node_key = lv_period
EXCEPTIONS
relat_node_not_found = 1
node_not_found = 2
OTHERS = 3.
in <go_data_struc> the fields which should be set, are set with X.
But after i add all of my nodes and do CALL METHOD p_go_alv_tree->frontend_update, the checkbox is empty but there is an X in the field beside the checkbox.
Thanks in advance.
best regards,
DennisOk i solved the problem.
best regards,
Dennis -
Dynamic List/Menu with 2 columns
I have created a Dynamic List/Menu box based on a recordset and showing me one field of that recordset ['Firmanaam'].
<?php
do {
?>
<option value="<?php echo $row_klantenselectie['Firmanaam']?>"><?php echo $row_klantenselectie['Firmanaam']?></option>
<?php
} while ($row_klantenselectie = mysql_fetch_assoc($klantenselectie));
$rows = mysql_num_rows($klantenselectie);
if($rows > 0) {
mysql_data_seek($klantenselectie, 0);
$row_klantenselectie = mysql_fetch_assoc($klantenselectie);
?>
First question what is the difference between 'values" and 'labels' in the creation box of the Dynamic List/menu as only the field entered in the 'labels" is shown in the listbox ?
Secondly I want to display two columns in the List box (one column with the client ID and one column with the clients name). How do I proceed ? Afterwards clicking on the selected client should send the client ID to another field in the form.
Thank you for your replies.Moved to the Develop server-side applications in Dreamweaver forum, which deals with this sort of issue.
First question:
The Values field in the Dynamic List/menu dialog box populates the value attribute in the opening <option> tag. Because it's an HTML attribute, it's not displayed when the page is rendered in a browser. The Labels field puts the text that will be displayed in the drop-down menu between the opening and closing <option> tags.
Put the value you want displayed in the Labels field, and the value you want sent to the server when the form is submitted in the Values field.
Second question:
Normally, you would put the ID in the Values field, and the name in the Labels field.
Because the value attribute will contain the ID, it shouldn't normally be necessary to populate another field with the selected value because the ID will be sent to the server with the rest of the form data when the form is submitted. -
Christmas Tree Table with checkboxes
I am using the JTable (CTTable, CTTableCellRenderer, and VisibleTableModelEvent) found at http://java.sun.com/products/jfc/tsc/articles/ChristmasTree/.
The problem that I am having is that I inserted a column with checkboxes. In that column, it shows the text value (true/false) instead of the checkbox. When I click on a cell in the column, it shows the checkbox while the mouse button is depressed. After clicking on the cell, the checkbox disappears and the value changes (example: if it was false before clicking, it becomes true after clicking).
Also, I have tried using my table with the standard JTable class and the checkboxes work correctly.Thanks Frank.
You are correct I am setting the Bind variable via client method dropped as default activity in TF.
I tried to utilize ensureVariableManager method in VOImpl and setting the Variable Value but when I try accessing the value of bind variable via get<BindVariableName>
I end up in stackOverFlow error.
Then I tried to override execute query by putting this lines before super.executeQuery();
ensureVariableManager().setVariableValue("BindVariableName", value);
but I guess this is not setting the Bind Variable too..
What am I doing wrong ?
Amit -
Dynamic Treeview(MyComputer) with checkbox
could anyone tell me display the Filesystem in treeview with checkbox using Flex. i want to display the Filesystem(c:) in treeview and add checkbox
for all files and directory is it possible, pls help meActually, P1_region is one item
But this item comes from a select query which returns more than one result
So I have 1 item and numerous chekboxes that i can check
I don't understand what type is your regions_selected item.
I really think that your post is of help because I saw in the session that p1_region take a value like this: region1:region2:region3 if i select 3 regions
My problem is now to make it become : 'region1','region2','region3'
thx
Jonathan -
Creating a dynamic nested menu with xml data received from a webservice
I need to create a dynamic menu based on a xml returned by a webservice.
the xml comes basically in this format:
[quote]
<resposta>
<status>Success</status>
<mensagem>Whatever</mensagem>
<dados>
<projeto nome="name" cliente="client name">
<atividade nome="name">
<etapa>
<nome>name</nome>
<other_attributes>...</other_attributes>
</etapa>
(other etapas)
</atividade>
(other atividades)
</projeto>
(other projetos)
</dados>
</resposta>
[/quote]
What I need is to create a menu like:
- Projeto.Nome - Projeto.Cliente:
- Atividade.nome:
(start button) etapa1
(start button) etapa2
- Projeto2.Nome - Projeto2.Cliente:
- Atividade.nome:
(start button) etapa1
(start button) etapa2
And so on...
I've tried using an HTTPService and a DataGroup, this code above works fine for display the projeto's names:
[quote]
<s:HTTPService id="loginService"
url="http://timesheet.infinitech.local/services"
method="POST" contentType="application/xml"
result="handleLoginResult();"
fault="handleFault(event);" >
<s:request xmlns="">
<requisicao>
<tipo>login</tipo>
<usuario>{campoUsuario.text}</usuario>
<senha>{campoSenha.text}</senha>
</requisicao>
</s:request>
</s:HTTPService>
and the DataGroup:
<s:DataGroup dataProvider="{tarefasService.lastResult.resposta.dados.projeto}" width="100%" y="100" x="20"
includeIn="Principal">
<s:layout>
<s:VerticalLayout />
</s:layout>
<s:itemRenderer>
<fx:Component>
<s:ItemRenderer>
<s:layout>
<s:HorizontalLayout />
</s:layout>
<s:Button />
<s:Label text="{data.nome}" />
</s:ItemRenderer>
</fx:Component>
</s:itemRenderer>
</s:DataGroup>
[/quote]
I have then tried including another datagroup inside the datagroup item renderer, but I just couldn't get it to work anyway, and tried it in a lot of ways... (basically, it would be a datagroup with dataProvider={data.atividade}).
Can anyone tell me how to get this to work?
I've uploaded an example xml, you can use it as the url for the HTTPService:
http://www.pdinfo.com.br/example.xml
Thanks in advance.Hi,
A lot of the information you need is in Adobe's scripting guide http://www.adobe.com/go/learn_lc_scriptingReference Also there is a very useful Adobe guide to Calculations and Scripts (and while it is for version 6 it is still very good because of the way it is laid out) http://partners.adobe.com/public/developer/en/tips/CalcScripts.pdf
The Javascript could be used in the Layout: Ready event.
For italic font:
if (...some test...)
this.font.posture = "italic";
else
this.font.posture = "normal";
For bold font:
if (...some test...)
this.font.weight = "bold";
else
this.font.weight = "normal";
The script will change the font for the complete field. I don't think you can change parts of a field.You can also change font colour and font type (the guides above will help).
Good luck,
Niall -
Creating Tree Menu with each node referring to a different page
Hi,
I've got a Tree with I would like to refer to a different page to each single leaf.
Tree is the following :
select "ID_MENU" id,
"MENU_UNDER" pid,
"MENU_NAME" name,
'f?p=&APP_ID.:&app_page_id.:&SESSION.::NO::FSP_AFTER_LOGIN_URL:'||"ID_MENU" link,
null a1,
null a2
from "#OWNER#"."MENU"
How is possible to refer each single page, stored into the MENU table (wihich contain the menu) to a different node leaf ?
MENU Table is the following :
create table MENU
ID_MENU NUMBER not null,
MENU_NAME VARCHAR2(500),
MENU_UNDER VARCHAR2(500),
PAGE_LINK VARCHAR2(500)
Thanks,
IvanIs your MENU table a hierarchical table or just flat. It looks flat, because it doesn't seem to have a foreign key to it's parent menu. Do you just have two levels?
BTW, you normally would use PAGE_LINK in your link column.
Why not create a hierarchical table as follows:
create table MENU
ID_MENU NUMBER not null,
MENU_NAME VARCHAR2(500),
PARENT_ID_MENU NUMBER,
PAGE_ID NUMBER
);PARENT_ID_MENU would contain the ID_MENU of the parent menu, for the root menus it would be NULL.
Then your query would look as follow:
select ID_MENU AS id,
, PARENT_ID_MENU AS pid
, MENU_NAME AS name
, CASE
WHEN PAGE_ID IS NOT NULL THEN 'f?p=&APP_ID.:'||PAGE_ID||':'||:SESSION
ELSE NULL
END AS link
, null AS a1
, null AS a2
from "#OWNER#".MENUPatrick
My APEX Blog: http://inside-apex.blogspot.com
The ApexLib Framework: http://apexlib.sourceforge.net
The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/ -
Hi
I want a report in which the report should have tree structure and along with check box
Regards
SnehaHI
Check this standard report
SAPCOLUMN_TREE_CONTROL_DEMO
*& Report ZTREE *
REPORT ZTREE .
DATA: BEGIN OF ITEMS OCCURS 100,
ID(10),
PARENT_ID(10),
TEXT(20),
SYMBOL,
END OF ITEMS,
TABIX_STACK LIKE SY-TABIX OCCURS 10 WITH HEADER LINE,
ITEMS_SHOW LIKE ITEMS OCCURS 100 WITH HEADER LINE.
INCLUDE <SYMBOL>.
\* append sample items (mixed order)
PERFORM APPEND_ITEM USING:
'1' '' 'Food',
'2' '' 'Drinks',
'12' '9' 'Pavan Praveen',
'17' '11' 'company',
'3' '' 'Tools',
'4' '1' 'Dairy milk',
'16' '11' 'Music',
'5' '1' 'Chocolate',
'6' '2' 'Alcoholic',
'8' '4' 'Megastar',
'10' '5' 'Milk',
'11' '3' 'Boost',
'13' '9' 'Sachin ',
'7' '4' 'Cricket',
'14' '2' 'Non-alcholic',
'35' '31' 'Pepsi',
'9' '6' 'Thumsup',
'15' '14' 'Coca-cola',
'18' '6' 'Win',
'28' '18' 'Ganguly ',
'33' '28' 'INDIA',
'34' '28' 'Gujarat',
'29' '18' 'State',
'30' '29' 'congrats',
'19' '33' 'chiranjeevi',
'20' '33' 'kalyan',
'22' '19' 'here comes',
'23' '19' 'Chandra',
'24' '20' 'chat',
'32' '31' 'Marvelous',
'25' '20' 'Memorable',
'31' '34' 'guess'.
\* show initial list (items with level 0 - parentless items)
LOOP AT ITEMS WHERE PARENT_ID = ''.
MOVE-CORRESPONDING ITEMS TO ITEMS_SHOW.
ITEMS_SHOW-SYMBOL = '+'.
APPEND ITEMS_SHOW.
ENDLOOP.
PERFORM PRINT_TREE TABLES ITEMS_SHOW.
\* at line-selection - when the node is opened/closed or item double-clk
AT LINE-SELECTION.
READ TABLE ITEMS WITH KEY PARENT_ID = ITEMS_SHOW-ID. "see 'hide'
IF SY-SUBRC = 0. "item has children - expand or collapse
SY-LSIND = 0.
PERFORM EXPAND_COLLAPSE USING ITEMS_SHOW-ID.
PERFORM PRINT_TREE TABLES ITEMS_SHOW.
ELSE. "item has NO children - perform some action
READ TABLE ITEMS WITH KEY ID = ITEMS_SHOW-ID.
WRITE: 'Action performed on item "' NO-GAP, ITEMS-TEXT NO-GAP,
'", id.', ITEMS-ID.
ENDIF.
\* form print_tree
FORM PRINT_TREE TABLES ITEMS STRUCTURE ITEMS.
DATA: V_TABIX LIKE SY-TABIX,
START_TABIX LIKE SY-TABIX,
V_LEVEL LIKE SY-TFILL,
V_OFFSET TYPE I,
V_ID LIKE ITEMS-ID,
V_PARENT_ID LIKE ITEMS-PARENT_ID,
V_PARENT_ID_FOR_VLINE LIKE ITEMS-PARENT_ID,
V_PREV_LEVEL TYPE I,
V_ITEMS_COUNT LIKE SY-TFILL,
V_VLINES_STRING(200).
CHECK NOT ITEMS[] IS INITIAL.
SORT ITEMS BY PARENT_ID ID.
READ TABLE ITEMS INDEX 1.
V_PARENT_ID = ITEMS-PARENT_ID.
START_TABIX = 1.
REFRESH TABIX_STACK.
DO.
LOOP AT ITEMS FROM START_TABIX.
V_TABIX = START_TABIX = SY-TABIX."remember current index
V_ID = ITEMS-ID.
V_PARENT_ID_FOR_VLINE = ITEMS-PARENT_ID.
\* decrease level and exit loop if parent not the same as previous
IF ITEMS-PARENT_ID NE V_PARENT_ID.
PERFORM READ_FROM_STACK CHANGING START_TABIX. "level = NoOfRecs
READ TABLE ITEMS INDEX START_TABIX.
V_PARENT_ID = ITEMS-PARENT_ID.
ADD 1 TO START_TABIX. "next loop starts from parent index + 1
\* clear vline
IF V_LEVEL > 1.
V_OFFSET = 2 + ( V_LEVEL - 2 ) * 3.
IF V_LEVEL = 1. V_OFFSET = 1. ENDIF.
V_VLINES_STRING+V_OFFSET = ' '.
ENDIF.
EXIT.
ENDIF.
V_PARENT_ID = ITEMS-PARENT_ID.
\* write item
FORMAT COLOR OFF.
DESCRIBE TABLE TABIX_STACK LINES V_LEVEL."level is no of StackRecs
WRITE: / V_VLINES_STRING.
V_OFFSET = V_LEVEL * 3.
IF V_LEVEL NE 0.
IF V_PREV_LEVEL < V_LEVEL.
WRITE: AT V_OFFSET '|', / ''.
WRITE: / V_VLINES_STRING.
ENDIF.
V_OFFSET = V_LEVEL * 3.
WRITE AT V_OFFSET '|--'.
ENDIF.
V_OFFSET = V_OFFSET + 3.
CASE ITEMS-SYMBOL.
WHEN '+'.
WRITE AT V_OFFSET SYM_PLUS_FOLDER AS SYMBOL
COLOR 4 INTENSIFIED HOTSPOT.
WHEN '-'.
WRITE AT V_OFFSET SYM_MINUS_FOLDER AS SYMBOL
COLOR 4 INTENSIFIED HOTSPOT.
WHEN OTHERS. FORMAT COLOR 5.
ENDCASE.
WRITE: ITEMS-TEXT.
V_PREV_LEVEL = V_LEVEL.
HIDE: ITEMS-ID.
ADD 1 TO V_ITEMS_COUNT.
READ TABLE ITEMS WITH KEY PARENT_ID = ITEMS-ID.
\* increase level and exit loop if item has children
IF SY-SUBRC = 0.
START_TABIX = SY-TABIX.
APPEND V_TABIX TO TABIX_STACK. "level is no of recs in stack
V_PARENT_ID = ITEMS-PARENT_ID.
\* set vline
V_TABIX = V_TABIX + 1.
READ TABLE ITEMS INDEX V_TABIX.
V_OFFSET = 2 + ( V_LEVEL - 1 ) * 3.
IF V_LEVEL > 0.
IF ITEMS-PARENT_ID = V_PARENT_ID_FOR_VLINE AND SY-SUBRC = 0.
V_VLINES_STRING+V_OFFSET = '|'.
ELSE.
V_VLINES_STRING+V_OFFSET = ' '.
ENDIF.
ENDIF.
EXIT.
ENDIF.
\* at last - decrease level
AT LAST.
\* clear vline
IF V_LEVEL > 1.
V_OFFSET = 2 + ( V_LEVEL - 2 ) * 3.
IF V_LEVEL = 1. V_OFFSET = 1. ENDIF.
V_VLINES_STRING+V_OFFSET = ' '.
ENDIF.
" next loop starts from parent index, not parent index + 1
" because of different parents level will decrease anyway
PERFORM READ_FROM_STACK CHANGING START_TABIX.
APPEND START_TABIX TO TABIX_STACK. "must return index to stack
ENDAT.
ENDLOOP.
DESCRIBE TABLE ITEMS.
IF START_TABIX > SY-TFILL OR V_ITEMS_COUNT >= SY-TFILL.
EXIT.
ENDIF.
ENDDO.
ENDFORM.
\* form expand_collapse
FORM EXPAND_COLLAPSE USING VALUE(V_ID).
DATA: V_NO_MORE_ORPHANS,
ITEMS_TEMP LIKE ITEMS OCCURS 100 WITH HEADER LINE.
DELETE ITEMS_SHOW WHERE PARENT_ID = V_ID. "try to collapse
IF SY-SUBRC = 0. "succesfull first collapse
DO. "cascade collapse - delete 'orphans' that are left
REFRESH ITEMS_TEMP.
MOVE ITEMS_SHOW\[] TO ITEMS_TEMP[].
SORT ITEMS_TEMP BY ID.
V_NO_MORE_ORPHANS = 'X'.
LOOP AT ITEMS_SHOW WHERE PARENT_ID NE ''.
READ TABLE ITEMS_TEMP WITH KEY ID = ITEMS_SHOW-PARENT_ID
BINARY SEARCH TRANSPORTING NO FIELDS.
IF SY-SUBRC NE 0. "no parent - it's an orphan
CLEAR V_NO_MORE_ORPHANS.
DELETE ITEMS_SHOW.
ENDIF.
ENDLOOP.
IF V_NO_MORE_ORPHANS = 'X'. EXIT. ENDIF.
ENDDO.
ITEMS_SHOW-SYMBOL = '+'.
MODIFY ITEMS_SHOW TRANSPORTING SYMBOL WHERE ID = V_ID.
ELSE. "unsuccessfull collapse - expand
ITEMS_SHOW-SYMBOL = '-'.
MODIFY ITEMS_SHOW TRANSPORTING SYMBOL WHERE ID = V_ID.
LOOP AT ITEMS WHERE PARENT_ID = V_ID. "show children
APPEND ITEMS TO ITEMS_SHOW.
ENDLOOP.
LOOP AT ITEMS_SHOW WHERE PARENT_ID = V_ID. "check grandchildren
READ TABLE ITEMS WITH KEY PARENT_ID = ITEMS_SHOW-ID.
IF SY-SUBRC = 0.
ITEMS_SHOW-SYMBOL = '+'.
ELSE.
ITEMS_SHOW-SYMBOL = ''.
ENDIF.
MODIFY ITEMS_SHOW.
ENDLOOP.
ENDIF.
ENDFORM.
\* form append_item
FORM APPEND_ITEM USING VALUE(ID) VALUE(PARENT_ID) VALUE(TEXT).
ITEMS-ID = ID.
ITEMS-PARENT_ID = PARENT_ID.
ITEMS-TEXT = TEXT.
APPEND ITEMS.
ENDFORM.
\* form read_from_stack
FORM READ_FROM_STACK CHANGING TABIX LIKE SY-TABIX.
DESCRIBE TABLE TABIX_STACK.
CHECK SY-TFILL NE 0.
READ TABLE TABIX_STACK INDEX SY-TFILL.
TABIX = TABIX_STACK.
DELETE TABIX_STACK INDEX SY-TFILL.
ENDFORM.
Or use this FM RS_TREE_SET_CURRENT_LAYOUT
*& Report ZTREESTRUC *
REPORT ZTREESTRUC .
Type-pools : fibs,stree.
data : t_node type snodetext.
data : node_tab like t_node occurs 0 with header line.
clear : node_tab, node_tab[].
node_tab-type = 'T'.
node_tab-name = 'Earth'.
node_tab-tlevel = '01'.
node_tab-nlength = '5'.
node_tab-color = '4'.
node_tab-text = 'Hello'.
node_tab-tlength ='5'.
node_tab-tcolor = 3.
append node_tab.
clear node_tab.
node_tab-type = 'P'.
node_tab-name = 'Europe'.
node_tab-tlevel = '02'.
node_tab-nlength = '6'.
node_tab-color = '1'.
node_tab-text = 'Hello'.
node_tab-tlength ='5'.
node_tab-tcolor = 4.
append node_tab.
clear node_tab.
node_tab-type = 'P'.
node_tab-name = 'Germany'.
node_tab-tlevel = '03'.
node_tab-nlength = '7'.
node_tab-color = '4'.
node_tab-text = 'Hello'.
node_tab-tlength ='5'.
node_tab-tcolor = 4.
append node_tab.
clear node_tab.
node_tab-type = 'P'.
node_tab-name = 'Berlin'.
node_tab-tlevel = '04'.
node_tab-nlength = '6'.
node_tab-color = '4'.
node_tab-text = 'Hello'.
node_tab-tlength ='5'.
node_tab-tcolor = 3.
append node_tab.
clear node_tab.
node_tab-type = 'P'.
node_tab-name = 'Asia'.
node_tab-tlevel = '02'.
node_tab-nlength = '4'.
node_tab-color = '1'.
node_tab-text = 'Hello'.
node_tab-tlength ='5'.
node_tab-tcolor = 3.
append node_tab.
clear node_tab.
node_tab-type = 'P'.
node_tab-name = 'India'.
node_tab-tlevel = '03-'.
node_tab-nlength = '5'.
node_tab-color = '1'.
node_tab-text = 'Hello'.
node_tab-tlength ='5'.
node_tab-tcolor = 3.
append node_tab.
clear node_tab.
node_tab-type = 'P'.
node_tab-name = 'Bombay'.
node_tab-tlevel = '04-'.
node_tab-nlength = '6'.
node_tab-color = '1'.
node_tab-text = 'Hello'.
node_tab-tlength ='5'.
node_tab-tcolor = 3.
append node_tab.
clear node_tab.
CALL FUNCTION 'RS_TREE_CONSTRUCT'
\* EXPORTING
INSERT_ID = '000000'
RELATIONSHIP = ' '
LOG =
TABLES
NODETAB = node_tab
\* EXCEPTIONS
TREE_FAILURE = 1
ID_NOT_FOUND = 2
WRONG_RELATIONSHIP = 3
OTHERS = 4
IF SY-SUBRC 0.
\* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
DATA: type_mapping TYPE stree_ctl_type_mapping_tab.
DATA: wa_type TYPE stree_ctl_type_mapping.
CLEAR: type_mapping[].
wa_type-type = 'A'.
wa_type-icon = '@BL@'.
APPEND wa_type TO type_mapping.
*CALL FUNCTION 'RS_TREE_CONTROL_PREPARE'
\* EXPORTING
CONTROL_PATTERN = STREE_CTL_GENERIC
CONTROL_PATTERN = 'PH'
\** HIERARCHY_HEADER =
INITIAL_HEADER_WIDTH =
LIST_ITEM_HEADER =
MULTIPLE_SELECTION = 'X'
ITEM_SELECTION = STREE_FALSE
SUPPRESS_NODE_ICON = STREE_FALSE
SUPPRESS_FOLDER_ICON = STREE_FALSE
CALLBACK_PROGRAM =
CALLBACK_ITEM_DISPLAY =
COLOR_MAPPING =
TYPE_MAPPING = type_mapping
IMPORTING
SUBSCREEN_PROGRAM =
SUBSCREEN_DYNNR =
EXCEPTIONS
NOT_AVAILABLE = 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 FUNCTION 'RS_TREE_SET_CURRENT_LAYOUT'
\** EXPORTING
CURSOR_COLUMN = 3
CURSOR_LINE = 2
FIRST_NODE = 1
FIRST_NODE_TYPE = ' '
LIST_COLUMN = 1
LIST_LINE = 1
LAYOUT_MODE = STREE_LAYOUT_NORMAL
IMPORTING
INCONSISTENT_LAYOUT =
TABLES
LAYOUT =
CALL FUNCTION 'RS_TREE_LIST_DISPLAY'
EXPORTING
\* CALLBACK_PROGRAM =
CALLBACK_USER_COMMAND =
CALLBACK_TEXT_DISPLAY =
CALLBACK_MOREINFO_DISPLAY =
CALLBACK_COLOR_DISPLAY =
CALLBACK_TOP_OF_PAGE =
CALLBACK_GUI_STATUS =
CALLBACK_CONTEXT_MENU =
STATUS = 'IMPLICIT'
CHECK_DUPLICATE_NAME = '1'
COLOR_OF_NODE = '4'
COLOR_OF_MARK = '3'
COLOR_OF_LINK = '1'
COLOR_OF_MATCH = '5'
LOWER_CASE_SENSITIVE = ' '
MODIFICATION_LOG = ' '
NODE_LENGTH = 30
TEXT_LENGTH = 75
TEXT_LENGTH1 = 0
TEXT_LENGTH2 = 0
RETURN_MARKED_SUBTREE = ' '
SCREEN_START_COLUMN = 0
SCREEN_START_LINE = 0
SCREEN_END_COLUMN = 0
SCREEN_END_LINE = 0
SUPPRESS_NODE_OUTPUT = ' '
LAYOUT_MODE = ' '
USE_CONTROL = STREE_USE_LIST
USE_CONTROL = 'L'.
\* IMPORTING
F15 =
**********end of program
For Tree structure in alv
Check this
*& Report ZALVTREE *
REPORT ZALVTREE .
*Data Declaration
TABLES: ekko.
TYPE-POOLS: slis. "ALV Declarations
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
it_ekpo TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
it_emptytab TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko,
wa_ekpo TYPE t_ekko.
DATA: ok_code like sy-ucomm, "OK-Code
save_ok like sy-ucomm.
*ALV data declarations
DATA: fieldcatalog TYPE lvc_t_fcat WITH HEADER LINE.
DATA: gd_fieldcat TYPE lvc_t_fcat,
gd_tab_group TYPE slis_t_sp_group_alv,
gd_layout TYPE slis_layout_alv.
*ALVtree data declarations
CLASS cl_gui_column_tree DEFINITION LOAD.
CLASS cl_gui_cfw DEFINITION LOAD.
DATA: gd_tree TYPE REF TO cl_gui_alv_tree,
gd_hierarchy_header TYPE treev_hhdr,
gd_report_title TYPE slis_t_listheader,
gd_logo TYPE sdydo_value,
gd_variant TYPE disvariant.
*Create container for alv-tree
DATA: l_tree_container_name(30) TYPE c,
l_custom_container TYPE REF TO cl_gui_custom_container.
*Includes
*INCLUDE ZDEMO_ALVTREEO01. "Screen PBO Modules
*INCLUDE ZDEMO_ALVTREEI01. "Screen PAI Modules
*INCLUDE ZDEMO_ALVTREEF01. "ABAP Subroutines(FORMS)
*Start-of-selection.
START-OF-SELECTION.
\* ALVtree setup data
PERFORM data_retrieval.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM build_hierarchy_header CHANGING gd_hierarchy_header.
PERFORM build_report_title USING gd_report_title gd_logo.
PERFORM build_variant.
\* Display ALVtree report
call screen 100.
*& Form DATA_RETRIEVAL
\* Retrieve data into Internal tables
FORM data_retrieval.
SELECT ebeln
UP TO 10 ROWS
FROM ekko
INTO corresponding fields of TABLE it_ekko.
loop at it_ekko into wa_ekko.
SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
FROM ekpo
appending TABLE it_ekpo
where ebeln eq wa_ekko-ebeln.
endloop.
ENDFORM. " DATA_RETRIEVAL
*& Form BUILD_FIELDCATALOG
\* Build Fieldcatalog for ALV Report
FORM build_fieldcatalog.
\* Please not there are a number of differences between the structure of
ALVtree fieldcatalogs and ALVgrid fieldcatalogs.
For example the field seltext_m is replace by scrtext_m in ALVtree.
fieldcatalog-fieldname = 'EBELN'. "Field name in itab
fieldcatalog-scrtext_m = 'Purchase Order'. "Column text
fieldcatalog-col_pos = 0. "Column position
fieldcatalog-outputlen = 15. "Column width
fieldcatalog-emphasize = 'X'. "Emphasize (X or SPACE)
fieldcatalog-key = 'X'. "Key Field? (X or SPACE)
\* fieldcatalog-do_sum = 'X'. "Sum Column?
fieldcatalog-no_zero = 'X'. "Don't display if zero
APPEND fieldcatalog TO gd_fieldcat.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-scrtext_m = 'PO Iten'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 1.
APPEND fieldcatalog TO gd_fieldcat..
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'STATU'.
fieldcatalog-scrtext_m = 'Status'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 2.
APPEND fieldcatalog TO gd_fieldcat..
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-scrtext_m = 'Item change date'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 3.
APPEND fieldcatalog TO gd_fieldcat..
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-scrtext_m = 'Material Number'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 4.
APPEND fieldcatalog TO gd_fieldcat..
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-scrtext_m = 'PO quantity'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 5.
APPEND fieldcatalog TO gd_fieldcat..
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-scrtext_m = 'Order Unit'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 6.
APPEND fieldcatalog TO gd_fieldcat..
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-scrtext_m = 'Net Price'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 7.
fieldcatalog-datatype = 'CURR'.
APPEND fieldcatalog TO gd_fieldcat..
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-scrtext_m = 'Price Unit'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 8.
APPEND fieldcatalog TO gd_fieldcat..
CLEAR fieldcatalog.
ENDFORM. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
\* Build layout for ALV grid report
FORM build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
\* gd_layout-totals_only = 'X'.
gd_layout-f2code = 'DISP'. "Sets fcode for when double
"click(press f2)
gd_layout-zebra = 'X'.
gd_layout-group_change_edit = 'X'.
gd_layout-header_text = 'helllllo'.
ENDFORM. " BUILD_LAYOUT
*& Form build_hierarchy_header
\* build hierarchy-header-information
\* -->P_L_HIERARCHY_HEADER structure for hierarchy-header
FORM build_hierarchy_header CHANGING
p_hierarchy_header TYPE treev_hhdr.
p_hierarchy_header-heading = 'Hierarchy Header'(013).
p_hierarchy_header-tooltip = 'This is the Hierarchy Header !'(014).
p_hierarchy_header-width = 30.
p_hierarchy_header-width_pix = ''.
ENDFORM. " build_hierarchy_header
*& Form BUILD_REPORT_TITLE
\* Build table for ALVtree header
\* <-> p1 Header details
<-> p2 Logo value
FORM build_report_title CHANGING
pt_report_title TYPE slis_t_listheader
pa_logo TYPE sdydo_value.
DATA: ls_line TYPE slis_listheader,
ld_date(10) TYPE c.
\* List Heading Line(TYPE H)
CLEAR ls_line.
ls_line-typ = 'H'.
\* ls_line-key "Not Used For This Type(H)
ls_line-info = 'PO ALVTree Display'.
APPEND ls_line TO pt_report_title.
\* Status Line(TYPE S)
ld_date(2) = sy-datum+6(2).
ld_date+2(1) = '/'.
ld_date3(2) = sy-datum4(2).
ld_date+5(1) = '/'.
ld_date+6(4) = sy-datum(4).
ls_line-typ = 'S'.
ls_line-key = 'Date'.
ls_line-info = ld_date.
APPEND ls_line TO pt_report_title.
\* Action Line(TYPE A)
CLEAR ls_line.
ls_line-typ = 'A'.
CONCATENATE 'Report: ' sy-repid INTO ls_line-info SEPARATED BY space.
APPEND ls_line TO pt_report_title.
ENDFORM.
*& Form BUILD_VARIANT
\* Build variant
form build_variant.
\* Set repid for storing variants
gd_variant-report = sy-repid.
endform. " BUILD_VARIANT
Regards
Pavan -
Tree structure with checkboxes and radio buttons
Hi,
I am using SNODETEXT as tree structure. On the child node, I need to have checkboxes and radio buttons. Is this possible?Hi
Muse does not currently have dropdown lists, radio buttons, or checkboxes as part of the forms. You may want to check out using Adobe FormsCentral, Jotform, or Wufoo and inserting them via Object > Insert HTML as an alternative from the Muse forms, as those forms will have the lists, buttons, and checkboxes you're looking for.
Another way if you are publishing your site to Business Catalyst, then you can create forms in BC admin section and copy the form html in Muse page which will render the from that you have created in BC in your Muse site page.
More details :
http://helpx.adobe.com/business-catalyst/using/create-insert-form.html
Thanks,
Sanjit -
Dynamic From Menu with Sub Menu
I am trying to create a form where it has a drop down menu
that depending on what you select, will change the 2nd drop down
menu. For example, you would select one of the 50 states in the
first one (data pulled from Mysql) then then when you select a
state, the second drop down menu would list all of the cities in
the state you selected. I have made the 2 connections, but i have
no idea how to make one control the second one.
Thanks,
BenLog in to the Knowledge Exchange:
http://portalstudio.oracle.com/servlet/page?_pageid=2112&_dad=ops&_schema=OPSTUDIO
Once in, run a search for "DHTML Menu" and you should find something interesting created by a certain Ronaldo Viscuso. -
SharePoint Custom Tree view with CheckBoxes
How to Unhide and Hide Treenodes in treeview based on Checkbox checked changed event in Asp.net
BadriHow to
hide/unhide the all Treenodes on Treeview based on Checkbox changed event?
Checkbox(Control)
1.Checkbox Checked:(Action below like)
if user click on Checkbox, all the treenodes on treeview is hide.
2.Checkbox Unchecked(Action below like)
If user uncheck the Checkbox all the treenodes on treeview is unhode.
Thank you for your understanding, Iam not good at english.
Could you please help me how to do above one.
Badri -
Help using dynamic XML with Tree Menu
Can some one please help me? I don't know what I'm doing
wrong. I'd simply like to be able to load an XML file of data and
use this data to populate a Flex tree component.
The XML file needs to reside on the server and will change
from time to time, so I am loading it via an HTTPService call. The
part that I can't get to work is the way the
XML is displayed in the Tree component. It ends up blank or
sometimes I just get the result of "[object Object]". I know my
syntax must be screwed up somewhere, but because
AS3 and Flex are new territory for me, I can't get it to
work. I am feeling my IQ drop on a minute to minute basis. Please
help me if you can! Thanks!
In this example, I am expecting a list of the different
groceries/categories to show up in the tree menu. Instead, I get
nothing.
HERE IS THE XML FILE, CALLED "groceries.xml":
<catalog>
<category name="Meat">
<product name="Buffalo" cost="4" isOrganic="No"
isLowFat="Yes"/>
<product name="T Bone Steak" cost="6" isOrganic="No"
isLowFat="No"/>
<product name="Whole Chicken" cost="1.5" isOrganic="Yes"
isLowFat="No"/>
</category>
<category name="Vegetables">
<product name="Broccoli" cost="2.16" isOrganic="Yes"
isLowFat="Yes"/>
<product name="Vine Ripened Tomatoes" cost="1.69"
isOrganic="No" isLowFat="Yes"/>
<product name="Yellow Peppers" cost="1.25"
isOrganic="Yes" isLowFat="Yes"/>
</category>
<category name="Fruit">
<product name="Bananas" cost="0.95" isOrganic="Yes"
isLowFat="Yes"/>
<product name="Grapes" cost="1.34" isOrganic="No"
isLowFat="Yes" />
<product name="Strawberries" cost="2.5" isOrganic="Yes"
isLowFat="Yes"/>
</category>
</catalog>
HERE IS THE MXML FLEX FILE THAT ISN'T WORKING AS I'D LIKE IT
TO:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" initialize="initializeHandler(event)" width="240"
height="340">
<mx:Script>
<![CDATA[
import mx.collections.XMLListCollection;
import mx.collections.ICollectionView;
import mx.controls.List;
private function initializeHandler(event:Event):void {
textService.send();
private function resultHandler(event:Event):void {
myTree.dataProvider = textService.lastResult.catalog;
]]>
</mx:Script>
<mx:HTTPService id="textService" url="groceries.xml"
result="resultHandler(event)" />
<mx:Tree id="myTree" labelField="@name" showRoot="false"
x="20" y="20" width="200" height="300" />
</mx:Application>
Any help is deeply appreciated.You must specify a resultformat of e4x. The default
resultFormat is object. Object only works when you have a very
simple xml structure that can be consistently represented as a set
of objects. -
Adf Tree with checkboxes beside..
Hi All....
I have a requirement to make an application in adf (in j dev) where in i want a tree structure, beside each node in my tree,there should be 6 coloumns with checkboxes(the checked or unchecked values should get reflected in a DB table).Is it possible?and if yes,can u tell me any tutorial or a direction,as to how to proceed?
I could make a tree structure,but that doesnt serve my need.:(
Please help....
Waiting for your posts...
Thank you!!!!:)Check out SRDemo, there is an example of something similar there.
-
How to make a prog. Tree with Checkbox in JSF?
I am facing prob. to how to dev. prog. which contain Tree with Checkbox .
I want to use checkbox because whatever comes under any directory in Tree is selected if I select perticular folder from Tree?
Can you guide me guys ?
Ur help is needed to me.
Thanks,
Harshal JoshiI have worked whith JSF-s CheckBox components , It has a problem, when I used it with tables and Trees, so I think this components needs to develop.
enyone has other ideas about it, and knows how to do it?
Maybe you are looking for
-
Did this resolve my Safari 5 issue with not loading pages as fast?
I've been having this problem every since I got my laptop a month ago... I have a wireless router that's connected to a PC, and I use wireless on my laptop. My old laptop was a PC, and the internet connection was just fine on it. However, I'm having
-
Sourcing of GOA in Extended Classic Scenario
Hello all, We are using the <u>extended classic scenario</u> with both Purchase Contracts and Global Outline agreements. Is it possible to use the GOA in the back-end as a source of supply in the sourcing transaction in SRM? What setting do I have to
-
I have Oracle instance 8.1.7,character set UTF8. My clients are Windows NT, with installed proper fonts and NLS_LANG=AMERICAN_AMERICA.CL8MSWIN1251(Cyrilic). When I run reports(6i),output is OK(displays Cyrilic),but when I try to generate output to .P
-
R12.1.1 Upgrade - patch 6678700 - American English upgrade patch driver
Hi All, I am doing an upgrade from 11.5.10.2 to R12.1.1. I am executing the patch 6678700. I have given 25 workers to execute this patch. The patch is running for almost 1 hour and now I find only 1 worker is running and all the other workers are wai
-
Patching on PRD system and thereafter moving the logs to DR ?
Patching on PRD system and thereafter moving the logs to DR, will the patches take effect in DR ? We have patched our PRD system to the latest APPL patch levels, we have a DR system in place, the link for which was disabled before we started our patc