Table rows can't be selected / highlighted
Hi All,
I would like to know how table rows in BSP can be selected / highlighted. I was working with enhancement in standard application ERP_IT, but I need table rows to be selected to put some validation. Does anyone have an idea how to do this?
Regards,
Louie
Hi Louie,
You should pass the following parameters to the TableView.
selectionMode = "MULTISELECT"
displayMode = ' '
Answered!
Similar Messages
-
How to get the index of table row without selection?
Hi all,
I have an table designed in XML view.Now i have added an change method for qty cell "valqty". When user inputs the qty in the cell and press enter this method is triggered now I want to know which index of the table is currently edited.Through which i can get the value of other cell in the same row.
NOTE: The table row doesn't have selection either multiple or single
I tried the following inside the valqty method but it now working
this.getValue();
this.getBindingContext().getProperty('PRD_NUM');
<Table id="idProductsTable"
inset="false"
items="{oModel>/deliverylist}"
visibleRowCount= "7"
mode="MultiSelect"
modeAnimationOn="true">
<headerToolbar>
<Toolbar>
<Label text="Products"></Label>
</Toolbar>
</headerToolbar>
<columns>
<Column
minScreenWidth="Tablet"
demandPopin="true">
<Text text="Order" />
</Column>
<Column
minScreenWidth="Tablet"
demandPopin="true">
<Text text="Quantity" />
</Column>
</columns>
<items>
<ColumnListItem>
<cells>
<Text text="{oModel>PRD_NUM}" />
<Input value="{oModel>DEL_QUAN}" change="valqty" maxLength="13" />
</cells>
</ColumnListItem>
</items>
</Table>
ThanksThanks Robin,
But in my case oEvent.getSource() is returning the cell instance and
oEvent.getSource().getBindingContext() is undefined
Hence not getting the value
I also tried the following
oEvent.getSource().getParent().getParent().indexOfItem()
But index returned is -1 -
Small issue with custom table cell editor and unwanted table row selection
I'm using a custom table cell editor to display a JTree. Thing i notice is that when i select a value in the tree pop-up, the pop-up closes (as it should) but then every table row, from the editing row to the row behind the pop-up when i selected the value becomes highlighted. I'm thinking this is a focus issue, but it thought i took care of that. To clairfy, look at this: Before . Notice how the "Straightening" tree item is roughly above the "Stock Thickness" table row? When i select Straightening, this is what happens to my table: After .
My TreeComboBox component:
public class TreeComboBox extends JPanel implements MouseListener {
private JTextField itemField;
private TreeModel treeModel;
private ArrayList<ActionListener> actionListeners = new ArrayList<ActionListener>();
private Object selectedItem;
* Creates a new <code>TreeComboBox</code> instance.
* @param treeModel the tree model to be used in the drop-down selector.
public TreeComboBox(TreeModel treeModel) {
this(treeModel, null);
* Creates a new <code>TreeComboBox</code> instance.
* @param treeModel the tree model to be used in the drop-down selector.
* @param selectedItem tree will expand and highlight this item.
public TreeComboBox(TreeModel treeModel, Object selectedItem) {
this.treeModel = treeModel;
this.selectedItem = selectedItem;
initComponents();
* Returns the current drop-down tree model.
* @return the current <code>TreeModel</code> instance.
public TreeModel getTreeModel() {
return treeModel;
* Sets the tree model.
* @param treeModel a <code>TreeModel</code> instance.
public void setTreeModel(TreeModel treeModel) {
this.treeModel = treeModel;
* Returns the selected item from the drop-down selector.
* @return the selected tree object.
public Object getSelectedItem() {
return selectedItem;
* Sets the selected item in the drop-down selector.
* @param selectedItem tree will expand and highlight this item.
public void setSelectedItem(Object selectedItem) {
this.selectedItem = selectedItem;
String text = selectedItem != null ? selectedItem.toString() : "";
itemField.setText(text);
setToolTipText(text);
* Overridden to enable/disable all child components.
* @param enabled flat to enable or disable this component.
public void setEnabled(boolean enabled) {
itemField.setEnabled(enabled);
super.setEnabled(enabled);
public void addActionListener(ActionListener listener) {
actionListeners.add(listener);
public void removeActionListener(ActionListener listener) {
actionListeners.remove(listener);
// MouseListener implementation
public void mouseClicked(MouseEvent e) {
public void mouseEntered(MouseEvent e) {
public void mouseExited(MouseEvent e) {
public void mousePressed(MouseEvent e) {
public void mouseReleased(MouseEvent e) {
showPopup();
private void initComponents() {
setLayout(new GridBagLayout());
itemField = new JTextField();
itemField.setEditable(false);
itemField.setText(selectedItem != null ? selectedItem.toString() : "");
itemField.addMouseListener(this);
add(itemField, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0,
GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
private void showPopup() {
final TreePopup popup = new TreePopup();
final TreeComboBox tcb = this;
final int x = itemField.getX();
final int y = itemField.getY() + itemField.getHeight();
int width = itemField.getWidth() + popupButton.getWidth();
Dimension prefSize = popup.getPreferredSize();
prefSize.width = width;
popup.setPreferredSize(prefSize);
SwingUtilities.invokeLater(new Runnable() {
public void run() {
popup.show(tcb, x, y);
popup.requestFocusInWindow();
private void fireActionPerformed() {
ActionEvent e = new ActionEvent(this, ActionEvent.ACTION_PERFORMED, "TreeComboBoxSelection");
for (ActionListener listener : actionListeners) {
listener.actionPerformed(e);
private class TreePopup extends JPopupMenu {
private JTree tree;
private JScrollPane scrollPane;
public TreePopup() {
initComponents();
initData();
private void initData() {
if (treeModel != null) {
tree.setModel(treeModel);
private void initComponents() {
setFocusable(true);
setFocusCycleRoot(true);
tree = new JTree();
tree.setRootVisible(false);
tree.setShowsRootHandles(true);
tree.setFocusable(true);
tree.setFocusCycleRoot(true);
tree.addTreeSelectionListener(new TreeSelectionListener() {
public void valueChanged(TreeSelectionEvent e) {
tree_valueChanged(e);
scrollPane = new JScrollPane(tree);
add(scrollPane);
private void tree_valueChanged(TreeSelectionEvent e) {
DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();
setSelectedItem(node.getUserObject());
fireActionPerformed();
this.setVisible(false);
}My TreeComboBoxTableCellEditor:
public class TreeComboBoxTableCellEditor extends AbstractCellEditor implements TableCellEditor, ActionListener {
protected TreeComboBox treeComboBox;
protected ArrayList<CellEditorListener> cellEditorListeners = new ArrayList<CellEditorListener>();
public TreeComboBoxTableCellEditor(TreeComboBox treeComboBox) {
this.treeComboBox = treeComboBox;
treeComboBox.addActionListener(this);
public Object getCellEditorValue() {
return treeComboBox.getSelectedItem();
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
treeComboBox.setSelectedItem(value);
return treeComboBox;
public void actionPerformed(ActionEvent e) {
stopCellEditing();
}Any thoughts?
Edited by: MiseryMachine on Apr 3, 2008 1:21 PM
Edited by: MiseryMachine on Apr 3, 2008 1:27 PMAs I said, you have to have empty context elements before additional rows will be open for input.
For instance if you want to start with 5 rows available for input do the following to your internal table that you will bind:
data itab type standard table of sflight.
do 5 times.
append initial line to itab.
enddo.
context_node->bind_table( itab ).
The other option if you need n number of rows is to add a button to the table toolbar for adding more rows. When this button is pressed, you add a new context element to the node - thereby creating a new empty row in the table. -
Is it possible to enable/disable table row selection?
I have a situation where a user can add rows to a "selection" table with a value that is used to perform a query to get a collection of objects associated with that value. Once those objects are available, a second "results" table will be populated with the row(s) returned. When the value is entered in the selection table, a web service call is made to perform the query and return the results. This may take a few moments and I am displaying an indeterminate progress indicator for the selection table row involved to indicate that the data is not yet available - the progress indicator is included as a column in the row; each row has its own indicator. Once the results are received the indicator is hidden to indicate the query for that row has completed. The user may enter as many rows in the selection table as they wish so there is a distinct possibility of multiple queries being executed at a given time. I have also attached a row selection listener to the selection table such that when a given row is selected, the results table will display the corresponding associated row(s).
What I'd like to be able to do is somehow temporarily disable the selection of any row that has a query in progress, while leaving other rows whose queries have completed be selectable. Once the query completes, the row can then become selectable, thus allowing for the results to be loaded and displayed in the results table. The way it works right now, if the row is selected while the query is still in progress, nothing is displayed (obviously), but then the row has to be re-selected after the query has completed to see the results. This is a viable (though undesirable) solution/workaround if there is at least one other row in the table. However, if the row is the only row in the table and has been selected, it cannot be re-selected (there's no other row to select to allow for re-selection). To boil it down, what I'd like to do is prevent the selection of the row until the query for that row is complete.
After perusing the JavaFX 2.2 API, I'm not seeing any obvious way to achieve this effect. If anyone has any solutions, suggestions, etc. on how this could be done I'd appreciate it greatly.Here's an [url https://github.com/james-d/Conditionally-selectable-table]example. As predicted, keyboard navigation fails if the keyboard presses would result in an unselectable item being selected using the default selection model. The best workaround I can see for this is to register event filters for the appropriate keyboard strokes, as in the previously referenced thread.
Update: That code won't run in the current (ea b90) release of JavaFX 8.0, and probably a few recent releases; it will however run in the final release (and it runs in JDK 7). See [url https://javafx-jira.kenai.com/browse/RT-30593]RT-30593
Edited by: James_D on May 22, 2013 7:51 PM -
Nested table - a table in a table row
Hi Experts ,
I Need to show a table in a table row ... like a nested table.
Consider this example :
1) i have a table row : -
2) when somebody selects that row , i need an option like windows Explorer expand button with + sign , which will show some more details in the same row.
is this possible in a webdynpro application ?
let me know.
Regards,
Ashish ShahHi Ashish,
U can use tree structure in a table.check these.
<a href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/integration%20of%20a%20tree%20structure%20in%20a%20web%20dynpro%20table.pdf">https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/integration%20of%20a%20tree%20structure%20in%20a%20web%20dynpro%20table.pdf</a>
u can find the sample application here
<a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/28113de9-0601-0010-71a3-c87806865f26?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#31 [original link is broken] [original link is broken]">https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/28113de9-0601-0010-71a3-c87806865f26?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#31 [original link is broken] [original link is broken]</a>
regards
Sumit -
Add selected table row value to PageFlowScope so I can access in taskflow
Hi all,
Running into a problem getting a value from a selected ADF table row to a taskflow that is displayed as an inline popup. Here's the scenario. I have a view which displays a table. When I click on an edit btn I display my taskflow as an inline popup. What I would like to do is take the currently selected table row, pull off lets say the row name value and pass it to my taskflow for display. I've tried settting this value inside a mbean when I click the edit btn using:
AdfFacesContext.getCurrentInstance().getPageFlowScope().put("editTargetNameSource", targetName);
String tmpClear = (String) AdfFacesContext.getCurrentInstance().getPageFlowScope().get("editTargetNameSource");Which seems to get set but when I attempt to grab this value using EL inside my taskflow jspx page it looks to not be set.
<af:outputLabel value="Selected Row" id="ol1"/><af:outputText value="#{pageFlowScope.editTargetNameSource}"It seems like pageFlowScope for my popup taskflow != pageFlowScope for the page my table lives in. I've tried setting this as a input page param but I have a feeling I'm missing something. I'd like to be able to set this value inside my bean when a user clicks the edit btn and then display this value in my taskflow popup.
Any help is appreciated,
-WraithThanks for the links Timo. I still must be missing something here. In the vids you linked it looked like he was using regions to pass params from main page to a taskflow; setting a param on child taskflow (causes param to be required when dragging into main page). So I think I understand I add an expected param to my taskflow which somehow will be set by my main page. The part I'm missing is from my main page how can I get the selected table row value and set it in the expected pageflowscope param that my taskflow is expecting?
I've tried several things:
1) Using managed bean associated with my main page; setting param inside the bean on main page btn click and then try accessing this mbean param (couldn't access this value as different pageflowscope I believe)
2) Programmatically setting PageFlowScope as I linked in previous post.
3) using setPropertyListener I can set a static value setting value in pageflowscope.start and then inside adfc.config for the task set start value to another value expected by the taskflow page. This seemed to work but I can't figure out how to do the programmatic version of this using the currently selected row and its value.
One who seems to be missing something,
-Wraith -
Extension to do table row highlighting onmouseover?
Is there an extension that does table row highlighting
onMouseover?I'll try it, thanx!
"Murray *ACE*" <[email protected]> wrote
in message
news:[email protected]...
> Applying behaviors directly to <tr> tags can be
tricky, primarily for
> browser support reasons.
>
> One way you could thread this needle would be to apply
the change class to
> some image/link on the page, and then just move the call
over to the <tr>
> tag. Would that work for you?
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
>
http://www.dreamweavermx-templates.com
- Template Triage!
>
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
>
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
>
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
> ==================
>
>
> "Rachael Caldwell" <[email protected]> wrote in
message
> news:[email protected]...
> > Rolling the mouse over the table rows . . .
> >
> > "Murray *ACE*"
<[email protected]> wrote in message
> > news:[email protected]...
> >> You wouldn't use it that way. What action do
you want to trigger the
> >> highlight?
> >>
> >> --
> >> Murray --- ICQ 71997575
> >> Adobe Community Expert
> >> (If you *MUST* email me, don't LAUGH when you
do so!)
> >> ==================
> >>
http://www.dreamweavermx-templates.com
- Template Triage!
> >>
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
> >>
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
> >>
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
> >> ==================
> >>
> >>
> >> "Rachael Caldwell" <[email protected]> wrote
in message
> >> news:[email protected]...
> >> >I still haven't found an extension which
really does the trick; I
> >> >installed
> >> > the extension pointed out earlier, but
it's grayed out when selecting
> > the
> >> > <tr> or the table itself, so can't
be used . . .
> >> >
> >> > "John Waller"
<[email protected]> wrote in message
> >> > news:[email protected]...
> >> >> > ok, consider this the official
request for "rowlite"! : }
> >> >>
> >> >> But you'll have to ask at one of the
PVII newsgroups rather than
here
> > :-)
> >> >>
http://www.projectseven.com/support/
> >> >>
> >> >> That's where the Project Seven support
team officially hang out.
> >> >>
> >> >> Try the Webdev newsgroup.
> >> >>
> >> >>
> >> >> --
> >> >> Regards
> >> >>
> >> >> John Waller
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>
> -
How can i set the alternating colors for a table rows
Dear All,
Please any one help me how can i set the Alternating colors for Table Rows.
i created a theam there i set the background alternating color to brown and i set the table design properity to alternating. but it is not reflecting.Hi,
The design property in Table properties should work for your requirement. Select "alternating" value for design.
Please see the API below:
design
Determines the appearance of the table. The property design can take the following values and is represented by enumeration type WDTableDesign.
alternating - The table rows are displayed alternately in a different color.
standard - The table background has one color. The individual table rows are displayed with grid net lines.
transparent - The table background is transparent. The individual table rows are displayed without grid net lines.
Check whether you have changed the right property or not? Also table should contain more than one rows to test this scenario.
Regards,
Jaya.
Edited by: VJR on Jun 17, 2009 6:43 PM -
How can i mark a Table Row in WebDynpro ?
Hi at all,
i have a problem in my WebDynpro View
In my WebDynpro-View there is a Table (Information about Invoice documents, around 50 lines) and the User can select all this rows by click with a mouse.
Another way for selecting rows is on the Top of the Table (left side) there is a Context-Menü, where the User can click by mouse "Select all rows". For this i have created a Action "onSelect" and can select all Elements from the Table.
But the main problem here is, that i cant "mark" the rows in the Table, the User can't see, that all rows is marked!
(Example "Screenshot" of my description is attached)
How can i solve this problem?
With best thanks
ErsinHi Ersin,
To select all records for processing in your WebDynpro table , the table node property Initialize Lead Selection drop down should be marked no. also Cardinality Property must be 0..N & Selection 0...N.
If multiple selections can be made in the Table, that is, if selectionMode = multi or multiNoLead, or ifselectionMode=auto and dataSource has selection cardinality 0..n or 1..n, the user can select or deselect rows using the menu. If the user chooses Select All , the lead selection stays. If no lead selection is set, no lead selection can be set when Select All is chosen. If user chooses Deselect All , the lead selection is deleted too.You can find an example in the system in component WDR_TEST_TABLE under Selection.
Best Regards
Priyesh Shah -
How to pass the selected table row data from popup to source view
Hi ,
I have requirement of passing the data from popup view to source. , searching some data in popup view and displaying in table,
Like i am passing some input and click search button will display the data in table, when select any of the row in the table and click on the another button , i should be able to pass the select row to the source view and also should close the popup.
When i implement , In the popup windiw, when i enter the customer no, and click on search button, it is closing the popup itslef. not able to see the data in popup.
Can u tell me what is that soultion.
Regards
VijayHi Harsimran
Thanks for the reply,
1) Source view
In "Source View" i have input field called Customer_no. But, the end user will not have any idea , what customer no to enter. so i am searching the customer no in the popup view.
1) Customer_no( This is an inputfiled , to get the customer no from the popup view)
2) Get Customer NO( This is a button to call the popup view)
"Get Customer NO" This button action will open the popup view.
In this popup, i have
1) Input field (To enter the search term)
2) Search (To seach the customer no based on the search term)
3) Table ( To display the search data)
4) Button in Table tool bar called "Select" .( To close the popup view after selected the required data in the table to pass it back to the source view).
so in the popup view what happening is, when i click on the search button itself , it is closing the popupview by transfering the first row of the tbale ,with out select the required row in the table.
i need to close the window after click on the "Select" button in the toolbar , after selected the required row data to trasfer in the table.
Can u pelase tell me what are the modifcations i need to do it.
Regards
Vijay -
Can we apply select statement on internal table.
can we apply select statement on internal table.if yes thrn let me know how to do.
Dear Sachin,
You cannot use SELECT statement on internal table.
If you want to select some rows from internal table you can LOOP the table or you can READ the table.
<u>Please check the following links for your kind reference:</u>
<b>http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm
http://www.sap-img.com/ab009.htm
http://www.itsmarc.com/crs/Clas0302.htm
http://www.sapdevelopment.co.uk/tips/tips_itab.htm
http://searchsap.techtarget.com/search/1,293876,sid21,00.html?query=whatisinternaltable&bucket=ALL</b>
Cheers !
Moqeeth. -
Can I use action build to fade one table row as I move to the next row in the table?
I have built a table with 6 rows. Right now,I am building the table row by row when I play the slide. Is there a way to fade or dissolve one row when I move to the next row in the table? I want to be able to de-emphasize the row I just discussed when I move to the next row in the table. I can fade the entire table by invoking that action but I do not seem to be able to use this action one row at a time. Thanks for your comments and assistance.
you will have to use a workaround to get the exact effect you described
create a table with out any text
use text tool to add text and position in each table cell
select the text boxes( command click) in the first row and group them (arrange > group)
use a, build in, to display text and then a, build out, to remove it
repeat the above for the other rows -
Insert table row - moving Selection
Have a table row selected and new data is inserted and the table rows are moving down. When first row is NOT selected and new table row has fired inserted, the selection row programatically moves down.
However if the first row is selected, and new data is added to the first row, the first and second row are selected even tho its programatically should work, just like if the row selected was second, third etc...
What's up with the first table row selected and new data inserted into the first table row to cause selection unions, even tho programatically it shouldn't?
Thanks
Abraham KhalilAfter the row being inserted, have you tried
table.setRowSelectionInterval(row1,row2)?
And in case it is the first row,
table.setRowSelectionInterval(0,0);
And you can even scroll to show the selection if you want by call
table.scrollRectToVisible(getCellRect(selectedRow, 0, true));
which will show the selectedRow
HTH
Bing
-
Disable Lead selection for table row cloumn
HI Team,
I have table with multiple rows and multiple columns.
Based on the lead selection of the row we are displaying the some form.
But in table row there are some columns like enter date, when the user is trying to enter the date, it displaying the form because of lead selection and it is not allowing the user to enter the date.
So, I want disable the lead selection for some columns.
How can I do this?
Regards,
BAlaHi
I think that you can get the UI Table in the wdDoModifyView method, and then the UI Column and play with his values, is something like this:
IWDTable table =(IWDTable)view.getElement( ");
And then play with the "column" methods.
Josué Cruz -
Hi.
I need some help!
I'm implementing a web dynpro application with a simple table.
That table has a row popin to show some more complete information about the table row.
I have also a button on that popin and I want to, when that button is pressed, show that row information on a popup window.
How can I get the information of that row?
RegardsHi,
Try this, it will give no of selected records.
DATA lo_nd_et_postab_1 TYPE REF TO if_wd_context_node.
DATA lo_el_et_postab_1 TYPE REF TO if_wd_context_element.
DATA ls_et_postab_1 TYPE wd_this->Element_et_postab_1.
DATA lt_et_postab_1 TYPE wd_this->Elements_et_postab_1.
DATA: wa_temp TYPE REF TO if_wd_context_element,
lt_temp TYPE wdr_context_element_set.
* navigate from <CONTEXT> to <ET_POSTAB_1> via lead selection
lo_nd_et_postab_1 = wd_context->path_get_node( path = `ZSHP_EXTENDED_DUE_LI.CHANGING_3.ET_POSTAB_1` ).
CALL METHOD lo_nd_et_postab_1->get_selected_elements
RECEIVING
set = lt_temp.
LOOP AT lt_temp INTO wa_temp.
CALL METHOD wa_temp->get_static_attributes
IMPORTING
static_attributes = ls_et_postab_1.
* append ls_et_postab_1 to lt_et_postab_1. // if you watn use this statement
CLEAR ls_et_postab_1.
ENDLOOP.
Cheers,
Kris.
Maybe you are looking for
-
Why exchange email will not work on my ipod touch, but ok on iphone
Why will microsoft exchange email not work on my ipod touch, but with the exact same settings, it works fine on my iphone? What is the reason for this?
-
I have multiple devices all under the same id and email but I don't get multiple icloud storage space and it's running out! Can anyone help as I've just bought an iphone for my daughter and would like to link it as well. Thanks in anticipation of you
-
Cannot get iTunes to start, no matter what fixes I try
Hi all! I was running iTunes 12 on Windows 64x computer. My iTunes started crashing a few days ago and now won't open AT ALL. Not in Safe Mode or anything. Won't create a new library either. I get no error message either. Please don't tell me to unin
-
Hi Experts - We are getting error during interface execution in ODI 11.1.1.6.4. We are unable to find the root cause. Interface is using customized LKM (LKM SQL to Oracle (SQL*Loader). This LKM is basically connecting to SQLSERVER fetching required r
-
Adapter configuration & load balancing
Hi, I posted questions for my requirements on Adapter forum but did not get any answer. Hope this forum can help. We started a POc with Oracle As adapters for EBS. As part of that we are trying following taks, 1) Connect to multiple EBS instances & d