Af:treeTable: how build tree that displays multiple columns?

I only find a default single column behavior in the dev guide regarding af:treetable. Perhaps some of you might have already tried this out, I'm trying to build a master detail using a treetable with multiple columns. After establishing the ViewLink association and dragging the Master View Object onto the cavas, the default generated code looks like:
<af:treeTable ...
<f:facet name="nodeStamp">
<af:column binding="#{backing_tree.column1}" id="column1"
sortable="false" headerText="">
<af:outputText value="#{node}"
binding="#{backing_tree.outputText1}"
id="outputText1"/>
</af:column>
</f:facet>
</af:treeTable>
This renderes the entire tree in one column, but my detail ViewObject contains multiple attributes and I would like seperate columns to display those values. I'm not sure how to extract the "#{node}" EL to output the detail or child ViewObject's values in seperate af:column. Can someone advise? Thank you.
Z

Luis, thanks for the suggestion. I did get the header labels to show, however, the values are still not being printed correctly. I have department as the Master or parent node and employee as the Detail or child node. Here is what I have
<af:treeTable value="#{bindings.DeptView1.treeModel}" var="node"
binding="#{backing_treeTest.treeTable1}" id="treeTable1"
rowsByDepth="0 0">
<f:facet name="nodeStamp">
<af:column binding="#{backing_treeTest.column1}" id="column1">
<f:facet name="header">
<af:outputText value="Department Name"/>
</f:facet>
<af:outputText value="#{node.Dname}"
binding="#{backing_treeTest.outputText1}"
id="outputText1"/>
</af:column>
</f:facet>
<f:facet name="pathStamp">
<af:outputText value="#{node.Dname}"
binding="#{backing_treeTest.outputText2}"
id="outputText2"/>
</f:facet>
<af:column>
<f:facet name="header">
<af:outputText value="Employee Name"/>
</f:facet>
<af:outputText value="#{node.Ename}"
binding="#{backing_treeTest.outputText3}"
id="outputText3"/>
</af:column>
</af:treeTable>
The Tree Table looks Like:
Department Name | Employee Name
- Accounting
Thanks in advance,
Z

Similar Messages

  • How do you count the multiple columns of a field in a table

    How do you count the multiple columns of a field in a table

    Hi,
    4396bf34-e890-4202-a6b0-4e08c9ff0e89 wrote:
    How do you count the multiple columns of a field in a table
    Whenever you have a problem, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002
    "Field" isn't a standard database term.  Some people say "field" when they mean "column", but I don't think that's what you mean ("How do you count the multiple columns of a column ..").  Do you want to know how many times a column is used (as opposed to NULL), or the number of different values in a column?  You really need to show what you want.

  • How can I display multiple column results of a sql query?

    I'm wanting to display the results of a query selecting from multiple columns, but I can't seem to find an item type that will allow this. I've tried LOV, multiselect, display as text and others. Any ideas on how to do this. Here is my basic query:
    Select ul.meaning,
    rqa.submission_date,
    rqa.location_num
    from
    cfa_rqa_doc_submit_dates rqa,
    cfa_user_lookups ul
    where
    rqa.location_num in (Select location_num from cfa_current_locations_mv
    where operator_person_id = :P1_PERSON_ID and substr(location_num,1,1) = '8')
    and
    ul.lookup_type_id='1269'
    and
    to_char(rqa.submission_date, 'month') = to_char(sysdate, 'month')
    and
    rqa.submission_date >= (SYSDATE-365)
    and ul.lookup_ID= rqa.document_type_id
    ;

    Hi,
    Do you just wish to display the result of the query? If so, you can simply parse it out in HTML.
    You can then choose if you want to use tables or css.
    Multiple column layout in tables are based on <tr> and <td>.
    <tr> is a table row, where <td> is a column.
    All tags should be closed.
    Example:
    <table>
    <tr>
    <td>col1</td><td>col2</td>
    </tr>
    <tr>
    <td colspan="2">spans over 2 cols</td>
    </tr>
    </table>If you want to do the same in css:
    (Seems this forum removes the styles!):
    float:left; width:50; << first div and 2 div (col 1 and col 2 style)
    float:left;clear:both; width:100%; << clear both, double width (spans over 2)
    <div>
    <div style="float:left; width:50;">col1</div><div style="float:left;width:50%;">col2</div>
    <div style="float:left;clear:both; width=100%;">Spans over 2 cols</div>
    </div>The div might look more complicated, but if you refrain from styling in the tags them selves, you can define different styles in the .css file.
    You need the clear:both to start a new line with the divs that float.
    I usually run a dedicated "new line" div, without content.. (exception beeing the html-entities version of ' ' (& nbsp ; << without the spaces)).
    eg.:
    <div style="cls"> </div>Parsing out the values from the PL SQL you do like so:
    begin
    declare
       cursor c_search is 
    Select ul.meaning,
    rqa.submission_date,
    rqa.location_num
    from
    cfa_rqa_doc_submit_dates rqa,
    cfa_user_lookups ul
    where
    rqa.location_num in (Select location_num from cfa_current_locations_mv
    where operator_person_id = :P1_PERSON_ID and substr(location_num,1,1) = '8')
    and
    ul.lookup_type_id='1269'
    and
    to_char(rqa.submission_date, 'month') = to_char(sysdate, 'month')
    and
    rqa.submission_date >= (SYSDATE-365)
    and ul.lookup_ID= rqa.document_type_id
    begin  
    htp.p('<div style="width:80%;">');
    for v_search in c_search loop
    htp.p('<div style="float:left;clear:none;">'||v_search.location_num||'</div>');
    htp.p('<div style="float:left;clear:none;">'||v_search.submission_date||'</div>');
    end loop;
    htp.p('</div>');
      end;
    end;Ps. hope I understood you correctly, also this code is untested.. but I hope it can still help.
    Edited by: Olav Alexander Mjelde on May 12, 2010 9:36 AM

  • How to filter rows where multiple columns meet criteria, ignoring rows where only some columns meet criteria

    Hi All,
    Question: How do I filter rows out of a query where multiple columns are equal to a single question mark character?
    Background: I'm using SQL 2008 R2.  Furthermore, the part of my brain that helps me create less-than-simple queries hasn't been working for the last 4 days, apparently, and now I need help.
    We have about 4,000 rows in a table.  This data set was generated from an exported report, and many of the rows in the detail table were not actual data rows but were simply "header" rows.  For those table rows, most of the columns have
    a single question mark as the value.
    Some of the detail rows have one or more question mark values, too, so it's important that these rows don't get filtered out.
    When I include criteria like "WHERE col1 <> '?' AND col2 <> '?' AND col3 <> '?' AND col4 <> '?'", all rows with a question mark value for even a single one of those columns get filtered out.  How do I filter out rows
    where all columns 1-4 contain a question mark value?
    Thanks for your help,
    Eric

    I just tried to create to create a scenario for you. Please see ig you're looking for something like this.
    Create table test_Question_mark
    RecordID INT identity(1,1),
    Col1 varchar(10),
    Col2 varchar(10),
    Col3 varchar(10),
    Col4 varchar(10),
    insert into test_Question_mark (Col1, Col2, Col3, col4) values ('?','?','?','?')
    insert into test_Question_mark (Col1, Col2, Col3, col4) values ('?','??','?','?')
    insert into test_Question_mark (Col1, Col2, Col3, col4) values ('?','??','??','?')
    insert into test_Question_mark (Col1, Col2, Col3, col4) values ('??','??','??','??')
    insert into test_Question_mark (Col1, Col2, Col3, col4) values ('?','?','?','?')
    insert into test_Question_mark (Col1, Col2, Col3, col4) values ('??','test ??','??','??')
    insert into test_Question_mark (Col1, Col2, Col3, col4) values ('??','test ?','??','??')
    --drop table test_Questio_mark
    select * from test_Question_mark
    select * from test_Question_mark 
    WHERE 
    (CHARINDEX('?', Col1,1) > 0 AND CHARINDEX('?', Col1, CHARINDEX('?', Col1,1)+1) = 0) AND 
    (CHARINDEX('?', Col2) > 0 AND CHARINDEX('?', Col2, CHARINDEX('?', Col2,1)+1) = 0) AND 
    (CHARINDEX('?', Col3,1) > 0 AND CHARINDEX('?', Col3, CHARINDEX('?', Col3,1)+1) = 0) AND 
    (CHARINDEX('?', Col4,1) > 0 AND CHARINDEX('?', Col4, CHARINDEX('?', Col4,1)+1) = 0) 
    --drop table test_Questio_mark
    I hope above solution will help.
    Thanks!
    Ashish.

  • Content Query display multiple columns

    Hello,
    I am using a content query web part (in sharepoint 2013) to display a list from another site. The problem is that I don't see enough info from that list because I can display maximum 2 columns.
    Is it possible to display more columns from this list with the Content query web part? I would like to display all the columns from this list. Do i need to make a display template or something? 
    Thanks. 

    You have to customize the CQWP.
    Please check the below link
    http://pholpar.wordpress.com/2010/01/21/displaying-results-in-multiple-columns-using-the-content-query-web-part/
    Other option is you ca use Dataview webpart to show the list details from one site to other site
    http://www.learningsharepoint.com/2012/08/12/sharepoint-2013-add-dataview-webpart-with-sharepoint-designer-2013/
    http://sharepointgeorge.com/2009/display-sharepoint-list-site-data-view-web-part/
    MCTS,MCPD Sharepoint 2010. My Blog-
    http://www.sharepoint-journey.com
    If a post answers your question, please click "Mark As Answer" on that post and "Vote as Helpful

  • Select function that returns multiple columns.

    Currently I have a function that will return 1 column and I can use that in a select statement. What I need is to return multiple columns from a table. In the function I have I return the street address from a table that holds information about dealers, I need to be able to also return the columns that contain the city, state, and zip code so it can be used in an sql select statement. How would I do this?
    My function:
    FUNCTION GET_ADDRESS(dealer_id IN number)
    RETURN tbl_dealer_info.c_street%TYPE AS
    v_rc tbl_dealer_info.c_street%TYPE;
    CURSOR get_dealer_cur IS
    SELECT c_street
    FROM tbl_dealer_info
    WHERE n_dealer_id = dealer_id;
    BEGIN
    v_rc := NULL;
    OPEN get_dealer_cur;
    FETCH get_dealer_cur INTO v_rc;
    IF get_dealer_cur%NOTFOUND THEN
    NULL;
    END IF;
    CLOSE get_dealer_cur;
    RETURN v_rc;
    EXCEPTION
    WHEN OTHERS THEN
    RETURN NULL;
    END GET_ADDRESS;
    My select statement:
    select GET_ADDRESS(1205) Street, DI.n_inactive_flag, DI.n_onhold_flag
    from tbl_dealer_info DI
    where DI.n_dealer_id = 1205;
    I would like to be able to select the street, city, state, and zip all in this select statement from the GET_ADDRESS function.
    Thanks,
    Lori Neirynck

    "The reality is you've probably already put your blinders on and you won't learn the best approach to solving your problem because you insist on asking a courtroom style question (just "yes" or "no" please)."
    Actually, I asked this question because I was looking for the best approach to my problem. I have an SQL statement that correctly selects everything it needs to from all 15 tables. The thing of it is it is very long and difficult to read. I wanted to try using functions so that I could change 12 AND/OR statements into 3 IF statements so everything is easier to read. I have received a couple of different ways to do this from other forums that assumed I knew what I was doing. I have gotten one to work, the other I'm still working on. I'll post the one that worked for others that want to know.
    SQL> insert into dealer_info values (1,'Me','13 success street', 'Wonder Town','Wonderland','1313');
    SQL> commit;
    SQL> create type t_address as object (
    2 street varchar2(100),
    3 city varchar2(30),
    4 state varchar2(30),
    5 zip varchar2(10));
    6 /
    Type created.
    SQL> create or replace function get_address (p_id number) return t_address
    2 is
    3 ret t_address := t_address(null,null,null,null);
    4 rec dealer_info%rowtype;
    5 begin
    6 select * into rec from dealer_info where id=p_id;
    7 ret.street := rec.street;
    8 ret.city := rec.city;
    9 ret.state := rec.state;
    10 ret.zip := rec.zip;
    11 return ret;
    12 end;
    13 /
    Function created.
    SQL> col name format a10
    SQL> col address format a70
    SQL> select name, get_address(id) address from dealer_info;
    NAME ADDRESS(STREET, CITY, STATE, ZIP)
    Me T_ADDRESS('13 success street', 'Wonder Town', 'Wonderland', '1313')
    1 row selected.
    -Lori

  • JComboBox displaying multiple columns

    I'm new with NetBeans and Java Swing and i've tried to create a combobox that displays 2 fields from a database table(ID an Name). But i can't build a right model for this.
    Please give me an example of such a model.
    Thanks.

    What happens if you do
         Vector items = new Vector();
         items.addElement( new Item("1", "Car" ) );
         items.addElement( new Item("23", "Plane" ) );
         items.addElement( new Item("345", "Train" ) );
         items.addElement( new Item("4567", "Nuclear Submarine" ) );
         JComboBox combo=new LComboBox(items);Does that work? Are you sure it isn't a problem with LComboBox?
    You may want to provide a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program
    which demonstrates the problem you are experiencing.

  • How to display multiple column in report

    Hi Abaper,
    I have client requirment to develop new report for sim hotel.
    The requirment is we have select multiple hotel , based on hotel selection the report will display, the report layout like:
    Hotel1               |Hotel2               |Hotel 3          
    Day     |Month     |Year     |Day     |Month     |Year     |Day     |Month     |Year
    Please any one can give me idea  how to develop same layout for this requirment.
    Thanks in Advance.
    Regards,
    Sourav

    Hi,
    U can use write statement like below
    write:/ 'Day 1'.
    write:20 'Year 1'.
    This will leave 20 spaces between Day 1 and Year 1.
    For more information u can go to transaction 'ABAPDOCU' and in Keyword help type 'Write' u will get all options u can use with write statement.
    Let me know further.
    Cheers,
    Parth Parikh

  • How to display multiple columns under one item

    Hi
    i have one page in that page person having 4 (multipul) phone number
    i need to desplay under the item these phone numbers
    so witch item style i need take
    please tell me

    Hi,
    Create a stack Layout in advance table and under that stack layout create four messagesStyledTexts to show different numbers.
    Thanks,
    Gaurav

  • How build buttons that can be excuted once when mouse down, but recover to its original status when mouse up

    Basically, I want to build several independent buttions. When one button gets the mouse down event, some code is excuted once, but when mouse up, the button go to its original status, and wait for the next click.,
    this should be pretty simple in other languages (C++, or Java), anyway, I feel so hard to figure it out in Labview.
    Any help will be greatly apprecitated!
    best

    See this post for some good guides to start with
    Paul <--Always Learning!!!
    sense and simplicity.
    Browse my sample VIs?

  • Displaying multiple columns of a single column query

    Would anyone happen to know how to display a result set in multiple horizontal columns as opposed to a single vertical column in ApEx?
    Example:
    select server_name from owner.servers;
    A normal sql report would return:
    server1
    server2
    server3
    server4
    server5
    server6
    What I'm looking for is a return that will display:
    server1 server2 server3
    server4 server5 server6

    I'm sure there's a much better way, but one thing that popped into my head was to make your report be a Dynamic PL/SQL Region.
    If you loop thru the records in a cursor, you can build a string and once you have "three" records, use the htp.p to print it out.
    So something like this maybe:
    v_count NUMBER(1);
    v_data SERVERS.SERVER_NAME%TYPE;
    v_string VARCHAR2(100);
    CURSOR getdata IS
    SELECT server_name
    FROM servers
    ORDER BY server_name;
    BEGIN
    v_count := 0;
    OPEN getdata;
    LOOP
    FETCH getdata INTO v_data;
    EXIT WHEN getdata%NOTFOUND;
    v_count := v_count + 1;
    IF v_count = 1 THEN
    v_string := rpad(v_data,25,' ');
    ELSIF v_count = 4 THEN
    htp.p(v_string);
    v_count := 1;
    v_string := rpad(v_data,25,' ');
    ELSE
    v_string := v_string||rpad(v_data,25,' ');
    END IF;
    END LOOP;
    CLOSE getdata;
    END;
    Variable lengths would need to be adjusted to fit your data, but you get the idea (hopefully).
    Again, perhaps it's not the most efficient, but it would work.
    Chad

  • How to transpose rows into multiple columns using pivot table

    I have 1 row containing 12 columns with value "JAN", "FEB", "MAR", "J-1","F-1","M-1","J-2","F-2","M-2","J-3","F-3","M-3"
    I want to display as
    JAN J-1 F-1 M-1
    FEB J-2 F-2 M-2
    MAR J-3 F-3 M-3
    How do I achieve the above?

    Today you have only 3 months JAN, FEB, MAR. Is it always the same number of columns. What if there are more months added to this row?
    Is your data really coming from relational source or some sort of text file?
    There is a better way to do this in narrative view using HTML if your requirement is just to show them in multiple rows and do some calculations.
    Go to Narrative View;
    In prefix, use <html> <table>
    In 'Narrative' text box add something like this
    <tr> <td> @1 </td> <td> @4 </td> <td> @7 </td> </tr>
    <tr> <td> @2 </td> <td> @5 </td> <td> @8 </td> </tr>
    <tr> <td> @3 </td> <td> @6 </td> <td> @9 </td> </tr>
    In Suffix, use </table> </html>
    You can also add simple calculations like sum etc at the very bottom of these rows as grand totals.
    kris

  • Single SQL statement that does multiple column checks

    I have multiple sql statements (see below) that do value and format checking on different columns within the same table. I am trying to condense these checks into one SQL statement, anyone know how to do this?
    select colx, coly, col1 from table1 where col1 not in ('A','B','C')
    select colx, coly, col2 from table1 where col2 not in ('X','Y','Z')
    etc
    Note that I am looking for the value of the offending column (e,g col1 or col2) as the last of the three columns outputted,
    Thanks in advance

    Perhaps;
    SQL> create table t (colx number, coly number, col1 varchar2(1),
       col2 varchar2(1), col3 varchar2(1), col4 varchar2(1))
    Table created.
    SQL> insert all
       into t values(1,1,'A','D','G','J')
       into t values(1,2,'*','D','G','J')
       into t values(1,3,'A','D','G','J')
       into t values(1,4,'A','*','G','J')
       into t values(1,5,'A','D','G','J')
       into t values(1,6,'A','D','*','J')
       into t values(1,7,'A','D','G','J')
       into t values(1,8,'_','-','/','*')
    select * from dual
    8 rows created.
    SQL> select colx, coly,
       trim(regexp_replace('Col1' || col1,'(Col1)([^A|B|C])|(Col1)([A|B|C])', '\1 ') ||
            regexp_replace('Col2' || col2,'(Col2)([^D|E|F])|(Col2)([D|E|F])', '\1 ') ||
            regexp_replace('Col3' || col3,'(Col3)([^G|H|I])|(Col3)([G|H|I])', '\1 ') ||
            regexp_replace('Col4' || col4,'(Col4)([^J|K|L])|(Col4)([J|K|L])', '\1')) offending_column,
       trim(regexp_replace(col1,'([^A|B|C])|([A|B|C])', '\1 ') ||
            regexp_replace(col2,'([^D|E|F])|([D|E|F])', '\1 ') ||
            regexp_replace(col3,'([^G|H|I])|([G|H|I])', '\1 ') ||
            regexp_replace(col4,'([^J|K|L])|([J|K|L])', '\1')) offending_value
    from t
    where regexp_replace(col1||col2||col3||col4,
          '(A|B|C)(D|E|F)(G|H|I)(J|K|L)') is not null
          COLX       COLY OFFENDING_COLUMN     OFFENDING_VALUE    
             1          2 Col1                 *                  
             1          4 Col2                 *                  
             1          6 Col3                 *                  
             1          8 Col1 Col2 Col3 Col4  _ - / *            
    4 rows selected.Message was edited by:
    MScallion
    Added offending_value
    NOTE* this query only works on single character columns and requires modification for multi character columns

  • How to insert signals into multiple columns in db, dbtoolset

    I have  a labVIEW program that is currenly simulating voltage and a current signal using the DAQ Assistant. I'm using the database connectivity toolset. I am currently able to insert one signal into the database converted to a float(I can insert both into the same column as bianary but it needs to be stored as a usable format and in seperate columns.)
    The problem I am having is at the DB Tools Insert Data block. I have the connection, dbTable, error code, and create table boolean being passed into it. Where I am a little lost is how to set the columns I want to store the multiple signals into.
    If someone could break that part down for me that would be great. In short, I want to store voltage(channel0) and current(channel1) from the DAQ Assistant into their own respective columns in the db.

    As I have often pointed out, the easiest solution to this situation is to dump the Database Connectivity Toolkit. Check out this thread and follow the references in it. If the DCT weren't in the way what you are wanting to do would be very easy.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Problem in displaying multiple column values using Narrative View

    Hi All,
    I have a requirement where in I need to display column 1 of an Answers report as a header and all values of column 2 below tht.
    There are multiple values from column 2 for every value in column 1
    Example:
    Group:
    Grp (This is column 1)
    Activity:
    Act1
    Act2
    Act3 (These are values from column 2)
    I have used narrative view for this which looks like:
    Group: @1
    Activity:@2[br/]
    But this displays the value of column1 along with every value of column 2. I want column 1 value to be displayed only once.
    Thanks in advance
    Radhika

    Hi see this link it may helpful
    Re: Narrative view not showing up in the report
    Re: how to transpose columns to rows in OBIEE
    Regards
    Naresh

Maybe you are looking for