Column selection with column tree model
Hello!
I created a column tree model. I would like to be able to select a column when i click on its header. How can I do that? There is no problem to select one item. I try to select all the items of a column but if do that this is the lines which are selected. The item_selection parameter is set to 'X'.
Thanks in advance,
Hi,
I am not sure if I understood your problem right. But just in case, if you are referring to this...
You say you need a check box to select your nodes. So you would have to add your item names in a separate column and then add the check box in a separate column using ADD_COLUMN method. You would have to use treemcitac structure and make use of ADD_ITEMS to add them.
Once you add the column for check box, code your logic and build your tree hierarchy with all the correct node keys. For example, the root node will have node_key = 1 and parent_key = 0. The node that comes under the root node in the first hierarchy level will have node_key = 2 and parent_key = 1. Code your logic so that you build your tree hierarchy.
Build the tree structure using treemcnota as you have done. Add the nodes built using treemcnota using ADD_NODES.
According to your requirement,
COL1 COL2 (for checkbox) } -> Build using treemcitac
Preimport (Root) -> Root Node
Request Checks (Node_1) -> parent_key = Preimport
Check Req Status (Item_1) -> parent_key = Request Checks (Node_1)
Check Req Scope (Item_2)
Check Req Componenets (Item_3)
Object List Checks (Node_2)
Check obj type (Item_1)
check deletions (Item_2)
Object Checks (Node_3)
"Build the tree nodes using treemcnota and add these nodes using ADD_NODES
Again, I am not sure if your problem is this. Hope this might be helpful.
Similar Messages
-
Column Chart with Columns That Vary in Width
The subject is Column Chart with Columns That Vary in Width.
I have been concentrating on the column renderer. Unfortunately,
the renderer class receives control with access to limited
information. Mainly, what it gets is pixel counts that measure the
dimensions of the rectangle that ends up being a column. There is
no straightforward way to send width information to the renderer. I
can, however, change the color of the column. I thought of encoding
the width in the height, but that distorts the actual height,
potentially causing the chart scale to be computed incorrectly.
Also, the encoding is hard to reverse once the height in
transformed by an unknown and varying scale factor so that the
column fits on the chart. I love the way the column chart looks. I
only want to alter the width of each individual column. Since I am
drawing each column, if I knew the widths, I'd be done by now. Do
you have a better approach? Thanks in advance.You need three ColumnSeries. Set the dataProvider of each directly (instead of setting it for the ColumnChart) to something like this:
var cars:ListCollectionView = new ListCollectionView();
cars.list = inventory;
cars.filterFunction = function(item:Object):Boolean {
return item['category' /* or whatever your category field is */] == 'cars';
Do something similar for bikes and trucks. You can do something like this if you don't know the number of categories as well, but it's rather trickier (and left as an exercise for the reader). -
Lead selection with a tree-based table.
I've created a recursive context node to display contents of a KM folder. The structure has been mapped to a table, which works just fine. I can expand nodes of the tree and display the contents of sub-folders. Great. However, I need to know which backing KM object has been selected via the table. Since this is a recursive structure, using
wdContext.currentXXXX()
does not work, since that's the top of the tree. Parameter mapping will only give you the column and/or row of the item selected in the table, not the object itself.
I'm missing something obvious here, but I can't figure out how to get the context element behind the selected row in a table which is displaying a recursive structure.
I can do this with a Tree structure, since you can map the 'path' parameter to the actual context object. However, the Table UI doesn't offset that information (a severe oversight, at least in my mind).
Suggestions?Thanks Armin, that works great.
Had I finished reading this page:
http://help.sap.com/saphelp_nw70/helpdata/en/60/1f1f056f057d4d962375efd3c92ed0/frameset.htm
I would have found the correct documentation. -
Need a Query that Returns both Column Name with Column Data
Hi,
Hope someone can assist quite quickly. I'm after a query that will return me both column name together with column data, i.e
Table: APP_INFO
COL1 - currently has the value of 10
COL2 - currently has the value of 'HELLO'
COL3 - currently has the value of 'QWERTY'
COL4 - currently has the value of 2000Query I'm after is to return the following result set: [actual column name, actual column data]
COL1,10
COL2,'HELLO',
COL3,'QWERTY'
COL4,2000
Any help would be much appreciated.
Thanks.
Tony.Like this ?
SQL> select empno, ename, deptno from emp where deptno = 10;
EMPNO ENAME DEPTNO
7782 CLARK 10
7839 KING 10
7934 MILLER 10
SQL> select decode(t.id,1,'EMPNO',2,'ENAME',3,'DEPTNO') COLNAME,
2 decode(t.id,1,to_char(empno),2,ename,3,deptno)
3 from (select emp.*, rownum rn from emp
4 where deptno = 10) emp, (select rownum id from dict where rownum <=3) t
5 order by emp.rn, t.id
6 /
COLNAM DECODE(T.ID,1,TO_CHAR(EMPNO),2,ENAME,3,D
EMPNO 7782
ENAME CLARK
DEPTNO 10
EMPNO 7839
ENAME KING
DEPTNO 10
EMPNO 7934
ENAME MILLER
DEPTNO 10
9 rows selected.Rgds. -
I have two types of tree Models that I would like to combine into one tree i did the combination this way:
public CombainedTreeModel(BaseTreeModel firstSubTree,BaseTreeModel secondSubTree) {
super(null);
BaseTreeNode root=new BaseTreeNode("root");
insertNodeInto(firstSubTree.getTreeRoot(),root,GuiConstants.INDEX_ZERO);
insertNodeInto(secondSubTree.getTreeRoot(),root,GuiConstants.INDEX_ONE);
and used the combined model (that is extends of BaseTreeModel -> DefaultTreeModel.) as the input of the tree.
I see that there are elements in the tree but they are not visible.....
what is the problem?I had a bit different interpertation for the MVC in swing:
model - is a pure java class holds the data
control- the treeModel that pass the commands to the model and after the comand was done - remove/add/update node from the tree and commite reload so the view will be refreshed
view - the Jtree
Everything in this model used to be ok until i combined two tree model to a third model so they will be displayed together.
this is how I remove a node:
public void removeContentServer(int contentServerId) throws BitBandGuiRemoveException, BitBandGuiFindException {
if (logger.isDebugEnabled())
logger.debug("ContentTreeModel.removeContentServer");
BaseContentTreeNode contentServerNode = getContentServerNode(contentServerId);
networkModel.removeContentServer(contentServerId);
contentServerNode.removeFromParent();
if (logger.isDebugEnabled()) {
logger.debug("remove content server from the model" + contentServerId);
synchronized (contentServerNode) {
contentServerNode.removeFromParent();
if (logger.isDebugEnabled()) {
logger.debug("remove content server from the tree model");
reload(root);
} -
Hi Experts,
Can you please help me in setting the ALV column selectable ?
I have set the column selection state at no selected at the initialization.
But when I am trying to select the column selecting the column header,. the column is not getting selected?
Am I missing something ?
Please suggest.
Thanks,
SoniaHi,
Refer http://scn.sap.com/thread/1455658 also refer standard help http://help.sap.com/saphelp_erp60_sp/helpdata/en/38/c5bacc91a345eda17f2903491c391d/content.htm
Regards,
Chandra -
Possibility for automatic column width in column view
hi there,
i would like to ask if anybody has an idea to fulfil my desire.
i work in column view in the finder of os 10 and it is not handy that i can not read some of my file names due to the column view.
is there a possibility that the columns change their width automatically? or does anyone knows a shareware to solve this problem.
i want to open a new window and all columns change themselves.
thank you very much. kind regards,
michaelWhile this isn't a solution, if you double click on the column width adjustment button (under the arrows of the column you are looking at) the column will increase width to fully show the widest name in the column.
However, it would be nice to have a Preference available that would let you choose to always have columns displayed with columns at sufficient width to show full names.
I think this issue is a remnant of a small screen psychology. Large screens are now so prevalent that wide columns would not be a significant issue.
Message was edited by: RolandoS -
Selecting all columns from table in a model query
I have written a model query which joins 4 tables, applies some rules and returns updated rows by selecting 4 columns out of this. Currently it works fine because all 4 columns are from MODEL aliases. Now I need to select 16 more columns in the same query but none of these columns is added in MODEL aliases. When I tried selecting these columns I got oracle error ORA - 32614. Can someone please guide me to include these columns in the same model query?
I tried couple of options but no luck. Here are those options for ready reference:
1. I cannot nest existing model query into another select because there are no columns avaiable to join in output of current query to map with other records.
2. I cannot include all 16 columns in MODEL aliases because some of these columns are actually output of user defined functions.
I am using Oracle database version 11g Release 11.2.0.1.0.
Edited by: Anirudha Dhopate on Jan 23, 2011 5:43 PMThank you Avijit for your reply. There is a syntax error on the ON in this part of the statement which I don't know how to fix - I tried messing around with another INNER JOIN but am not confident that I'm doing the right thing:
SENAlertType.SENAlertTypeIDONClassMember.ClassMemberStudentID
Thanks for your help! I will need to do some more bedtime reading on joins.
Daniel -
How to create a Type Object with Dynamic select query columns in a Function
Hi Every One,
I'm trying to figure out how to write a piplined function that executes a dynamic select query and construct a Type Object in order to assigned it to the pipe row.
I have tried by
SELECT a.DB_QUERY INTO actual_query FROM mytable a WHERE a.country_code = 'US';
c :=DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(c,actual_query,DBMS_SQL.NATIVE);
l_status := DBMS_SQL.EXECUTE(c);
DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
FOR j in 1..col_cnt LOOP
DBMS_SQL.DEFINE_COLUMN(c,j,v_val,2000);
END LOOP;
FOR j in 1..col_cnt LOOP
DBMS_SQL.COLUMN_VALUE(c,j,v_val);
END LOOP;
But got stuck, how to iterate the values and assign to a Type Object from the cursor. Can any one guide me how to do the process.
Thanks,
mallikj2Hi Justin,
First of thanks for your reply, and coming to my requirement, I need to report the list of items which are there in the dynamic select statement what am getting from the DB. The select statement number of columns may vary in my example for different countries the select item columns count is different. For US its '15', for UK it may be 10 ...like so, and some of the column value might be a combination or calculation part of other table columns (The select query contains more than one table in the from clause).
In order to execute the dynamic select statement and return the result i choose to write a function which will parse the cursor for dynamic query and then iterate the values and construct a Type Object and append it to the pipe row.
Am relatively very new for these sort of things, welcome in case of any suggestions to make it simple (Instead of the function what i thought to work with) also a sample narrating the new procedure will be appreciated.
Thanks in Advance,
mallikj2. -
How to select column dynamically with sharepoint list as data source in ssrs report
Hi all,
I am creating reports from SharePoint list but i have requirements to select the column name dynamically with SharePoint list as data source. I didn't find any way of doing this..
Can anyone help me to resolve this issue..
There is no way of specifying column name dynamically here in data set query
<RSSharePointList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ListName>test list</ListName>
<ViewFields>
<FieldRef Name="ID" />
<FieldRef Name="ContentType" />
<FieldRef Name="Title" />
<FieldRef Name="Modified" />
<FieldRef Name="Created" />
<FieldRef Name="Author" />
<FieldRef Name="Editor" />
<FieldRef Name="_UIVersionString" />
<FieldRef Name="Attachments" />
<FieldRef Name="Edit" />
<FieldRef Name="LinkTitleNoMenu" />
<FieldRef Name="LinkTitle" />
<FieldRef Name="DocIcon" />
<FieldRef Name="ItemChildCount" />
<FieldRef Name="FolderChildCount" />
<FieldRef Name="test_x0020_date" />
<FieldRef Name="title2" />
</ViewFields>
</RSSharePointList>Hi MNRSPDev,
Sorry for the delay.
According to the current description, I understand that you want to specify column name in dataset query designer dynamically when using SharePoint list data source.
Based on my research, this is not supported by default. As a workaround, you can use XML data source. The XML content can be embedded directly within the query. This lets you use the expression capabilities within the processing engine to build queries and
data dynamically within the report. And it can be used for retrieving XML data directly from an external data source, passing it using parameters, and embedding it within the query.
Reference:
http://www.codeproject.com/Articles/56817/Dynamic-Reports-with-Reporting-Services
Hope this helps.
Regards,
Heidi Duan
Heidi Duan
TechNet Community Support -
How to generate a second csv file with different report columns selected?
Hi. Everybody:
How to generate a second csv file with different report columns selected?
The first csv file is easy (report attributes -> report export -> enable CSV output Yes). However, our users demand 2 csv files with different report columns selected to meet their different needs.
(The users don't want to have one csv file with all report columns included. They just want to get whatever they need directly, no extra columns)
Thank you for any help!
MZHello,
I'm doing it usually. Typically example would be in the report only the column "FIRST_NAME" and "LAST_NAME" displayed whereas
in the csv exported with the UTL_FILE the complete address (street, housenumber, additions, zip, town, state ... ) is written, these things are needed e.g. the form letters.
You do not need another page, just an additional button named e.g. "export_to_csv" on your report page.
The csv export itself is handled from a plsql procedure "stored procedure" ( I like to have business logic outside of apex) which is invoked by pressing the button "export_to_csv". Of course the stored procedure can handle also parameters
An example code would be something like
PROCEDURE srn_brief_mitglieder (
p_start_mg_nr IN NUMBER,
p_ende_mg_nr IN NUMBER
AS
export_file UTL_FILE.FILE_TYPE;
l_line VARCHAR2(20000);
l_lfd NUMBER;
l_dateiname VARCHAR2(100);
l_datum VARCHAR2(20);
l_hilfe VARCHAR2(20);
CURSOR c1 IS
SELECT
MG_NR
,TO_CHAR(MG_BEITRITT,'dd.mm.yyyy') AS MG_BEITRITT ,TO_CHAR(MG_AUFNAHME,'dd.mm.yyyy') AS MG_AUFNAHME
,MG_ANREDE ,MG_TITEL ,MG_NACHNAME ,MG_VORNAME
,MG_STRASSE ,MG_HNR ,MG_ZUSATZ ,MG_PLZ ,MG_ORT
FROM MITGLIEDER
WHERE MG_NR >= p_start_mg_nr
AND MG_NR <= p_ende_mg_nr
--WHERE ROWNUM < 10
ORDER BY MG_NR;
BEGIN
SELECT TO_CHAR(SYSDATE, 'yyyy_mm_dd' ) INTO l_datum FROM DUAL;
SELECT TO_CHAR(SYSDATE, 'hh24miss' ) INTO l_hilfe FROM DUAL;
l_datum := l_datum||'_'||l_hilfe;
--DBMS_OUTPUT.PUT_LINE ( l_datum);
l_dateiname := 'SRNBRIEF_MITGLIEDER_'||l_datum||'.CSV';
--DBMS_OUTPUT.PUT_LINE ( l_dateiname);
export_file := UTL_FILE.FOPEN('EXPORTDIR', l_dateiname, 'W');
l_line := '';
--HEADER
l_line := '"NR"|"BEITRITT"|"AUFNAHME"|"ANREDE"|"TITEL"|"NACHNAME"|"VORNAME"';
l_line := l_line||'|"STRASSE"|"HNR"|"ZUSATZ"|"PLZ"|"ORT"';
UTL_FILE.PUT_LINE(export_file, l_line);
FOR rec IN c1
LOOP
l_line := '"'||rec.MG_NR||'"';
l_line := l_line||'|"'||rec.MG_BEITRITT||'"|"' ||rec.MG_AUFNAHME||'"';
l_line := l_line||'|"'||rec.MG_ANREDE||'"|"'||rec.MG_TITEL||'"|"'||rec.MG_NACHNAME||'"|"'||rec.MG_VORNAME||'"';
l_line := l_line||'|"'||rec.MG_STRASSE||'"|"'||rec.MG_HNR||'"|"'||rec.MG_ZUSATZ||'"|"'||rec.MG_PLZ||'"|"'||rec.MG_ORT||'"';
-- DBMS_OUTPUT.PUT_LINE (l_line);
-- in datei schreiben
UTL_FILE.PUT_LINE(export_file, l_line);
END LOOP;
UTL_FILE.FCLOSE(export_file);
END srn_brief_mitglieder;Edited by: wucis on Nov 6, 2011 9:09 AM -
JTable column names with custom model
I'm having problems with column names in a JTable which uses a custom model. For some reason, the colums are being shown as A, B, C etc. The data, however, displays fine.
This is the code which constructs the table.
MyTableModel tableModel = new MyTableModel(myArrayList);
myTable = new JTable(tableModel);
myTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
myTable.setFillsViewportHeight(true);This is the class, MyTableModel
class MyTableModel extends AbstractTableModel {
private ArrayList<Account> data;
private String[] colNames = {"", "Name","Type","Group","Created","Modified"};
public MyTableModel(ArrayList<Account> data) {
this.data = data;
public int getRowCount() {
return data.size();
public int getColumnCount() {
return 6;
public Object getValueAt(int row, int col) {
Account account = (Account)data.get(row);
switch(col) {
case 0:
return account.getIcon();
case 1:
return account.getName();
case 2:
return account.getType();
case 3:
return account.getGroup();
case 4:
return account.getDateCreated();
case 5:
return account.getDateModified();
default:
return "";
public String getColumName(int index) {
System.out.println("N:"+colNames[index]);
return colNames[index];
}When the table is displayed, nothing's displayed to the console, but I'd have thought getColumnName would print the current column name. Am I missing something obvious?Oh great. I'll go back under my rock.
Thanks =) -
Select multiple columns from tab with group by
hi
i have a table with many columns suppose in that i have 2 columns as date and time
and in my table i am getting suppose data like
columns -> date time a b c
22-may-2207 10
22-may-2207 17
23-may-2007 5
24-may-2007 12
24-may-2007 15
i want to select all columns with data with unique data with max of time for that particular date
answer :-
22-may-2007 17 a b c
23-may-2007 5 a b c
24-may-2007 15 a b c
with all other cloumns also with this
plz help me i am trying too much and not able to solve this.try this
select datecol, timecol, a, b, c
from (
select datecol, timecol, a, b, c,
rank() over(partition by datecol order by timecol desc) rn
from my_table
where rn = 1
order by datecol;Message was edited by:
Jens Petersen -
Editable column in tree with columns
Hello,
Im constructing a tree with columns with CL_GUI_COLUMN_TREE class and I want to set one of the columns as text type and editable.
¿Do you know how? If I could do it with another class I would also be glad to try it.
Thanks.Hi,
Please refer the links,
Tree element: How to make nodes editable
CL_GUI_COLUMN_TREE editable?
Regards,
Hema.
Reward points if it is useful. -
In itunes with "Songs" selected there is a column labled with a header which is simply a check sign. If you select "View" a pulldown menu titled "View Options" appears and one has the option to either display (or not display) the "Checked" column. I get that. But what does it mean when a song is shown as "Checked" versus not being "Checked" That part I don't understand. Is it used in conjunction with another operator? I understand columns labled "Name", "Artist", "Alumn" but "Check Sign" is new to me. Please help.
Thanks.Diesel,
Thank you for your response. I never would have figured that out.
Russ
Maybe you are looking for
-
How to change background color of text in pdf based by font name
Hi How to change the background color of text in PDF based by font name. Is there any option in Javascript. e.g: If PDF containing ARIAL font, the ARIAL text background color needs to be changed in red color for all pages. Same for all fonts with dif
-
Unable to Settle WBS element- Message No. KD559..
Hi, I am trying to settle a WBS element. I have maintained the settlement rule through CJIC. Now when I am trying to settle it through CJ88 I get a message: Message no. KD559 Diagnosis You are trying to use a settlement amount rule to settle an amoun
-
My computer has a virus how do i get it off
i downloaded a third part soft wear the other day , and now my computer has a virus. someone help get it off!
-
Flagged folder: How can I erase the "1" showing a message when the folder is empty! Or, how can I delete the Flagged folder altogether?
-
Hello all, How to create a self join using ABAP Query? Say, I have this table EKBE with belnr (materials doc num) and lfbnr (reference material doc num). I have to pick the PO's from EKBE whose belnr doesnt have any lfbnr. Regards Madhumathi A