Multiple selection of rows in webdynpro
Hi All,
How can we achieve the multiple selection of rows in a table in webdynpro and delete the same.
If i have a table with 4 rows i have selected 2 rows and i have to delete those 2 rows.
Thanks in Advance,
Bsreddy.
Hi Srinivas,
Steps to make multiple rows selectable in table:
1) Create the selection property of the node that you are binding to the table as o..n
2) Un-check the, "Initialization Lead Selection" checkbox for the node which you are using to bind to the table
3) In the Layout go to the table & specify selection mode as MULTI_NO_LEAD. It is important that you set the selection mode to MULTI_NO_LEAD or else in the end you would be capturing 1 row lesser than the total number of rows the user has selected. This is because 1 of the rows would have the LeadSelection property & our logic wouldn't be reading the data for that row. Check the example code fragment as shown below:
Steps to get the multiple rows selected by the user:
In order to get the multiple rows which were selected by the user you will just have to call the get_selected_elements method of if_wd_context_node. First get the reference of the node which you have used to bind to the table & then call this method on it. Check the example code fragment below:
METHOD get_selected_rows .
DATA: temp TYPE string.
DATA: lr_node TYPE REF TO if_wd_context_node,
wa_temp TYPE REF TO if_wd_context_element,
ls_node1 TYPE wd_this->element_node_flighttab,
lt_node1 TYPE wd_this->elements_node_flighttab.
lr_node = wd_context->get_child_node( name = 'NODE_FLIGHTTAB' ).
" This would now contain the references of all the selected rows
lt_temp = lr_node->get_selected_elements( ).
LOOP AT lt_temp INTO wa_temp.
" Use the references to get the exact row data
CALL METHOD wa_temp->get_static_attributes
IMPORTING
static_attributes = ls_node1.
APPEND ls_node1 TO lt_node1.
CLEAR ls_node1.
ENDLOOP.
ENDMETHOD.
So now lt_node1 containes information about all the rows which are selected by the user.
Similar Messages
-
How to apply List box for multiple selection of rows in ALV report ?
Hi Exprots,
1: How to apply List box for multiple selection of rows in ALV report ?
Thanking you.
Subashhi,
check the below program.
REPORT zalv_dropdowns.
*Type pools declarations for ALV
TYPE-POOLS : slis.
*data declarations for ALV container,ALV grid, Fieldcatalogues & layout
DATA: g_grid TYPE REF TO cl_gui_alv_grid,
g_custom_container TYPE REF TO cl_gui_custom_container,
gt_fieldcat TYPE lvc_t_fcat,
gs_layout TYPE lvc_s_layo.*INTERNAL TABLE AND WA DECLARATIONS FOR t517 A table
DATA: gt_outtab TYPE STANDARD TABLE OF t517a INITIAL SIZE 0,
wa_outtab TYPE t517a.
START-OF-SELECTION.*Call to ALV
CALL SCREEN 600.*On this statement double click it takes you to the screen painter SE51.
*Create a Custom container and name it CCONT and OK code as OK_CODE.
*Save check and Activate the screen painter.
*Now a normal screen with number 600 is created which holds the ALV grid.
PBO of the actual screen , Here we can give a title and customized menus
Here we also call the subroutine for ALV output.
MODULE PBO OUTPUT *
MODULE pbo OUTPUT.
PERFORM alv_output.
ENDMODULE. "pbo OUTPUT
MODULE PAI INPUT *
MODULE pai INPUT.
ENDMODULE. "pai INPUT
*& Form BUILD_FIELDCAT
FORM build_fieldcat.
DATA ls_fcat TYPE lvc_s_fcat.
*Build the field catalogue
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'T517A'
CHANGING
ct_fieldcat = gt_fieldcat.
To assign dropdown in the fieldcataogue
LOOP AT gt_fieldcat INTO ls_fcat.
CASE ls_fcat-fieldname.
WHEN 'SLART'.
*is the first list box
ls_fcat-drdn_hndl = '1'.
ls_fcat-outputlen = 15.
MODIFY gt_fieldcat FROM ls_fcat.
is the second list box
WHEN 'ABART'.
ls_fcat-drdn_hndl = '2'.
ls_fcat-outputlen = 15.
MODIFY gt_fieldcat FROM ls_fcat.
ENDCASE.
ENDLOOP.
ENDFORM. "build_fieldcat
*& Form ALV_OUTPUT
FORM alv_output .*Create object for container
CREATE OBJECT g_custom_container
EXPORTING container_name = 'CCONT'.
*create object for grid
CREATE OBJECT g_grid
EXPORTING i_parent = g_custom_container.
Build fieldcat and set column
*Assign a handle for the dropdown listbox.
PERFORM build_fieldcat.
*Build layout
PERFORM build_layout.
Define a drop down table.
PERFORM dropdown_table.
*fetch values from the T517A table
SELECT * FROM t517a INTO TABLE gt_outtab.
*Display ALV output
CALL METHOD g_grid->set_table_for_first_display
EXPORTING
is_layout = gs_layout
CHANGING
it_fieldcatalog = gt_fieldcat
it_outtab = gt_outtab.ENDFORM. "ALV_OUTPUT
*& Form dropdown_table
text
--> p1 text
<-- p2 text
FORM dropdown_table.*Declarations for drop down lists in ALV.
DATA: lt_dropdown TYPE lvc_t_drop,
ls_dropdown TYPE lvc_s_drop.
First SLART listbox (handle '1').
ls_dropdown-handle = '1'.
ls_dropdown-value = '01 Primary school'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '1'.
ls_dropdown-value = '02 Lower Secondary'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '1'.
ls_dropdown-value = '03 Upper Secondary'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = '04 Professional School'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = '05 College'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = '06 University'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = '09 Other Establishment'.
APPEND ls_dropdown TO lt_dropdown.* Second ABART listbox (handle '2'). ls_dropdown-handle = '2'.
ls_dropdown-value = '10 Primary School certificate'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '2'.
ls_dropdown-value = '20 Lower secondary/Junior high'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '30 High school diploma(B-levels)'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '2'.
ls_dropdown-value = '31 Vocational'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '32 Matriculation'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '40 Specialist vocational certificate'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '50 College degree Level1'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '51 College degree Level2'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '52 Masters degree'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '60 Univ Degree level1'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '61 Bachelors degree'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '62 Masters degree'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '63 Licenciate'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '64 Doctors Degree Ph.D'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '89 None'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '90 Unknown'.
APPEND ls_dropdown TO lt_dropdown.*method to display the dropdown in ALV
CALL METHOD g_grid->set_drop_down_table
EXPORTING
it_drop_down = lt_dropdown.ENDFORM. " dropdown_table
*& Form build_layout
text
*layout for ALV output
FORM build_layout . gs_layout-cwidth_opt = 'X'.
gs_layout-grid_title = 'ALV DROPDOWN LISTS'.
gs_layout-no_toolbar = 'X'.ENDFORM. " build_layout
endform.
Edited by: S.r.v.r.Kumar on Jun 1, 2009 2:48 PM -
Multiple selection of rows in alv output list
experts,
using 'REUSE_ALV_GRID_DISPLAY'
the following is the sample code ,without using ctrl or shift key i am unable to select multiple rows .
any resolvable answers.
REPORT zpushbutton1.
type-pools : slis.
*structure declarations
types : begin of ty_mara,
matnr type matnr,
ernam type ernam,
mbrsh type mbrsh,
CHKBOX TYPE CHAR1,
end oF ty_mara.
types : begin of ty_marc,
matnr type matnr,
werks type werks_d,
pstat type pstat_d,
end of ty_marc.
*internal table declarations
DATA : gi_mara TYPE STANDARD TABLE OF TY_MARA INITIAL SIZE 0.
data : gi_fieldcat type slis_t_fieldcat_alv.
*workarea declarations
DATA : gs_mara TYPE TY_MARA,
gs_fieldcat type slis_fieldcat_alv.
SELECT matnr
ernam
mbrsh
FROM mara
INTO TABLE gi_mara
UP TO 10 ROWS.
perform build_fieldcat using :
'1' 'CHKBOX' 'GI_MARA' 'SELECT' 'X' ,
'2' 'MATNR' 'GI_MARA' 'MATEIRALNO' ' ',
'3' 'ERNAM' 'GI_MARA' 'PERSON CREAT' ' ',
'4' 'MBRSH' 'GI_MARA' 'INDUSTRY' ' '.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IT_FIELDCAT = GI_FIELDCAT
TABLES
t_outtab = GI_MARA
*& Form BUILD_FIELDCAT
form BUILD_FIELDCAT using
PCOL TYPE CHAR2
PFLDNAME TYPE CHAR10
PTABNAME TYPE CHAR10
PSELTEXT TYPE CHAR15
PINPUT TYPE CHAR1.
GS_FIELDCAT-COL_POS = PCOL.
GS_FIELDCAT-FIELDNAME = PFLDNAME.
GS_FIELDCAT-TABNAME = PTABNAME.
GS_FIELDCAT-SELTEXT_M = PSELTEXT.
GS_FIELDCAT-EDIT = PINPUT.
APPEND GS_FIELDCAT TO GI_FIELDCAT.
CLEAR GS_FIELDCAT.
endform. " BUILD_FIELDCAT
thanks and regardsexperts,
can we set cursor properties during the output display
ex : i have used function module reuse_alv_grid_display to display a list of records with passing parameter
is_layout-box_fieldname and is_layout-box_tabname to list the first column as pushbutton.
when i select a row ,gets selected now when i move the
cursor (mouse) to the other row and select the row, the row previously selected will be deselected.
solution to the above problem is to hold the ctrl or shift key for
multiple selections.
is there any other alternative procedure so that without holding
ctrl or shift key multiple rows get selected.
thks and rgrds -
Multiple selection needed in Java webDynpro
In Java webDynpro, i need multiple selection to be performed in a combo or listbox. For that, what is the control that i have to add n what are the properties that i have to change. It is urgent. Pl help me in this.
Hi
You can use the ChaeckBoxGroup UI element for multiple selection.
Kind Regards
Mukesh -
Multiple selection of rows in table
HI,
can any one tell how to dispaly the rows selected(multiple selection) in one table can be displayed in another table in 2nd view.
Regards,
A.KHi,
1.Iterate through the node bound to the table
2 Add the selected elements to a List.
3.bind this list to a node
4.Bind this node as the datasource for the second table.
Ex:
ArrayList selectedElements = new ArrayList();
for (int x=0; x< wdContext.nodeTest().size(); x++)
if( wdContext.nodeTest().isMultiSelected(x) )
// Selected Element
IWDNodeElement nodeElement = wdContext.nodeTest().getElementAt(x);
selectedElements.add(nodeElement)
wdContext.nodeSeondNode().bind(selectedElements);
Regards
Ayyapparaj -
Multiple selection of rows and delete the same
hi how can we select the multiple rows in a table and delete the same.
if i have 3 rows i have to select 2 rows and if i press the delete button the selected rows should be deleted.
Can any one help me .
Thanks
Badrihi
in the layout of the screen u might have dragged and dropped the table control
double click on it u will get attributes screen in that u select MULTIPLE under Line-Selection
under attributes tab.
the internal table in table control must be like
data : begin of itab occurs 0,
empno type .......,
empname......,
empcity.....,
check(1), " for tab selection"
end of itab.
data : itab1 like itab occurs 0 with header line.
in the attributes screen of the table control
pass the value ITAB-CHECK to the field W/SELECTION
in SE51
PBO
Module_status_0800
loop with control table_control_name.
module_fill_tcontrol.
endloop.
PAI
Module_user_command_0800
loop with control table_control_name.
module_read_tcontrol.
endloop.
in se38
Module_fill_tcontrol.
endmodule.
Module_read_tcontrol.
READ TABLE itab1 INDEX control-current_line.
IF sy-subrc EQ 0.
MODIFY itab1 FROM itab INDEX control-current_line.
ELSE.
MOVE-CORRESPONDING itab TO itab1.
APPEND itab1.
CLEAR itab1.
ENDIF.
endmodule.
module_user_command.
case sy-ucomm.
WHEN 'DELE'.
DELETE itab1 WHERE check = 'X'.
endcase.
endmodule.
Regards
Murali.M -
Multiple selection of row in a jtable
Hello All,
I am working with this jtable 'tblSearch'. The application requirement is that the user should have the ability to select multiple rows using the control key. I am using the bold part of the code to color the selected row light gray. Can you someone help me to select multiple rows by holding the control key down.
public void PopulateAS400(){
cmbView.hidePopup();
setCursor(hourglassCursor);
int scrPos = scpSearch.getHorizontalScrollBar().getValue();
oapprovalSQL = SQLFactory.createOrderApprovalSql();
Vector FreightList = oapprovalSQL.getData(getAs400SearchString(), getOrderby(), AS400, AS400Overide.length, searchItems, rdoMatchAny.isSelected());
columnNames = (Vector)FreightList.get(1);
data = (Vector)FreightList.get(0);
model = new DefaultTableModel(data,columnNames) {
public Object getValueAt(int row, int col) {
return super.getValueAt(row,col);
public boolean isCellEditable(int row, int col) {
if (row == 0){
getTblSearch().setColumnSelectionAllowed(true);
return true;
getTblSearch().setColumnSelectionAllowed(false);
return false;
public Class getColumnClass(int c) {
if(c == 5 || c == 9){
return BigDecimal.class;
}else{
return String.class;
JTable tmp = new JTable(model)
private final KeyStroke tabKeyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0);
private final KeyStroke shiftTabKeyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_TAB,KeyEvent.SHIFT_DOWN_MASK);
public void changeSelection(int rowIndex, int columnIndex, boolean toggle, boolean extend)
AWTEvent currentEvent = EventQueue.getCurrentEvent();
if(currentEvent instanceof KeyEvent)
KeyEvent ke = (KeyEvent)currentEvent;
if(ke.getSource()!=this)
return;
if (KeyStroke.getKeyStrokeForEvent(ke).equals(tabKeyStroke))
if (rowIndex > 0)
rowIndex = 0;
columnIndex = 0;
toggle = false;
extend = false;
getTblSearch().setColumnSelectionAllowed(true);
else if (KeyStroke.getKeyStrokeForEvent(ke).equals(shiftTabKeyStroke))
if (rowIndex > 0)
rowIndex = 0;
columnIndex = getTblSearch().getColumnCount()-1;
toggle = false;
extend = false;
getTblSearch().setColumnSelectionAllowed(true);
else if (columnIndex == getTblSearch().getColumnCount()-1)
rowIndex = 0;
columnIndex = getTblSearch().getColumnCount()-1;
toggle = false;
extend = false;
getTblSearch().setColumnSelectionAllowed(true);
super.changeSelection(rowIndex, columnIndex, toggle, extend);
public Component prepareRenderer(TableCellRenderer renderer, int rowIndex, int vColumnIndex)
Component c = super.prepareRenderer(renderer, rowIndex, vColumnIndex);
if ((vColumnIndex == 7) && (rowIndex > 0))
if ((model.getValueAt(rowIndex,7) != null) && (model.getValueAt(rowIndex,7).toString().equalsIgnoreCase("NMI")))
c.setBackground(Color.red);
else if ((model.getValueAt(rowIndex,7) != null) && (model.getValueAt(rowIndex,7).toString().equalsIgnoreCase("NMI ANSWERED")))
c.setBackground(Color.green);
else
c.setBackground(Color.white);
else
c.setBackground(Color.white);
**if (isRowSelected(rowIndex) && (rowIndex > 0)){**
**((JComponent)c).setBackground(Color.LIGHT_GRAY);**
if (rowIndex == 0 && isCellSelected(rowIndex, vColumnIndex)) {
c.setBackground(lightBlue);
return c;
setTblSearch(tmp);
getTblSearch().setAutoscrolls(true);
getTblSearch().setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
getTblSearch().setAutoCreateColumnsFromModel(false);
getTblSearch().setColumnSelectionAllowed(false);
getTblSearch().setRowSelectionAllowed(true);
getTblSearch().setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
JTableHeader header8 = getTblSearch().getTableHeader();
ColumnHeaderListener colH8 = new ColumnHeaderListener();
colH8.setCallFrom("OrderApproval");
colH8.setOapproval(this);
header8.addMouseListener(colH8);
header8.setReorderingAllowed(false);
header8.setResizingAllowed(false);
getTblSearch().getColumn("Co #").setCellEditor(asCompCell);
getTblSearch().getColumn("Reg").setCellEditor(asRegCell);
getTblSearch().getColumn("Rep #").setCellEditor(asRepCell);
packColumns(getTblSearch(), 1);
getTblSearch().getColumnModel().getColumn(6).setPreferredWidth(240);
for(int i=0; i<searchEntries8.length; i++) {
getTblSearch().setValueAt(searchEntries8,0,i);
((GenericTextEditor)getTblSearch().getCellEditor(0,i)).setCellEditorValue(searchEntries8[i]);
scpSearch.add(new PopupContainer());
popupMenu = new JPopupMenu();
JMenuItem printFinalOrderMenu = new JMenuItem(PRINTFINALORDER_CMD);
printFinalOrderMenu.addActionListener(new PrintFinalOrderMenuListener());
popupMenu.add(printFinalOrderMenu);
MouseListener popupListener = new PopupListener();
getTblSearch().addMouseListener(popupListener);
scpSearch.setViewportView(getTblSearch());
scpSearch.getHorizontalScrollBar().setValue(scrPos);
setCursor(normalCursor);
Thank you all for your time n help.
Edited by: anjan_dev on Jan 29, 2008 2:14 PM
Edited by: anjan_dev on Jan 29, 2008 2:15 PM
Edited by: anjan_dev on Jan 29, 2008 2:16 PMThe issue is when I have one row already selected and then when I click on another row while holding the control key down. Our application needs an user to be able to select multiple rows at the same time.That is the default behaviour. I have no idea why it doesn't work for you.
Get rid of all your custom KeyEvent logic and try it again.
If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)", that demonstrates the incorrect behaviour.
http://homepage1.nifty.com/algafield/sscce.html
Don't forget to use the "Code Formatting Tags", so the posted code retains its original formatting.
http://forum.java.sun.com/help.jspa?sec=formatting -
Hi,
How to select multiple rows in marketing documents?
In the 'List of windows' it is possible but in sales order/Purchase order is it system design or is there any method by which i can achieve this?
Thanks
Md.nazeer ShaikhHi Nazeer,
multiple rows selection is not possible in marketing document but you can achive it through sdk as per requirment.
Regards.
Deepak Tyagi -
Multiple Selection dialog restricted to 5 rows
Hi All,
I have defined a select options in my WebDynpro view.
When I try to enter some value using the Multiple Selection dialog (Extensions) it only shows maximum of 5 rows.
If need to enter more data, I just have to press the "insert" button and add new rows.
But is there a way to populate more than 5 rows initially.
Or is there a way to give a "Upload from clipboard" functionality when a user needs to enter more than 5 rows of selection input.
Thanks in advance for your kind help.hi Thomas,
Thank you so much for your quick response.
But is there a way that I could at least increase the number of visible rows initially? -
How can I create multiple selection check boxes in a report row?
Hello,
I'd like to know how a multiple selection checkbox can be created in report rows. In brief, I need to create a questionnaire template and each one of the questions will have multple options checkboxes, that means that the user can select more than one of the answers.
Should I use apex_item.checkbox ?. I have no clue here.
Please advice.
Thank you
Edited by: user9982480 on Jul 23, 2012 10:58 AMHi,
This might save your effort
http://www.apexsolution.de/questionnaire/
Regards,
Jari
My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
Twitter: http://www.twitter.com/jariolai -
How can i select some row from multiple row in the same group of data
I want to select some row from multiple row in the same group of data.
ColumnA
Column B
1 OK
1 NG
2 NG
2 NG
3 OK
3 OK
I want the row of group of
ColumnA if ColumnB contain even 'NG'
row , select only one row which Column B = 'NG'
the result i want =
ColumnA Column B
1 NG
2 NG
3 OK
Thank youThat's some awful explanation, but I think this is what you were driving at:
DECLARE @forumTable TABLE (a INT, b CHAR(2))
INSERT INTO @forumTable (a, b)
VALUES
(1, 'OK'),(1, 'NG'),
(2, 'NG'),(2, 'NG'),
(3, 'OK'),(3, 'OK')
SELECT f.a, MIN(COALESCE(f2.b,f.b)) AS b
FROM @forumTable f
LEFT OUTER JOIN @forumTable f2
ON f.a = f2.a
AND f.b <> f2.b
GROUP BY f.a -
OBIEE - Using Multiple Select Rows In Grid As Parameters
Hello All,
First post from an OBI Newbie. I am getting used to creating dashboards and have got my head around drilling with values, but I have a user requirement that I am not sure is possible.
A standard query returns the following datagrid information ("," = column divider):
Product Id, Product Description, Colour, Total Sales
1, Chair, Red, 4
2, Chair, Blue, 3
3, Chair, Black, 5
I know that I can enable a drill on a specific colour to give a datagrid such as (if Red Selected):
Order Reference, Product Id, Product Description, Colour, Units
687678657, 1, Chair, Red, 3
687678658, 1, Chair, Red, 1
The user requirement is to select multiple rows (possible by holding Ctrl) and to then effectively "drill" with the multiple selected values. Eg Red, Blue:
Order Reference, Product Id, Product Description, Colour, Units
687678657, 1, Chair, Red, 3
687678658, 1, Chair, Red, 1
687678660, 2, Chair, Blue, 3
I presume that a separate report will be required, but I am not sure how to trigger and/or pass the multiple product id's. Can anyone help with a solution?
Edited by: 885689 on 16-Sep-2011 06:27I got this working by changing the signature of the Application Module method to use ArrayList rather than String[], then you can marshal the Struts FormBean contents into an ArrayList to pass up.
To do this, subclass the DataAction by using "Go To Code" off of the context menu and then override the initializeMethodParameters() method:
protected void initializeMethodParameters(DataActionContext actionContext, JUCtrlActionBinding actionBinding)
//Get the String Array from the Form Bean
String[] selection = (String[])((DynaActionForm)actionContext.getActionForm()).get("multiSelect");
//convert that to an ArrayList
ArrayList selectionArr = new ArrayList( Arrays.asList(selection));
//Add that object to the Arg List for the AM method
ArrayList params = new ArrayList();
params.add(selectionArr);
actionBinding.setParams(params);
} -
How to display multiple selected rows in a table inside a popup?
Hi,
I have a table on which multiple selection is enabled. I am able to get hold of multiple selected rows i.e. i am able to iterate over the selected row keys and print their values. Now, my problem is how to display the contents of all the selected rows in a popup? I get the details of only one row when I launch the popup.
Thanks
KaranHi,
Not confident if this works or not but just try it...
1. create a ViewLink between the same view Object.
The source and destination wil be the same Vo and the source and destination attribute will be the pk of both Vos.
2. Update the changes in Appln Module.
Open the AM and in DataModel tab .
select the Same VO from which you created table in the DataModel Listbox and select the VL in the "Avaible View Objects" List Box. Add under it(selected vo in datamodel listbox).
3. Refresh DataControl accordion.
4. in your jsff page drag and drop the child vo as a table..
See if it works
Regards,
Santosh. -
Not able to select a row in ALV in Webdynpro
Hi everyone,
I have developed a webdynpro application and I have declared component usage for SALV_WD_TABLE.
The data gets displayed in the ALV, but always the first row is selected.
When I try to select another row,I am not able to select.
Could anyone please suggest what might be the problem ?
Thanks in advance.
Regards,
Kumudha.Hi Manas,
Thanks for the inputs.
I am placing the code below for your reference.
I try to change the below as Display Text as Code...But it is not happening Plz check
method wddoinit.
if wd_this->ls_setup is initial.
select single * from yyua_c_setup into wd_this->ls_setup
where system_id = sy-sysid.
endif.
"adjustments for ALV
data lo_cmp_usage type ref to if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_alv( ).
if lo_cmp_usage->has_active_component( ) is initial.
lo_cmp_usage->create_component( ).
endif.
data: l_ref_interfacecontroller type ref to iwci_salv_wd_table .
l_ref_interfacecontroller = wd_this->wd_cpifc_alv( ).
data: l_value type ref to cl_salv_wd_config_table,
lr_header_t type ref to cl_salv_wd_header,
lv_text type string.
l_value = l_ref_interfacecontroller->get_model( ).
data: lr_column_settings type ref to if_salv_wd_column_settings,
lr_input_field type ref to cl_salv_wd_uie_input_field,
lr_column type ref to cl_salv_wd_column.
Set column title and position
lr_column = l_value->if_salv_wd_column_settings~get_column( 'CSINSTA' ).
lr_column->set_position( 1 ).
lv_text = cl_wd_utilities=>get_otr_text_by_alias( 'Z_REFERENCE/REQUEST_NUMBER' ).
lr_column->r_header->set_text( 'Installation' ).
lr_column->r_header->set_ddic_binding_field( '00' ).
lr_column = l_value->if_salv_wd_column_settings~get_column( 'ERFUNAME' ).
|
lr_column->set_position( 18 ).
lv_text = cl_wd_utilities=>get_otr_text_by_alias( 'Z_REFERENCE/ACTIVITY_DATE' ).
lr_column->r_header->set_text( 'Job profile ext' ).
lr_column->r_header->set_ddic_binding_field( '00' ).
Hide columns
lr_column = l_value->if_salv_wd_column_settings~get_column( 'ERFTSTMP' ).
lr_column->set_visible( 0 ).
lr_column = l_value->if_salv_wd_column_settings~get_column( 'AETSTMP' ).
lr_column->set_visible( 0 ).
lr_column = l_value->if_salv_wd_column_settings~get_column( 'STATUS' ).
lr_column->set_visible( 0 ).
lr_column = l_value->if_salv_wd_column_settings~get_column( 'PRIO' ).
lr_column->set_visible( 0 ).
lr_column = l_value->if_salv_wd_column_settings~get_column( 'ISSUE' ).
lr_column->set_visible( 0 ).
data: lr_functions type ref to if_salv_wd_function_settings,
lr_function type ref to cl_salv_wd_function,
lr_button_t type ref to cl_salv_wd_fe_button.
Add self-defined functions in toolbar
lr_functions ?= l_value.
lr_function = lr_functions->create_function( 'SELECT' ).
create object lr_button_t.
lv_text = cl_wd_utilities=>get_otr_text_by_alias( 'Z_REFERENCE/VIEW' ).
lr_button_t->set_text( 'Select' ).
lr_function->set_editor( lr_button_t ).
data : LR_FUNCTION_SETTINGS TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
create object LR_FUNCTION_SETTINGS.
SET row selectable as true
CALL METHOD LR_FUNCTION_SETTINGS->IF_SALV_WD_TABLE_SETTINGS~SET_ROW_SELECTABLE
EXPORTING
VALUE = ABAP_TRUE.
endmethod
Regards,
Kumudha. -
Setting multiple selection checkbox disabled at row level
Hi all
i have a query bean in my page .once user clicks on the Go button ..the records gets displayed in an advanced table .this table has one table selection column (multiple selection).
now based on a attribute value i need to disable these check boxes .
if attribute1 for a row is 'Y' i need to disable it otherwise enable it..
there is no disabled property in the property inspector for this bean so i cant set any SPEL for this column..
kindly help me out
naveenthanks a lot to all of u
i have resolved this issue as follows
OAAdvancedTableBean srTblBean=
(OAAdvancedTableBean)webBean.findChildRecursive("XXPAAssignResourcesVO1");
srTblBean.setSelectionDisabledBindingAttr("workflowActive");
where workflowActive is a transient Boolean attribute .and i m setting this attribute based on the value of Attribute1 in VORowImpl setworkflowActive(String Value) Method.
it worked at row level..
Naveen
Maybe you are looking for
-
Hi guys, all was working fine until yesterday when i updated flash to the newest version, im sad because i can't open any video on youtube, i tried with safari, firefox and chrome, no one seems to work fine. Please if you can help me i will be very h
-
Everything was ok until early last week when Firefox kept on and on crashing. I downloaded the new version on Saturday and all was fine until I switched on on Sunday and nothing, zilch. Opened in internet explorer and all was OK so knew it had to be
-
Change creator id of purchase order ?
Hello, I am working on SRM 5.0 , Extended classic scenario. In SRM, after creating a shopping cart, the creator id of the corresponding purchase order is WF-BATCH (since WF-BATCH is the user system used in baground task ). We have a requirement wher
-
Clock-in Clock-out corrections using ESS
Hi, When we change the Time data using Clock-in, Clock-out corrections in ESS, it is not appearing in 2011 (Teven table). When will this, gets updated to the table and is there any tiem limit set for the updation ?? Thanks & Regards, Vidhya T.R
-
Does anyone know where I can get a download of logic pro 9?
Hiya, Does anyone know where I can purchase and download a copy of logic pro 9?