Selecting first row in a table on loading in SWT - eclipse-plugin

How to select first row in a table after loading SWT table with data on startup.
1) Currently loading with some static data in a table. Would like to select first row by default during loading itself.
2) How to refresh the page when there is change in table row selection from default row.

For Jface TableViewer, use Tableviewer.setSelection() method.
For SWT Table:
table.setSelection(index);
table.notifyListeners(SWT.Selection, new Event()); // to notify the page to update

Related

Adding datatables from dynamic tabs into an arraylist

There are three tabs on the design of my page. In the third tab, there are dynamic tabs that are created. The number of tabs are based on the number of rows from the input file (which is in the first tab, for this case I will use two rows == two (dynamic) tabs in the third tab).
This means there are two tables, one table (let's call it Table A) in the first dynamic tab and another table (let's call it Table B) in the second dynamic tab.
I am trying to add Tables A and B into an arraylist.
Currently I have the code;
For each page in Tabs.Tabpages
Dim dataTableToCopy as New DataTable
dataTableToCopy = dynamicDataTable.copy
arraylistToHoldTables.add(dataTableToCopy)
The issue with this is that it only copies the last data table, in this case Table B.
I have tried another method, in which involved merging the datatables.
For each page in Tabs.Tabpages
Dim dataTableToCopy as New DataTable
dataTableToCopy = dynamicDataTable.copy
mergedDataTable.Merge(dataTableToCopy)
arraylistToHoldTables.add(dataTableToCopy)
The problem with this method is that, although I am able to retrieve all values, the main task was to add each table into the arraylist.
I was thinking of possibly splitting the merged datatable, but was unsure the method to take from there.
Split at row 100, since each table has 100 rows
The solution was to access each datatable from each tab was to iterate through the Controls of each tab
so in each tab, create a datagridview of the one in that tab and add that to the list.

jsp with servlet

I have a jsp which retrieves data dynamically from db and shown in table format. Each row has a update button along with radio button. Whenever i click update on any row it proceed to next update page with only first row value.
Please help me how i could get the remaining rows for updating.
Thank you in advance
Suggestion:
define the corresponding id for the update button and the radio button of every row. I suggest you can define a hidden-text as it.
define a JavaScript function to resolve the logic:
a) get the hidden-text value(id of the row record) about the selected update button or radio.
b) create the target URL with id of the row record.
c) submit id as URL parameter.
define a JavaScript function to refresh the corresponding row with the respond data. of course, you should define a java server interface to get the data of the row id.

additional insert after creating new item in oracle apex

Hello I have created a form page on a table "item1" that is in a Many to Many relation to another table "item2". when inserting a new item1 record through the form I need to insert all related item2 records in the bridge table item1_item2 what I need is to know how to create a function/process to insert these data after creating the item1 record.
You should create Master-Detail page for that.
Press "Create new page", then select "Form", then - "Master-Detail Form". Then you need to choose your master table("item1"), detail table ("item1_item2") and so on. When you will pass all steps of wizard, APEX creates two (or three - it depends on what you will choose) pages, first - for editing your "item1" table, second - for editing related data in table "item1_item2". First page will contain links to second page.
After that you can create Master-Detail pages for editing tables "item2" and "item1_item2".
I have added a new process after the default insert process in the form page. in the new process I get the newly inserted row id and I insert it with the correspondent team id.

Struts 1 - How to pick up a table row values to process in another JSP page

I'm facing this trouble: I have a <table> filled (<logic:iterate>) with some data coming from an Action, the last value (of each table row) is a link that would drives me to another JSP page with the data of the row where the link was clicked to edit the corresponding values.
The fact is that I don't have any idea how to grab the values from that row and pass they to the other JSP page once the link is clicked.
Any ideas / example / implementation?!?!
The code that creates the link (in your table rendering JSP) can embed the ID of the object for that row in the link as query parameter such as ?objectId=13AB73C. (For security reasons it's even better to embed a unique hash of the ID rather than an actual database id). That id can then be obtained from the request parameters.
Once you have the id of the object for the row, you can load the data from the database for your editing page.

wicket - table - dynamically inserting rows without complete refresh of the table

I've been playing around with Wicket for some time now and in one of the latest requirements that I received specifies that I should display some data in a table, and I'm wondering what is the best solution in my case: DataTable, DataView, ... ?
What is my case?
The table should display new rows submitted from a form on the same page by the current user or another user also connected to the application without refreshing the entire table to reduce the amount of data transferred.
What's your point of view?