Store value in data model without showing it in table

Hi,
How can I store something in my table model without showing it in my table? I have an arraylist which contains a list of my own data objects. I have my own table model like
public class MyTableModel extends AbstractTableModel {
              public Object getValueAt(int row, int col) {
               TableDataObject tdo  = (TableDataObject) data.get(row);
               switch(col) {
                    case 0:
                         return tdo.getFoo();
                                 default:
                                         break;
}my "hidden" value is stored in the data list...but I have to get the hidden value from my table model, not from my arraylist.

Nothing to it, but to do it:
import java.awt.*;
import javax.swing.*;
import javax.swing.table.*;
public class ColumnModelExample {
    public static void main(String[] args) {
        Object[] columnNames = {"hidden", "column 1", "column 2"};
        Object[][] rowData = {
            {"hidden 0","row 0, col 1","row 0, col 2"},
            {"hidden 1","row 1, col 1","row 1, col 2"},
        TableModel model = new DefaultTableModel(rowData, columnNames);
        JTable table = new JTable(model);
        TableColumnModel columnModel = table.getColumnModel();
        columnModel.removeColumn(columnModel.getColumn(0));
        JFrame f = new JFrame("ColumnModelExample");
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.getContentPane().add(new JScrollPane(table));
        f.pack();
        f.setLocationRelativeTo(null);
        f.setVisible(true);
}One typical use of this is for displaying the records of a database table, where you don't want to
show the user a sequence column which would only confuse the user...

Similar Messages

  • Value from data grid not showing in workspace

    Hi everyone.
    I've entered value in data grid that i maid in Planning for one member. It looks like there is no velue for that member. What needs to be done to recognize new source?
    Member is set on Store and is used in some formulas in Dynamic Calc members.
    Thx.

    Maybe it is an implied share, is it is an only child, set the member to "never share", refresh and try again.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Right click in data modeler only shows "properties" choice

    Hi:
    I've been playing with the data modeler for an existing schema and I am unable to follow the directions in most of the tutorials because supposedly right-clicking on a table in the diagram or on within the data modeler browser is supposed to bring up a menu but when I right click I just see "properties". Is this a permission thing? I've made a relational diagram by dragging the objects from the connections view onto a diagram and I see them all.
    In particular, I was trying to create a subview in the browser but right-clicking on subviews[] gives me nothing. The most choices I get at any level are "Show" "Hide" "Properties".
    SQL Developer 2.1.1.64, Oracle 10gR2.
    Thanks.

    Hi Philip:
    I was trying to import the data dictionary for my current schemas. I thought I was actually able to do this about a year ago with an earlier version. Do I need the download for that? I can see the complete relational model by dragging and dropping the tables/views into the diagram. But most of the data modeler example start with "File->import->Data Dictionary and I never see those submenus.
    Thanks

  • How to store array of data into a single row of  table ,using any of Stmts

    HI Friends,
    Based on my requirements ,i have retrived a set of data from a XXX.jsp page using a request.getParameter() and stored into single dimenssional array . Now i am paassing that array to JAVA class to store a into some table .
    In JSP page users can add text boxes dynamically based on his intrest then those attributes will store in table .it means table attributes are not conatant , it table attributes may change at any time when user adds any textboxs or any fields on JSP page ....thats my module ..
    Now i wanted to store all array of data into Table in a single row .......thats is my requirements .
    How can we use prepareStatement and Statement to store array of results intoo table row ...on each iteration i wanted to store array of results into table atributes ..It means entire array of results should to into table row at time .....coule any one write sytax ,how we do this...
    could any one suggest me stps that i can impliment ......?....please reply ASAP

    Well ..you code can be works for constant number of attributes in table .oopss here my requirement is table attributes not fixed ,we cant put constant number of place holder(? ) in a statement ,because those are not fixed ,
    Let me explain here :
    i am doing in that way only. As i mentioned you Table attributes are not constant .It may very if users add any fields dynamically on JSP page .If users have option to add any text box on Jsp page ,then that attribute will store in table as a attribute .
    Now i amable fetching the all dyamic form data and stored in a Result Array below ...in this iteration all form result data are from jsp page as suggestion form ,it should stored in table in single row on corrsponding attribtes ......next time when users fills FROM ,then those data i am fetching and storing in a Result Array as below and need to store in corrsponding table attributes in a single row ....
    for(int i=0;i<result.length;i++)
                   System.out.println(result);
                   pst3=connection.prepareStatement("insert into *emprecord* values(?)");
                   if(!result[i].equals(""))
                        System.out.println(result[i]);
                             pst3.setString(1,result[i]);
                             pst3.executeUpdate();
    Thnks in advance ....let me know the the way we can store dynamic form data into dyanamic table ...

  • Oracle Data Modeler commit change seg physical table

    Hello,
    Sometimes when I record a data model, Oracle Data Modeler (SVN) given as outgoing a chage of segment of physical table , if you committees are to change, duplication of files in the physical model is produced. Later when you open the physical model gives errors that have duplicate files
    How you can correct this error? Why the segment change occurs?
    Thanks

    Hello,
    Versión 4.0.0.833.
    No pattern is occasionally when shooting in the data model. How you can correct this error? Why the segment change occurs?
    Thanks

  • Char NUMC(5) - need to store value at database level without leading Zeros.

    Hi All
    We have 0Mat_Item like infoobjects in SAP BI, which have data type Char NUMC(5). Here if u load value '1', it would show us '1' at front end (BI or reporting level) but at database level stores as u201800001u2019.
    My requirement is to store this value without leading zeros at database level. I wrote code in transformation u201Cshift u2026 left deleting leading u20180u2019 u201C & could load the data into New data table and at database level as I was getting result without leading zero. But once I activate the request, it gives SID generation error u201CValue '1' of characteristic 0ME_XCHRATE is not a number with 000009 spaces.u201D
    How to solve this issue so that I could store u20181u2019 value instead of u201800001u2019 value in the database & could able to activate in DSO.
    Thanks....

    Hi.....
    System may be storing the data in that way to maintain consistency.
    Alpha conversion is used to store data consistently. It does this by storing numeric values prefixed with 0s Eg. If you have defined a material as length 6 (of type Numc) then material number 1 is stored as 000001 but displayed as 1; this removes inconsistencies between 01 vs. 001.
    U can add the conversion routine for this Infoobject in either below way...
    In the BW side...in the Datasource Level
    In the datasource >> Go to fields tab >> there search the R/3 field which is mapped to that Infoobject in the Transformation >> Then in the Conv.Routine column select the Alpha Conversion Routine and In the Format column select External....
    In the Transformation
    Write a field level routine for that particular field abd call the Alpha conversion routine there...
    In the R/3 side
    In the Customer exit ....Go to SE37 >> EXIT_SAPLRSAP_001 >> Double click on ZXRSAU01 >> search the datasource......write the code there....
    Hope below link helps you.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/7108a690-0201-0010-4cbc-9bca94f9ad9c?quicklink=index&overridelayout=true
    Regards,
    Vinay.
    Edited by: Vinay Joshi on Mar 10, 2011 4:54 AM

  • How to show the subtotal value of a field without showing the rows in ALV?

    Dear All,
    In my ALV I am showing the sub total value of a calculated field. But the requirement is, only the category and sub total value will be shown in the ALV not the all rows, i,e
    CATEGORY     VALUE
      Z01       186,000 (the subtotal value)
    Here, the rows whose values are calculated to 186,000 will not appear. Plz give some idea.
    With regards,
    Rosaline.

    Hi
    Using the fieldcatalog, you can achieve this.
             no_out(1)      type c,        " (O)blig.(X)no out
    use this in fieldcatelog. u can achieve this.
    All the best
    Edited by: Sudeesh Ravindran on Mar 23, 2011 9:22 AM

  • Default value of date picker not showing in sql query

    Hi,
    I have a tabular form page with a query similar to the following:
    select emp_name, salary from emp_table where trunc(hire_date)=trunc(to_date(:P42_START_DATE))
    where P42_START_DATE is the name of a date picker item.
    I set the source type of the date picker to be "Only when current value in session state is null" and the value to be "select trunc(next_day(sysdate,'MON')-7) from dual;" - basically the monday of the current week. I set the sequence of the date picker to be 5, and the sequence of the region to be 10. Now, when I open this page, no data gets pulled. I checked the page source, and the value of the date picker input is being set to "17-NOV-2008", but it somehow isn't reflected in the sql query.
    Data does get retrieved if I manually set the date in the date picker, but I'd like it to default to the monday of the current week. What am I doing wrong?
    Thanks

    nope, still same problem.
    I used javascript alerts to help debug, and here might be some useful information.
    The computation to set the value of :P42_START_DATE is set to run "before header", but when I put this following javascript in the header:
    <script language="javascript">
    var c = $v('P42_START_DATE');
    alert(c);
    </script>
    the alert box is blank (ie :P42_START_DATE is empty). Putting the same exact script in the footer gives 24-Nov-2008 in the alert box. Now, the SQL query is run sometime after the first alert and before the second alert, I believe. Why would the value of :P42_START_DATE not be getting set at the correct time?
    P42_START_DATE is a date picker item that belongs to the region SCHEDULE (which is where the sql query is). I set the sequence of the region to 10, and the sequence of the date picker and computation to be 5 and 6. Even so, does this mean that the sql query is executing before the call to the computation, because the region needs to be created before any items can be created that belong to the region?

  • BUG - Printing data models just shows empty boxes

    Hi,
    I am running JDeveloper 10.1.3.2.0.4066.
    When i try and print, the entity boxes are empty and so cannot see the fields/constraints.
    This is quite critical!!!
    Cheers
    R

    Hi,
    "When i try and print, the entity boxes are empty and so cannot see the fields/constraints."
    Entities exist in TopLink, JPA, Business Components and, in a wider sense in POJO. So we need more information.
    Have a look at http://blogs.oracle.com/shay/2007/03/02 of how you can improve questions
    Also, note that though JDeveloper is a free product, youcan have an Oracle support contract for it : metalink.oracle.com
    For the rest, we try to be as helpful as possible
    Frank

  • BI Publisher throwing error when creating data model from Oracle BI Answers

    I'm having issues creating BI Publisher Datamodel using BI EE as a source. When i select the answer and put the inforamtion needed and hit OK ....it's start doing soehting and then it get there ....
    In the logs:
    It is weird that the Logs is having a message saying that path was not found "/users/mpoler/Data Model without Title.xmd"/_datamodel.xmd
    Any clue on what is going on?
    Thanks!
    Matias

    Can you try using a different account to run this report, if possible use someone from a different Application role.
    The last Time I saw something similar was when the integration between BIP and Analysis was done incorrectly and a few roles were missed.
    Letus know what you find out..

  • Oracle Data modeler 3.1.0.700 freeze on MAC OSX 10.7.3

    Hello,
    I was used Data modeler 3.0.x on the same machine with no problems (use SVN+3 active users , atc...)
    When I installed version 3.1.0.700 and model migration I have problem with stability of program
    With any action, java freeze after a few minutes of using application (no response, 100% core CPU, memory allocation stable).
    Freeze was initiated with actions such as import model, commit into repository, working with application (edit table metadata and other action).
    Do you anybody have same problem ? Any solution ?
    Applikaction use standard lion JDK (installation no con taints packaged JDK).
    Thank you

    Hello,
    I don't have such behavior.
    Did you try to run fresh installation of Data Modeler without migrating from previous version?
    Regards,
    Ivan Zahariev

  • SQL Data Modeler - Startup Problem

    Hi
    I've created a Relational Model with Oracle SQL Developer Data Modeler, with a few tables, and everything was working ok.
    Yesterday I made some changes to the model, added columns and another table, saved the model and closed the Data Modeler.
    Today - when I tried to open the Model, I only get an error "Some objects are not loaded correctly. See the log file for details"
    The log at the bottom of the Data Modeler only shows: "Open Design: "nameof model"" and no details of what went wrong. No other details is provided, and as far as i can see - and now I can't view the model at all.
    Any ideas how to find the problem/ fix it in order to get the created Model back?
    Thanks
    Coenraad

    Hi Philip
    Thanks, I found the log file there. I have cleared the log file, and when I tried to open the model again, it created the below information, any ideas what could be wrong?
    2009-09-10 21:05:33,531 [main] INFO  ApplicationView - Oracle SQL Developer Data Modeler Version: 2.0.0 Build: 570
    2009-09-10 21:05:39,828 [main] WARN  AbstractXMLReader - There is no file with default domains (path: domains name: defaultdomains)
    2009-09-10 21:05:55,296 [Thread-3] ERROR AbstractXMLReader - problem parsing document for:a-erd2
    AbstractXMLReader.parse:
    oracle.xml.parser.v2.XMLParseException: Expected name instead of >.
         at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320)
         at oracle.xml.parser.v2.XMLReader.scanNameChars(XMLReader.java:1095)
         at oracle.xml.parser.v2.XMLReader.scanQName(XMLReader.java:1835)
         at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1264)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:324)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:291)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:200)
         at oracle.xml.jaxp.JXDocumentBuilder.parse(JXDocumentBuilder.java:155)
         at oracle.dbtools.crest.model.persistence.xml.AbstractXMLReader.parse(Unknown Source)
         at oracle.dbtools.crest.model.persistence.xml.AbstractXMLReader.recreateObject(Unknown Source)
         at oracle.dbtools.crest.model.persistence.xml.AbstractXMLReader.handleRecreateObject(Unknown Source)
         at oracle.dbtools.crest.model.persistence.XMLPersistenceManager.read(Unknown Source)
         at oracle.dbtools.crest.model.design.Design.openDesign(Unknown Source)
         at oracle.dbtools.crest.swingui.ControllerApplication$Recent$1.run(Unknown Source)
    2009-09-10 21:05:55,296 [Thread-3] ERROR AbstractXMLReader - Error recreating object from XML: a-erd2
    2009-09-10 21:05:55,703 [Thread-3] ERROR FileManager - getDataInputStream: Can not read data
    java.io.FileNotFoundException: C:\My_Home\Datamodeler\a-erd2\pm\B90BA2ED-3D5F-6690-8413-DE9492D76B23.xml (The system cannot find the file specified)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(FileInputStream.java:106)
         at oracle.dbtools.crest.model.persistence.FileManager.getDataInputStream(Unknown Source)
         at oracle.dbtools.crest.model.persistence.FileManager.getDataInputStreamWithoutExtension(Unknown Source)
         at oracle.dbtools.crest.model.persistence.XMLPersistenceManager.getInputStreamFor(Unknown Source)
         at oracle.dbtools.crest.model.persistence.xml.AbstractXMLReader.getInputStreamFor(Unknown Source)
         at oracle.dbtools.crest.model.persistence.xml.AbstractXMLReader.recreateDesign(Unknown Source)
         at oracle.dbtools.crest.model.design.process.ProcessModel.load(Unknown Source)
         at oracle.dbtools.crest.model.design.Design.openDesign(Unknown Source)
         at oracle.dbtools.crest.swingui.ControllerApplication$Recent$1.run(Unknown Source)
    2009-09-10 21:05:55,703 [Thread-3] ERROR AbstractXMLReader - Data inputstream is null (path: a-erd2/pm name: B90BA2ED-3D5F-6690-8413-DE9492D76B23)

  • Data Model on OTL-tables

    Hi,
    I need to know how the tables in OTL around table hxc_time_building_blocks is connected togehter. Does anybody have some information about this or can point me in the correct direction?
    I have search Metalink, eTRM, OTN without any luck. I have the User Guide and a logical data model without table names.
    Thanks...Daniel

    Daniel,
    Were you able to get what you wanted for timecards? Here is a query that I came up with. You may want to leverage it for your requirements.
    select ppf.person_id, ppf.full_name, ppf.employee_number, fl.meaning state_working,a.segment1, a.task_number,
    initcap(to_char(z.start_time,'DAY')) Weekday, z.start_time, z.tot_hrs
    from (
    select tbb_day.start_time,tbb_det.resource_id,trunc(hxc.stop_time) stop_time,
    tbb_det.resource_type, tbb_det.measure tot_hrs, tbb_det.unit_of_measure uom
    FROM hxc_time_building_blocks tbb_day,
    hxc_time_building_blocks tbb_det,
    hxc_timecard_summary hxc
    WHERE tbb_det.scope = 'DETAIL'
    and tbb_day.scope = 'DAY'
    and tbb_det.date_to = hr_general.end_of_time
    and tbb_det.parent_building_block_ovn = tbb_day.object_version_number
    and tbb_det.parent_building_block_id = tbb_day.time_building_block_id
    and tbb_day.parent_building_block_ovn = hxc.timecard_ovn
    and tbb_day.parent_building_block_id = hxc.timecard_id
    and tbb_day.start_time >= :p_date_from
    and tbb_day.stop_time <= trunc(to_date(:p_date_to) + 1) - (1/24/60/60)
    and tbb_det.resource_id = NVL(:p_person_id,tbb_det.resource_id)) z
    ,(select distinct pea.INCURRED_BY_PERSON_ID,ppf.full_name,ppa.project_id,ppa.segment1,pt.task_number,pei.expenditure_item_date,pei.quantity,
    pea.EXPENDITURE_ENDING_DATE, pea.INITIAL_SUBMISSION_DATE
    from pa_expenditures_all pea
    , pa_expenditure_items_all pei
    , pa_projects_all ppa
    , pa_tasks pt
    , per_all_people_f ppf
    Where pea.expenditure_id = pei.expenditure_id
    and pei.PROJECT_ID = ppa.project_id
    and pei.TASK_ID = pt.task_id
    and pea.INCURRED_BY_PERSON_ID = ppf.PERSON_ID
    and ppf.person_id = :p_person_id) a
    ,per_people_f ppf
    ,per_addresses addr
    ,fnd_lookup_values fl
    where ppf.person_id = z.resource_id
    and ppf.person_id = addr.person_id
    and ppf.person_id = a.incurred_by_person_id
    and z.resource_id = a.incurred_by_person_id
    and a.EXPENDITURE_ENDING_DATE = z.stop_time
    and a.expenditure_item_date = z.start_time
    and a.quantity = z.tot_hrs
    and addr.primary_flag = 'Y'
    and fl.lookup_code = addr.region_2
    and fl.lookup_type = 'US_STATE'
    and fl.enabled_flag = 'Y'
    group by ppf.person_id, ppf.full_name, ppf.employee_number, addr.region_2, a.segment1, a.task_number,
    z.start_time, fl.meaning, tot_hrs
    order by z.start_time
    Thanks
    uds

  • Authorizations for WEBI report based on BPC data model

    Hi All,
    We are strugelling with setting up authorisations for the reporting on BPC data model.
    We created Bex query on top of Multiprovider that consists of BPC cube. The Bex query is source for WEBI output. The authorisations has been set up on BPC data model (cube) in BPC application but they are not passed nor to Bex query nor to Webi. Example: The query is build on top of OPEX BPC data model, this data model is restricted based on Oranizational Unit. My test user is allowed to see only Org Unit = 'Australia' in the OPEX BPC data model, however when I'm running the report I can see absolutely everything.
    We are not connecting/using any BI cubes itself for this reporting. We are intrested only in the WEBI report based on BPC data models.
    We were trying to use BPC data model (without any extra settings) as the source for BEx report, we were also trying to use virtual BPC data model as the source for Bex transient query - but non of these have helped.
    Can you please advise how the authorisations should be set up for WEBI reporting on BPC data models?
    Kasia

    Anybody can help with this issue please?

  • How to integrate the Data modeler in Sql developer

    Hi
    How can we integrate the data modeler into sql developer and use the data modeler?
    Thanks

    Integrating different oracle products (SQL Developer [Data Modeller], JDeveloper, ...) on platforms like Eclipse, Netbeans, JDeveloper Framework is a really missing feature.
    JDeveloper has a good approach for integrated Java and database development, but has not immediate benefits from from other development streams like SQL Developer.
    On daily work we must use more than three different tools for most common task
    - editing stored functions, procedures and packages with SQL-Developer (code formatter in Jdeveloper produces sometimes UNREADABLE code ( So we are using TOAD instead ). Why can't Jdeveloper use SQL-Developer formatting tools in bug fixed verrions from 1.5.5?
    - database modelling with SQL Developer Data Modeler without PLSQL package support ???
    - database development with JDeveloper, ADF and offline database model without capabilities for logical databse models
    Please put them all together!

Maybe you are looking for

  • Item cat -billing relevance

    HI, IN VOV7 what is the diffrence between Billing Relevance B/C/F B     Relevant for order-related billing - status acc.to order qty C     Relevant for ord.-related billing - status acc.to target qty F     Order-related billing doc. - status accordin

  • Crystal Reports 8.0 Distinct Record Sort

    I have a report that shows with the following fields:  Firm, Appraiser, Location, Order #, and Order Date.  How can I get it to return the most recent order date for each Firm sorted by Order Date?

  • Can I use Mountain Lion with my 2008 Mac Pro

    I have a Mac Pro with the following system: Model Family: Mac Pro Processor: 2.66GHz Xeon (Dual-core 5150) Manufacturer: Intel # of CPUs: 2 Codename: Woodcrest Base Memory: 1GB PC2-5300 DIMM Max Memory: 32GB # Memory Slots: 8 Brand: Apple Wireless: O

  • Word changed when font is changed?

    Has anyone ever had this happen? I pasted copy into inDesign (CS5) and then changed the font. Look what happens to the word certified. The word is correct in Story Editor but not on the pasteboard. Autocorrect is off. Very weird. http://goo.gl/XB6LNV

  • How to set precision of float values?

    how can I set the number of decimal points of some floating point number? e-g I have some value = 1.200000, I don't want the extra zeros (or digits) to be displayed on screen, I want it to be displayed as 1.20. Similarly 1.145674232 to be displayed a