How to select a specific column in a bean method?

Hey everyone,
I'm trying to select a specific column in my adf table so i can hightlight the ones i can after, with a method bean that does a match from another table. I'm using JDeveloper 12.1.2.0.0.
Here's my table at the moment (its a static list that Timo and Alejandro helped me create, thanks to them again!):
<af:table value="#{bindings.Anos1.collectionModel}" var="row"
                                                          rows="#{bindings.Anos1.rangeSize}"
                                                          emptyText="#{bindings.Anos1.viewable ? 'No data to display.' : 'Access Denied.'}"
                                                          rowBandingInterval="0" fetchSize="#{bindings.Anos1.rangeSize}"
                                                          filterModel="#{bindings.Anos1Query.queryDescriptor}"
                                                          queryListener="#{bindings.Anos1Query.processQuery}"
                                                          filterVisible="false" varStatus="vs" id="t5"
                                                          styleClass="AFStretchWidth" columnSelection="multiple"
                                                          inlineStyle="max-width:100%;" columnStretching="multiple"
                                                          columnSelectionListener="#{ControlBean.onAnoColumnSelect}"
                                                          disableColumnReordering="true"
                                                          binding="#{ControlBean.dimAnos}">
                                                    <af:column sortProperty="#{bindings.Anos1.hints.A2011.name}"
                                                               filterable="true" sortable="false"
                                                               headerText="2011"
                                                               id="c54" width="16%">
                                                        <af:outputText value="#{row.A2011}"
                                                                       shortDesc="#{bindings.Anos1.hints.A2011.tooltip}"
                                                                       id="ot54">
                                                            <af:convertNumber groupingUsed="false"
                                                                              pattern="#{bindings.Anos1.hints.A2011.format}"/>
                                                        </af:outputText>
                                                    </af:column>
                                                    <af:column sortProperty="#{bindings.Anos1.hints.A2012.name}"
                                                               filterable="true" sortable="false"
                                                               headerText="2012"
                                                               id="c55" width="16%">
                                                        <af:outputText value="#{row.A2012}"
                                                                       shortDesc="#{bindings.Anos1.hints.A2012.tooltip}"
                                                                       id="ot55">
                                                            <af:convertNumber groupingUsed="false"
                                                                              pattern="#{bindings.Anos1.hints.A2012.format}"/>
                                                        </af:outputText>
                                                    </af:column>
                                                    <af:column sortProperty="#{bindings.Anos1.hints.A2013.name}"
                                                               filterable="true" sortable="false"
                                                               headerText="2013"
                                                               id="c56" width="16%">
                                                        <af:outputText value="#{row.A2013}"
                                                                       shortDesc="#{bindings.Anos1.hints.A2013.tooltip}"
                                                                       id="ot56">
                                                            <af:convertNumber groupingUsed="false"
                                                                              pattern="#{bindings.Anos1.hints.A2013.format}"/>
                                                        </af:outputText>
                                                    </af:column>
                                                </af:table>
I've deleted some of the columns because they are all equal and by doing so, you have less problems in reading it.
In my method i have a matchEm but i'm trying to select a column by using this line:
        dimAnos.setColumnSelection("A2012");
dimAnos is the binding for my table Anos (Years in Portuguese). I even tried another values fro the columnSelection but i couldn't make it selected. Am i doing anything wrong?
Please help me or give me an idea of how can i do this.
Regards,
Frederico.

Hi Frederico,
The method setColumnSelection is meant to set whether your table supports column selection or not. It doesn't select the column. In order to select the column, you need to set the column attribute Selected to true. So I don't know if its an option for you but you can create a binding to all the columns you have in you bean, and then call the method A2012.setSelected(true), and then add a partial target to the table to re render it and show the selected column.
Hope this helps

Similar Messages

  • How to: Select a Specific Timeline Displayed in Project Online when having multiple timelines within the Enterprise Project

    Currently I have an Enterprise Project which has 6 custom timelines and I want to know how to select a specific timeline to be displayed on the Project specific SharePoint site.
    I'll provide some background for you so you understand my issues... I have created a "template" project with 6 custom timelines. From that project I created multiple new projects - which they all have the 6 custom timelines. These projects are
    all stored in the Project Center. The problem I am having is I don't understand how to select a specific timeline to show on the project specific SharePoint site. They all seem to be displaying 1 of the 6 timelines (in no particular order). I was thinking
    maybe if I had edited a project and saved it while it was displaying a specific timeline it would display the last selected timeline on the SharePoint site, but it doesn't seem to be doing that.
    Is there a way to select a specific timeline to display on the SharePoint site?  Also, is there a way for a user to cycle through the numerous timeline view on the project specific SharePoint site?
    I await your help!! :)

    Michelle_Sm --
    I ran into this problem at the company where I used to work.  One of our PMs had created multiple Timeline views, and wanted a specific custom Timeline view to show up in the Project Site for that project.  I could not see any way to make that
    happen.  We had one of our SharePoint developers look into the issue, and he could not see any way to make this happen either.  So, I am thinking this is not possible to do.  But I would gladly welcome others in this forum to tell us the trick,
    if there is one!  :)  Hope this helps.
    Dale A. Howard [MVP]

  • How to select the "in columns" dimension on export all Command ?

    Hello,
    I'm trying to export data from an V6.5 Essbase database to a 9.2 one.
    The easier and faster way I found is to use the 'Export database all data in Columns' from the 6.5 cube and load the data with a rule file in the 9.2 (The Export database command is MaxL command).
    The Export All Command with the "in columns options", export all data and put one dimensions in columns. Previously, It was always the Time dimension (M01 .... M12). And all worked fine.
    But someone changed the order of the dimensions in the V6.5 Essbase database. And now, there is another dimension (which changes more often) in columns and which have a lot of members (meanwhile my time dimension only have 12 members).
    So do you know how to select the dimensions which is in columns when using the export database all data function ? I do not see any options in Maxl ?? Maybe there is a rule to follow, in the dimensions order ?
    Do you have any idea about it ?
    Thanks for your help
    P.S : I'd prefer to avoid workaround such as using Reports Scripts or Calc Script (there are too slow).

    Why not use Essbase's native export format, bring it over onto your new environment, and reimport? Change to your heart's content on the target.
    Yes, the dimensionality (names, order, members, etc.) will have to be the same, but this approach, not the columnar export, is the fastest and most efficient way.
    Regards,
    Cameron Lackpour

  • Selecting a specific column

    Hi,
    I want to select one whole column in a transaction, how could i be able to code that one?
    i hope someone could help me on this.
    Thanks,
    Cristina

    Hi,
    select <table-fields> into <itab> from <table> where <condition>.
    For more check this link
    http://help.sap.com/saphelp_nw04/helpdata/en/62/10a423384746e8bf5f15ccdd36e8b1/content.htm
    http://dev.mysql.com/doc/maxdb/en/40/1312152fa511d3a98100a0c9449261/content.htm
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/select.htm
    Reward if useful.
    Thanks

  • How to select a specific cell in a JTable?

    Hi there,
    in a JTable, I would like to select a specific cell (to highlight it) from a JButton.
    Here a sample code...
    Who could help me to fill it?
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.awt.*;
    import java.awt.event.*;
    public class TableSelection{
        public static void main (String args[]) {
          JFrame frame = new MyFrame();
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.show();
    class MyFrame extends JFrame{
      public MyFrame(){
        setTitle("TableSelection");
        setSize(WIDTH,HEIGHT);
        DefaultTableModel myModel = new DefaultTableModel(2,2);
        JTable myTable = new JTable(myModel);
        myTable.setCellSelectionEnabled(true);
        JButton button00 = new JButton("select 0,0");
        button00.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent event){
         System.out.println("selection of cell (0,0)");
         //--- what code is required to select the cell(0,0)?
        JButton button11 = new JButton("select 1,1");
        button11.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent event){
         System.out.println("selection of cell (1,1)");
         //--- what code is required to select the cell(1,1)?
        Box myBox = new Box(BoxLayout.Y_AXIS);
        myBox.add(new JScrollPane(myTable));
        myBox.add(button00);
        myBox.add(button11);
        getContentPane().add(myBox, BorderLayout.CENTER);
      private static final int WIDTH=200;
      private static final int HEIGHT=200;
    }Thanks a lot for your help.
    Denis

    Use the addColumnSelectionInterval(int index1, int index2)method ~ http://java.sun.com/j2se/1.4/docs/api/javax/swing/JTable.html#addColumnSelectionInterval(int,%20int)
    and the addRowSelectionInterval(int index1, int index2) method ~ http://java.sun.com/j2se/1.4/docs/api/javax/swing/JTable.html#addRowSelectionInterval(int,%20int)
    Hope that helped.
    afotoglidis

  • How to select even the column names of a table?

    Hello All,
    Is there a way to select even the column names of a table in the select statement?
    My select from a table (say X) is in a SQL* Plus script that gets invoked by application tier and displays data in the application tier window. User's can then copy the data into a spreadsheet and do their processing. However, I need to give them the column names too along with the data.
    Thanks,
    Chiru

    If there is a middle tier that is selecting and
    displaying the data, and that's what the users are
    copying from, the middle tier would have to address
    its presentation of the data to allow users to
    include column names. If this is a common task, the
    application should probably be modified to give users
    the option of downloading the data in a spreadsheet
    directly rather than forcing them to copy and paste
    data.Thanks for the reply.
    The users don't have to copy paste. The application tier has an options in the "Tools" menu item which allows them to copy the entire output to a file (in my case a txt file which is a pipe delimited). Then they have to do text to columns to get the data into each column of the spreadsheet. I could have directly called the stored procedures from the application tier and created ".csv" files and FTP'd them to the user's folders. However, I am having to go this round about because, I am not getting enough support from the LAN team in FTP'ing etc.
    OK I'll think of another workaround.
    Thanks,
    Chiru

  • How to select a specific XML node with XPath

    Hi,
    I'm trying to a select a specific node from my XML data using the XPath Builder.  For example, say I have a process variable 'xmlData' with the
    following contents:
        User 1
        101
        User 2
        102
    I can successfully use the following expression to retrieve the name of
    a specific user:
    (/process_data/xmlData/users/user[userid='102'])/name
    The problem is I need to use another process variable for the selection
    key.  For Example:
    (/process_data/xmlData/users/user[userid=/process_data/@userId])/name
    But this always returns null.  I've tried surrounding /process_data/@userId
    with single quotes, double quotes, and event {$..$}. 
    Any help would be greatly appreciated.
    Thanks.

    Hi,
    Thanks for the quick replies.  I gave a bit of a bad example, as the
    userid in my data is really a string, not a number.
    A better example is:
        User 1
        user1
        User 2
        user2
    I can get the following to work perfectly:
    (/process_data/xmlData/users/user[userid='user2'])/name
    but I can't get it to work with
    /process_data/@userId = "user2"
    (/process_data/xmlData/users/user[userid=/process_data/@userId])/name
    Thanks.

  • How to select different database columns in a single BO Universe Object

    We have 'n' databases. All the databases have identical tables and views but some tables in few database have custom columns.
    Ex. 'database1' has table 'sites' with the following columns
    1. sitenumber
    2. sitename
    3. siteaddress
    4. phone
    5. email
    6. ActivatedDate
    'database2' has table 'sites' with the following columns
    1. sitenumber
    2. sitename
    3. siteaddress
    4. phone
    5. email
    6. ActivatedDate
    7. LocalActivatedDate
    The condition says that
    "Local Activated date will be used if populated in the system otherwise Activated Date will be used"
    How do i create a condition at the universe level which checks whether the column "LocalActivatedDate" is present in the database or not. Also, how to give a condition which select between "ActivatedDate" and "LocalActivatedDate"
    A single universe needs to be created for all the databases. Only the Default Database in connection parameter changes during deployment.
    Can this be achieved using BO Universe Designer only?
    Thanks in Advance,
    Arun
    Edited by: arunkumars on Dec 2, 2009 10:00 AM

    Create a universe with your default connection and then while changing the universe connection you can write an SDK script using universe designer sdk  do a REFRESH STRUCTURE so that all the you will get the schema same as current DB and then you can add predefined condition or object to this universe  (before doing this keep a copy of the universe) .
    You have to do a lot of stuff to keep your universe proper and stable to work with all the databases using designer SDK.
    Can achieve this but with an overhead of writing and calling SDK scripts again and again . ...
    Hope this helps...
    Regards
    Kunal

  • How do you sort specific columns and freeze a header column?

    I'm creating a list of people attending a workshop and would like the first column to be the number of people attending. The first column is the number and that row sorts with the rest, so then my numbers go 1, 9, 5, etc instead of remaining 1-20. Is there a different way for me to determing the number? I put 1 in cell A 2 and then for A 3 I give it a formula A1 + 1 to create the number sequence. I've tried making it a header column and freezing the column, but it still changes.
    thanks,
    Nancy

    Nancy,
    You can search the discussions when you have a specific question, or you can just browse them from time to time to see what there is to be learned. Your question is a little like "How did you learn to be a good cook?" Most of the good home cooks never went to cooking school, but they have had lots of good coaching and lots of experience. Many of the helpers here have been using spreadsheets for so long that they don't remember when they learned a particular trick or method. And, we like to share, so keep the questions coming.
    I keep the Formula Browser in view, and I study the examples for the functions I think I might want to use.
    Regards,
    Jerry

  • How to select a specific line in jQuery?

    Hi
    We are developing a list, where some salesorders are displayed.
    It is crated in BSP/Jquery.
    In my code I show a 10 lines - with a new salesorder on each line.
    When the user click on one of the lines (= one of the sales order), I want to
    1.take the salesorder (= get the selected value),
    2.get more details about the sales order (=need to make select into my backend)
    3.show the new details on a list (like a href="#details"...)
    My code looks like this:
    <div data-role="content">   
    <ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="a">   
    <li data-role="list-divider">Your Fav</li>  
    </ul>   
    </div>   
    <ul data-role="listview" data-inset="true" data-theme="d" data-dividertheme="c">   
    <%     loop at gt_fav_cust1 assigning <ls_fav_cust>.   
    select single name1 into <ls_fav_cust>-custname  
    from kna1 where kunnr = <ls_fav_cust>-kunnr.    %>  
    <li>
    <a href="#customer" data-transition="flip" data-rel="dialog">   
    <%= <ls_fav_cust>-kunnr %>   
    <%= <ls_fav_cust>-custname %>   
    </a>
    </li>  
    <%    endloop.    %>   
    </ul>
    Can anybody guide me in the right direction?

    Hi Frederico,
    The method setColumnSelection is meant to set whether your table supports column selection or not. It doesn't select the column. In order to select the column, you need to set the column attribute Selected to true. So I don't know if its an option for you but you can create a binding to all the columns you have in you bean, and then call the method A2012.setSelected(true), and then add a partial target to the table to re render it and show the selected column.
    Hope this helps

  • How to select rows or columns of tables without using the mouse?

    2nd post ever! Yeah! \m/
    In Excel, I can select entire rows or columns of data WITHIN TABLES--i.e., not selecting entire sheet rows or columns--by going to any cell on the perimeter of the table, holding down shift+ctrl, and clicking a direction arrow. So for example, if I have a table in columns D-G and rows 1-5, I can highlight row 4 by going to the first or last cell of that row, holding down the shift+ctrl, and hitting the appropriate direction arrow. You might think this is superfluous given that you can use the mouse to select cells. But that becomes cumbersome with large tables, and this method can be more efficient even with small tables.
    Similarly, it's often useful to navigate tables, particularly large ones, by moving from any cell within the table to the end or beginning of that row or column by holding down ctrl and hitting the appropriate arrow key. In Excel, this ctrl+arrow key method also allows you to skip blank cells, which is another very useful navigational feature.
    I tried numerous combos involving shift, ctrl, command, alt/option and the arrow keys. Haven't found a way to do any of this yet.
    Anyone?

    Hi Josh,
    Numbers is organized differently than Excel, and the navigation tools are different too. Many of us miss our particular favorites from spreadsheets past, but this is Numbers, not a clone. The biggest adjustment is to go from huge monolithic sheet-tables containing virtual sub-tables to a simple blank sheet with small tables, sometimes many per sheet. Navigating is no big deal in these small tables and neither is getting from one small table to another, using the Sheets pane.
    Selecting a particular Table is as easy as clicking on the table's name in the Sheets pane. Selecting a particular row, or column, or ranges of rows or columns is done by clicking on the table's row and column labels, left side and top side once a cell is selected in the table.
    Numbers is weak at handling large Tables and documents that are large overall. We know this and many of us still prefer it to the alternative when the tool fits the task.
    Jerry

  • How can I pick specific columns to export?

    Hello,
    I currently have a query region with a table that has an export button. When you click export, it displays all available columns from the table region.
    Now, I want to add a checkbox so that when I click this checkbox and hit the export button, the CVS file will display 4 extra columns that are not displayed in the table region but are available in the underlying VO.
    The reason I want to do this is because there is already 8+ columns displayed, adding any more would not look aesthetically pleasing.
    I've read the developer's guide and it says that columns that are rendered false will not display in the export.
    Can you guys suggest me ways I can achieve something like that?
    Thank you in advance.

    Unfortunately fromValues don't display in the export. Just tested it out.

  • How do i popuulate SelectOneMenu by calling a bean method

    I've been trying to populate a selectOneMenu JSF Component with no success. i need to invoke a native C function to get a list to populate comboboxes. there is only one function for me to call, which when given different parameters, will return different list. I'm trying to do the following because there are > 100 lists which i need to get from this C program and i didn't want to create a getXXX for every list that i need.
    <h:selectOneMenu id="CD1" value="#{myBean.cat1}">
    <f:selectItems value="${myOtherBean.getListOfSelect("aaa", "Label", "ID")}" />
    </h:selectOneMenu>
    // this use to be
    <select id="CD1">
    <%
    MyOtherBean myOtherBean = (MyOtherBean)session.getValue("myOtherBean");
    javax.faces.model.SelectItem[] tbl = myOtherBean.getListOfSelect("aaa", "Label", "ID" );
    if ( tbl != null )
              for (int i=0;i<tbl.length;i++)
              tbl.moveTo(i);
              out.print( "<option value=\""+tbl.getValue()+"\">" );
              out.print( tbl.getLabel() );
              out.println( "</option>" );
    %>
    </select>
    // and rendered correctly. but have a hard time to bind to a bean
    MyOtherBean.java
    public javax.faces.model.SelectItem[] getListOfSelect( String s1, String s2, String s3){
    //Call a jni to get data and create an array
    // this part work OK....
    return anArray;
    }

    I don't think you can pass parameters in this manner using EL.
    One solution is to add the parameters s1, s2, s3 as attributes to your backing bean "myotherBean"
    in essence it sould translate into JSP code something like this
    myOtherBean.setParameter1("aaa");
    myOtherBean.setParameter2("Label");
    myOtherBean.setParameter3("ID");and in your bean:
    String param1, param2, param3;
    // get/set methods for the params.
    public javax.faces.model.SelectItem[] getListOfSelect( ){
      return getListOfSelect(param1, param2, param3)
    // and your current getListOfSelect
    public javax.faces.model.SelectItem[] getListOfSelect( String s1, String s2, String s3){
    //Call a jni to get data and create an array
    // this part work OK....
    return anArray;
    } ie you initialize the parameters, and then the el expression: ${myOtherBean.listOfSelect} would return your desired list.
    Yes its a workaround/hack. But that might be what it takes.

  • [php+mysql] How to select a column using URL parameter?

    Hi all,
    I need to select a specific column from a mysql db.
    I have the column name in a URL parameter.
    How can I set a query so that it sounds like this:
    SELECT $_GET['id'] FROM mytable ORDER BY myorder ASC?
    I tried everything with dreamweaver but I cannot get anything
    similar
    to what I need.
    Is there a solution?
    TIA
    tony

    sweetman wrote:
    > How can I set a query so that it sounds like this:
    >
    > SELECT $_GET['id'] FROM mytable ORDER BY myorder ASC?
    You can't do it through the Recordset dialog box. The simple
    way to do
    it is to create this query in the Recordset dialog box:
    SELECT * FROM myTable
    ORDER BY myOrder ASC
    Then go into Code view and locate the following line:
    $query_recordsetName = "SELECT * FROM myTable ORDER BY
    myOrder ASC";
    Change it to this:
    if (isset($_GET['id'])) {
    $col = get_magic_quotes_gpc() ? stripslashes($_GET['id']) :
    $_GET['id'];
    $col = mysql_real_escape_string($_GET['id']);
    else {
    $col = '*';
    $query_recordsetName = "SELECT $col FROM myTable ORDER BY
    myOrder ASC";
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • The Organizer – How to select a project

    I am new to the Organizer.In the SlideShow Editor, I created two test projects and saved them.
    I went back to the Photo Browser and under Edit I clicked "Show Project Items in Photo Browser." However I cannot figure out how to select just one project. I do not see a list of my saved projects names anywhere. I looked under all menus and checked all the bottons. The projects are saved. I tried to save them again and a pop up window shows the mesage "a prject with the same name already exists..." How to select a specific project?
    Furthermore the option "Show Project Items in Photo Browser" no longer shows. How do I remove this option?
    Please help,
    CarlosWA

    I found the saved projects. They are in
    Photo Browser > Find > By Media Types > Projects
    I find it incredible that I could not find this information in Help and other Internet resources.
    CarlosWA

Maybe you are looking for

  • Display resolution problems with Snow Leopard

    I have a 'PC' monitor that when using Leopard worked with the correct resolution at the correct proportions (I'm after 1400 x 960) but since I've installed Snow Leopard that resolution is only available intermittently. I've just switched my Mac on th

  • Initial value in table control is displayed as space for currency field

    Hi Experts, I have a problem with table control in module pool. Below is the code for populating the table control:   loop at   GT_NEW_ABAN        into GT_NEW_ABAN_WA        with control TAB_FAC_ABAND        cursor TAB_FAC_ABAND-current_line.     mod

  • Library items

    can i use library items in the same way as i can cfinclude or an html insert i realise these are server side actions but i want to know if it is possible to have links in the library which can be updated on the page4s what are the possibilities and d

  • Using Lexmark X8350 with a mac.

    This morning, I recently discovered that this Lexmark Printer will not work with a mac. I need help. Any open-source programs I can use?

  • Ipad restore fails error 2003

    Was loading latest iPad update and it hung.  Itunes indicated the iPad needed to be restored.  Clicked on restore and received error 2003.