Applying TableSorter to already created table and model.

I am using the popular TableSorter class (talked about from this site: http://java.sun.com/docs/books/tutorial/uiswing/components/table.html) and I want to know if anyone knows of a way to apply the table sorter after the table has already been created and a table model given to the table.
Long story as to why I am doing it this way.
I tried doing:
TableSorter sorter = new TableSorter(myTable.getModel());
sorter.setTableHeader(categoriesTable.getTableHeader());
myTable.setModel(sorter);This just doesn't work right. It doesn't have any sorting to it.
Does anyone know of a way to apply the TableSorter to an already made table that already has a table model associated?

It doesn't look correct that you are referencing two different table:
a) myTable
b) categoriesTable.
Also the order should probably be:
a) setModel(...);
b) sorter.setTableHeader(...);
based on the normal code from the tutorial.

Similar Messages

  • Is it planned to add feature for creating tables and lists in Adobe Edge Reflow?

    First of all, thank you very much guys for all your work!
    In my opinion Adobe Edge Reflow is missing quite important features, like creating tables and lists. For me it's a reason why I can't switch to Reflow. Any plans for implementing these? Is there any place where I can see the list of planned feature implementation? Didn't find it.

    Missing tables is a big one for me too, especially when doing data-grids. My last prototype was using multiple responsive data-grids where I used the simpler essential/optional hide column approach, instead of stacking or scrolling the data. I had used Reflow in the past for basic content prototypes... but had to do this one by hand... took longer. Using divs for this did not collapse properly in all the browsers, plus the back-end team use widgets that only generate tables. Here is the example:
    http://www.topwebworks.com/assets/test/prototype/riocompass_prototype_v1

  • How can I create a host name site collection when I have a 443 web application already created for App model?

    Hi all,
    I have a 2013 farm set up with the App model
    1 web application for path based site collection using host name
    1 web application with SSL (no host name)
    1 web application for mysite
    My business request is that  I need to migrate SSL enabled 2007 content to this farm and use host name site collections.  I tried to create one more web application for this without any luck (the 443 IIS folder is already used by another web application). 
    I thought I bind the previous 443 web application with another IP address should be fine.  Seems like the IIS site is taken (https://server name:443) so it will not let me create one more.  How can I solve this problem so I can create the web application
    to host those host name site collections?  Any suggestion is greatly appreciated.
    Thanks in advance.
    Sally

    Hi Trevor,
    Thanks again for your quick reply.  I try the option 2 right after your post.  I use my front end server name for public URL (https://WFEName:443) and it fails again.  The error message is:
    The directory C:\inetpub\wwwroot\wss\VirtualDirectories\443 is already being used by another IIS Web Site.  Choose a different root directory for your new Web application.
    After reading more, I saw mix Hosted Name Site collection and Path-based site collection aren't recommended.  Unfortunately I already have Path-based site collection created with App model web application
    (the web application without host name) in my farm.  In my Option 2, that web application without host name is used for App routing.  This takes the root folder 443 which will not allow any other web application to use the same name again. 
    Does that mean we can't create Host Named Site collection in the same farm?  Is there any configuration I need to check?
    Thanks again.
    Sally

  • How to create table and digital signature ?

    Hello,
    I would like to ask two questions regarding SAP interactive forms by adobe.
    1st question:
    How to create table in interactive form?
    Table that i can add rows and column and will show it in the form.
    Example the rows and columns that i want:
    <u><b>ID:</b></u>                <b><u>Name:  </u>  </b>               <u><b>DOB:</b></u>
    1                  Jack                      01/02/80
    2                  Ivy                         10/12/82
    2nd question:
    How to create digital signature ?
    I'm creating a adobe forms which need employee to sign on the form. I use signature field at my form. However, i don't know how to create a new signature and insert in the signature field.
    Can any one provide the answer with step by step guide?
    Thanks a lot

    Hi Pradeepa,
    you said you have your digital signature in
    BMP format? That means Bitmap and would mean you are actually talking about a picture! THIS IS NOT A DIGITAL SIGNATURE!
    A digital signature is a cryptographic key (aka public key cryptography) that is used to digitally sign a document, or at least a hash value derived from the document. Digitally signing means, applying the key in a well defined way (this is the algorithm used) to the document or hash value. You do this with your private key and the receiver of the document can then use your public key (which you can distribute in any way you want, even unsecure) to unencrypt the hash value. If this succeeds the receiver knows that the document was signed by you.
    This is because both keys are mathematically related in such a way, that what one key encrypted can only be decrypted by the corresponding other key and by no other key. You even can´t decrypt a document with the same key it was encrypted with, this is the difference to symmetric encryption - please have a look at help.sap.com and search for digital signatures.
    The named formats (afs, pfx and p12) are ways of coding the key, together with information about your person, such as email address and information about validity of the key into a
    certificate. This type of certificate is then called a x.509 certificate and is the same you might have seen when connecting to a secure webserver such as the one of your bank website. 
    Signing a form with such a certificate provides for mathematically and therefore business related proove of a users identity.
    In case you are really using a bitmap, this cannot work and would not serve you any good.
    Ask yourself this question: I want to make sure that the form was signed by a specific person. How can I make sure that the signing can only be done by the person pretending to have done so?
    A bitmap contains a picture, probably of the persons handwritten signature. How can I make sure that this picture was NOT recreated in MS Paint or Photoshop by someone else?
    The answer is:
    you can't! Therefore this way of prooving identity is useless. 
    You need to provide your users with digital signatures, put these in the certificate cache of your IE.  If a user then clicks on the signing field, the private key is used to digitally sign the form - create a hash value of the form and encrypt it with the private key. After the form is send back to the server or you, you use the corresponding public key to decrypt the hash value and, as said above, if this succeeds, identity of the signer is proven.
    THIS IS AN OVERSIMPLIFICATION! You might want to take a look at Adobe Reader Credentials.
    Regards,
       Christian

  • Creating Logic and modeling for SAP BW datasource in SAP HANA views and SLT

    Hi to all,
    I have small question.
    We have BW system and SAP ECC as source system and to get data from SAP ECC source system we are using SAP ECC Standard data source.
    Now we required to, create modeling in SAP HANA by use of HANA View and get data from SAP ECC source table via SLT.
    So we can replicate same modeling,as we done in SAP BW system.
    But  my question is that, as SAP ECC standard data source hit multiple table and do run-time calculation, before sending to SAP BI.
    How we can derives such calculation and logic, in our HANA studio, because as we know in SLT data transformation can be done in limited way also
    in view we can not drive such logic via SQL script ?.
    Is there any way we can do such modeling and logic in SAP HANA ?
    or
    is there any standard document for this type of case, which we can use ?
    Note: We don't want to use SAP DS or DXC for data loading to HANA, as  we want it in more real time.
    Regards
    Pavneet Rana

    Thanks for reply,
    As SLT is based on ABAP, so we can write complex logic in it.
    But if we talk about SAP ECC standard data source, they have complex logic, based on multiple table.
    So we need to write code from scratch in SLT to derive same result. but it will be huge time consuming , and required good ABAP skills, also it will lead to bug in code.
    Also it will reduce the real time performance of SLT, due to complex logic.
    Second option is procedure via SQL script, which is again huge effort in term if logic and can lead to error/bug in logic.
    Does we have any other way or architecture to do this is very simple way, with high performance and less error issue.
    Regards
    Pavneet Rana

  • How to reference already created tables?

    I just started with Oracle and I created 5 tables. On two of the tables i created the references but I never clicked ADD, so they were not added. How can I link the tables after they are already created?

    You want to add primary and foreign key. There is alot of articles with how to do this.
    The basic solution is:
    ALTER TABLE table_name
    add CONSTRAINT constraint_name
    FOREIGN KEY (column1, column2, ... column_n)
    REFERENCES parent_table (column1, column2, ... column_n);

  • How to create tables and views and procedures in other users as one

    HI to all,
    I am having a user named vijay and i am trying to create the tables in user srini as user vijay
    in user vijay i'm having tables
    1. company
    2. department
    i wrote one procedure
    create or replace procedure sp_createobjects{short_name in varchar2}
    {my openbracket key is not working so that i put open braces here}
    as
    cursor table_name is select object_name from dba_tables where object_type = 'TABLE';
    var_table_name varchar2{1000};
    begin
    open table_name;
    loop
    fetch table_name into var_table_name;
    execute immediate 'create table ' || short_name || '.' || var_table_name || ' as select * from '||var_table_name;
    end loop;
    end;
    the procedure is created sucessfully. but when i am trying to execute the procedure it is throwing the error as insufficient privileges.
    my 2nd question is how to create the procedures into the other user?
    Thanks in advance

    First of all, your query "from dba_tables where object_type = 'TABLE'" returns all tables, not just the tables of the user vijay.
    So there are two possibilities, you may be getting the error because you cannot select from another user's table or you may be getting the error because you cannot create a table under the user srini. To create tables in another schema you need the "create any table" privilege.

  • Oracle 11g R2, CREATE TABLE and QUOTAS

    Hello everyone,
    I need some insight about a strange behavior I found out in Oracle 11gR2. Don't know if I do miss something or if I just found out a security issue with Oracle.
    Oracle Version : 11.2.0.1.0
    The problem is related with the CREATE TABLE privilege and the QUOTA on specific tablespace.
    Please, try this on your systems (if you have some spare time and care to confirm the "bug").
    Create a user, grant only two privileges, CREATE SESSION and CREATE TABLE.
    Grant NO quota on any tablespace.
    Try to create table on any tablespace (except SYSTEM) and tell everyone if it worked or not.
    The oracle documentation states the following :
    To create a relational table in your own schema, you must have the CREATE TABLE system privilege. To create a table in another user's schema, you must have the CREATE ANY TABLE system privilege. Also, the owner of the schema to contain the table must have either space quota on the tablespace to contain the table or the UNLIMITED TABLESPACE system privilege.
    [http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/statements_7002.htm#SQLRF01402]
    The fact is, so far, on two different instances of Oracle 11gR2, my users are not limited in creating tables only where they have quotas but wherever they want except SYSTEM.
    The correct behavior would be to deny the table creation on tablespace where there is no quota but it does not.
    My instance of Oracle 10g are behaving correctly and thus the table creation is denied on tablespace with no quota.
    P.S1 Sorry if this a well known "bug/problem/issue". I've been ridicule on a well known forum for asking the same question. I am in no need to be "spoon filled" as stated on that famous website! I have read the documentation! I have googled a lot!
    P.S2 Even though the table creation work on tablespace with no quota, you still can't insert data in it. So, big picture, the user can't filled the tablespace with irrelevant data but he can creates thousand of tables...!
    Do I miss something?
    Is there any "default" option I have to flag to prevent table creation where it should not?
    ?(?)

    Hi. I'm planning on taking my OCP exam. If the exam ask a question realted to this topic, what is the correct answer?
    create user barry identified barry
    grant create session, create table to barry
    1) barry cannot create a table since he has no quota
    2) barry can create a table
    According to the oracle document, the barry needs quota on the tablespace to create a table. however, according to the link you provided, in 11gR2, barry does not need quota to create a table. He only needs a quota to insert data.

  • How to create table and insert images and audio files ...

    hello to all , i am doing my b.e cse .
    at current v r studing DB and pl/sql codes ....
    i just need to know simple way of code to insert images and audio files in a table .
    i tried some of these ,
    CREATE TABLE myTable(Document varbinary(max))
    INSERT INTO myTable(Document)
    SELECT * FROM
    OPENROWSET(BULK N'C:\Image1.jpg', SINGLE_BLOB)
    but not workiing
    it shows some errors.
    i use oracle 10g. thank u :) and also i tried using blob and bfile datatypes , table created but cannot insert values !
    ROBOK

    hello to all , i am doing my b.e cse .
    at current v r studing DB and pl/sql codes ....
    i just need to know simple way of code to insert images and audio files in a table .
    i tried some of these ,
    CREATE TABLE myTable(Document varbinary(max))
    INSERT INTO myTable(Document)
    SELECT * FROM
    OPENROWSET(BULK N'C:\Image1.jpg', SINGLE_BLOB)
    but not workiing
    it shows some errors.
    i use oracle 10g. thank u :) and also i tried using blob and bfile datatypes , table created but cannot insert values !
    ROBOK

  • How to create Tables and Fields in Java DI API?

    I have the problem to get the handle for IUserTabledMD.
    userTablesMD = (IUserTablesMD) getCompany().getBusinessObject(SBOCOMConstants.BoObjectTypes_oUserTables);
    does not work as in VB (getCompany() gets the ICompany handle).
    and
    userTablesMD = SBOCOMUtil.getUserTablesMD(getCompany(),"");
    needs an additional String!?!?!?!?
    How to get the handle to create new user defined tables?
    I think Fields needs the same methods.
    Regards, Frank.

    could you send me code for creating table using java

  • Diff n creating table and complexsection- table

    hai
    > whats the difference in creating table directly in smartforms or creating thro complexsection and table.
    >what is the use of command
    >I need to display smartform o/p in table format  with borders
    could any one pls suggest me with examples

    Hi
    Refer these links for complex section:
    Re: complex section of main window :  smart forms
    complex section of smart forms
    Re: complex selection in smartforms
    http://help.sap.com/saphelp_nw04/helpdata/EN/4b/83fb4edf8f11d3969700a0c930660b/content.htm
    Regards,
    Sravanthi

  • [SOLVED] Create table and storage clause

    Hi, I create a table whit lob ad so, I set some LOB storage clause:
    CREATE TABLE W2_T_MESSAGE_NWSL (
    KEY NUMBER,
    T_MESSAGE CLOB DEFAULT EMPTY_CLOB(),
    T_TEXTMESSAGE CLOB DEFAULT EMPTY_CLOB(),
    T_FOOTER CLOB DEFAULT EMPTY_CLOB())
    LOB (T_MESSAGE)
    STORE AS (TABLESPACE LOBDATA CACHE READS RETENTION ENABLE STORAGE IN ROW),
    LOB (T_TEXTMESSAGE)
    STORE AS (TABLESPACE LOBDATA CACHE READS RETENTION ENABLE STORAGE IN ROW),
    LOB (T_FOOTER)
    STORE AS (TABLESPACE LOBDATA CACHE READS RETENTION ENABLE STORAGE IN ROW);I need to export this table and do an import on a different instance.
    I know for sure that the tablespace LOBDATA exists on both database but I can't say the same for the user default tablespace.
    The problem is that when I import this table, the statement fail because the default tablespace of the user hasn't the same name of the tablespace where the table was exported.
    IMP-00003: ORACLE error 959 encountered
    ORA-00959: tablespace 'USERWNSTARTUP' does not exist
    This because the create table generated by the export has this storage clause:
    PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(
    INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE USERWNSTARTUP LOGGING NOCOMPRESS LOB (B_LOGO) STORE AS (TABLESPACE "LOBDATA" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10 CACHE READS STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1)
    On other tables, where I havent defined any storage clause all works fine.
    Is there a way to resolve this problem?
    Thanks
    Regards

    if someone is interested I've found this on the official import oracle documentation:
    if the tablespace no longer exists or the user does not have the necessary quota, the system uses the default tablespace for that user as long as the table is unpartitioned, contains no LOB or VARRAY columns, is not a type table, and is not an index-only table with an overflow segment.In my case I've a LOB column, so tablespace information would be exporterd. I've done a trace of the import and I can confirm that on table without lob, varray etc.. the create table statement hasn't the tablespace specification.

  • Dynamically creating table and inserting rows and columns using JSP

    Hi,
    I'm using mysql and JSP to create web interface for my forms/tables. I wanna create the table dynamically depending on the data in the table and for each particualar record. and these values shud be loaded on the form after loading from the databaes as soon as the form loads.
    also i want to have a button which shud add new rows dynamically. and same one for columns.
    how do i calculate the values across the rows on the forms
    I'm new to JSP. Please point me in the right direction...any tutorials or code will be helpful.
    Any help is appreciated.
    Thanks
    Ayesha

    u write the code in sequence:
    1 write jdbs to select count(* )from table
    2 put in array e.g. String doc_no=new String[count];
    3 write jdbs to select * from table with condition
    //for no. of records just write
    for(int j=0;j<(count);j++){
    <% while(rs4.next()){
         doc_no=rs4.getString(2);
                        date1[i]=rs4.getString(3);
         doc_type[i]=rs4.getString(4);
         location[i]=rs4.getString(5);
         cheque[i]=rs4.getString(6);
         rate[i]=rs4.getInt(7);
         deb_qty[i]=rs4.getInt(8);
         cre_qty[i]=rs4.getInt(9);
         deb_amt[i]=rs4.getInt(10);
         cre_amt[i]=rs4.getInt(11);
         i++;
         //rs4.close();
                   for(int j=0;j<(count);j++){
                   System.out.println("Data count= "+j);
                   %>
    <tr>
    <td width="15%"><font size="1"><%=doc_no[j] %></font></td>
    <td width="10%"><font size="1"><%=date1[j] %></font></td>
    <td width="12%"><font size="1"><%=doc_type[j] %></font></td>
    <td width="9%"><font size="1"><%=location[j] %></font></td>
    <td width="9%">
    <div align="left"><font size="1"><%=cheque[j] %></font></div>
    </td>
    <td width="8%">
    <div align="right"><font size="1"><%=deb_qty[j] %></font></div>
    </td>
    <td width="8%">
    <div align="right"><font size="1"><%=cre_qty[j] %></font></div>
    </td>
    <td width="9%">
    <div align="right"><font size="1"><%=deb_amt[j] %></font></div>
    </td>
    <td width="10%">
    <div align="right"><font size="1"><%=cre_amt[j] %></font></div>
    </td>
    </tr>
    write if there is any specific problem
    bye,
    Samir

  • Creating Diagram and model file programmatically

    Hi,
    Am trying to create the Diagram and model file programmatically.
    I used the code similar to what is there in XXDiagramEditorUtil.createDiagram().
    In the normal case (when i have an empty domain ie nothing is set into the domain object), the diagram and the domain file gets created and works fine.
    Assume my model is of type XX, and that has a list of YY.
    i create YY and set it inside XX.
    Now when i create the domain file, the <YY> is set correctly inside <XX>.
    But in the diagram file, i dont see the <children/> tags corresponding to the YY.
    How would the appropriate <children/> tags be generated ?
    i tried diagram.createChild(yy.eClass()), but the diagram file does not get generated.
    Pls help.
    AbstractTransactionalCommand command = new AbstractTransactionalCommand(editingDomain,
    Messages.XXXDiagramEditorUtil_CreateDiagramCommandLabel,
    Collections.EMPTY_LIST) {
    protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
    XXX model = createInitialModel();
    YYY yyy = XXXFactory.eINSTANCE.createYYY();
    yyy.setAttribute1("2");
    yyy.setAttribute2("name");
    model.getYYYs().add(yyy);
    attachModelToResource(model, modelResource);
    Diagram diagram = ViewService.createDiagram(model, XXXEditPart.MODEL_ID,XXXEditorPlugin.DIAGRAM_PREFERENCES_HINT);
    if (diagram != null) {
    diagramResource.getContents().add(diagram);
    diagram.setName(diagramName);
    diagram.setElement(model);
    //diagram.createChild(yyy.eClass());
    //diagram.insertChild(arg0);
    try {
    modelResource.save(.getSaveOptions());
    diagramResource.save(getSaveOptions());
    } catch (IOException e) {
    return CommandResult.newOKCommandResult();

    Hi ganesh,
    you have two options to get it working.
    The first one is using a CanonicalEditPolicy, which creates all Nodes and Edges for you based on your semantic model. This is easy to implement, but it has some drawbacks. Your editor will get dirty after opening it, because your Notation Model is changes and no layout information is available.
    The better way is to create Nodes and Edges for each semantic element you created.
    For your code snippet it might look like this:
    XXX model = createInitialModel();
    YYY yyy = XXXFactory.eINSTANCE.createYYY();
    yyy.setAttribute1("2");
    yyy.setAttribute2("name");
    model.getYYYs().add(yyy);
    attachModelToResource(model, modelResource);
    Diagram diagram = ViewService.createDiagram(model, XXXEditPart.MODEL_ID,XXXEditorPlugin.DIAGRAM_PREFERENCES_HINT);
    Node yyyView = ViewService.createNode(diagram, yyy, SemanticHints.YYY,
    ,XXXEditorPlugin.DIAGRAM_PREFERENCES_HINT);
    //Set some layout information assuming you use a XYLayout
    Bounds bounds = NotationFactory.eINSTANCE.createBounds();
    bounds.setX(70);
    bounds.setY(20);
    yyyView.setLayoutConstraint(bounds);
    Regards,
    Andreas

  • Create Tables and UDO using Addon

    Hi,
    I created addon using simple installer. Before installing that add on i have manually create UDO and tables. is there any way i can modify my Addon which will create UDO and tables when i install addon in server.
    Developed my Add on using C#. for package using  B1DE Simple installer.
    Can some send me sample code for this at [email protected] or reply to this post your suggestions.
    Appreciate your help

    > UDO's are not accessable via code. 
    Hi Edward,
    but I created UDO via code and it works correctly.
    P Guddimath, here is a thread where I paste a code to create UDF, UDT and UDO Problem With Tables
    Regards,
    Hmg

Maybe you are looking for