Custom table header

Hi all!
Actually it seems pretty easy but I cannot find an answer in my mind. The problem is simply controlling column widths of multiple JTables with only one table header (consider we add lots of tables with same number of columns in boxlayout (and glued to borders of same container), well handling dragging thing is relatively easy since we may override columnMoved(TableColumnModelEvent e) in JTableHeader but there is nothing like something for resizing column widths or just I cannot see). Is there a way to reach column widths(I dunno maybe some kind of array or get function)?
do I have to create an custom Event for resizing widths?
I'm open to any abstract ideas, well do not try to explain things as a source code(If you want you definitely can do but it's kind of burden and it's not the best way to ask for "help" also this way is better for my programming skills, just tell me function or things to extend or implement)
Anyway, it would be pretty good to learn how to detect a change in a table's column widths(which event, etc...)
thanks for your helps:))

to be more precise if there is someone just like me, lookin for this:
package ComponentDisplayer;
import java.awt.*;
import javax.swing.*;
import javax.swing.table.*;
public class TableColumnTest extends JFrame
     public TableColumnTest()
          JTable north = new JTable(5, 10);
          //north.setPreferredScrollableViewportSize(north.getPreferredSize());
          JTable south = new JTable(5, 10);
          //south.setPreferredScrollableViewportSize(south.getPreferredSize());
          south.setColumnModel( north.getColumnModel() );
          south.setTableHeader(north.getTableHeader());
          JPanel jp=new JPanel();
          jp.setLayout(new BoxLayout(jp, BoxLayout.PAGE_AXIS));
          jp.add(north.getTableHeader());
          jp.add(north);
          jp.add(south);
          jp.remove(north);
          /*JScrollPane spsouth=new JScrollPane(south);
          spsouth.setSize(south.getColumnModel().getTotalColumnWidth(),south.getRowCount()*south.getRowHeight());
          spsouth.setMaximumSize(new Dimension(south.getColumnModel().getTotalColumnWidth(),south.getRowCount()*south.getRowHeight()));
          JScrollPane spnorth=new JScrollPane(north);
          spnorth.setSize(north.getColumnModel().getTotalColumnWidth(),north.getRowCount()*north.getRowHeight());
          spnorth.setMaximumSize(new Dimension(north.getColumnModel().getTotalColumnWidth(),north.getRowCount()*north.getRowHeight()));
          jp.add( spnorth);
          jp.add( spsouth);
          north.setValueAt(new String("north"), 0, 0);
          south.setValueAt(new String("south"), 0, 0);
          getContentPane().add(jp);
     public static void main(String[] args)
          TableColumnTest frame = new TableColumnTest();
          frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
          frame.pack();
          frame.setLocationRelativeTo( null );
          frame.setVisible(true);
}

Similar Messages

  • Custom table header renderer

    I am trying to make a custom table header. I have seen some examples on the web such as
    <mx:DataGridColumn width="150" dataField="SalePrice"
                    headerRenderer="myComponents.RendererDGHeader"/>
    where that class is a Box
    I also tried to inline it as such:
    <mx:DataGridColumn draggable="false" editable="true" headerText="Source RNC" headerStyleName="tableHeader" dataField="sourceRNC">
         <mx:headerRenderer>
              <fx:Component>
                   <mx:DataGridItemRenderer>
                        <s:Group/>    
                   </mx:DataGridItemRenderer>
                 </fx:Component>
         </mx:headerRenderer>
    </mx:DataGridColumn>
    In both these cases I get the following:
    VGroup declaration must be contained within the <Declerations>
    tag since it does not implement mx.core.IUIComponent
    Now clearly it does. Is this a bug or am I doing something
    wrong. My goal is for the table's header to have a combo
    box and a text field below the header's name to put filter
    options on the column(like hide values <5) etc
    Thanks, I know I have been posting a lot of questions lately

    By using s:MXDataGridItemRenderer, your renderer is now using Spark, and in Spark, clipping is not available by default.  You have to set clipAndEnableScrollbars=true on the layout.  Headers are asked for height if variableRowHeight=true, but not width. The width is determined by the DG columns.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Custom multiline table header

    I was trying to set JPanel with two inner components (JTextField and JLabel) as header renderer. When I put this component to JFrame text field is editable, but when it appears in my custom table header it is disabled or not focusable, that part I couldn't figure out. I thought that I can find where all header components are and make them enabled/focusable, but I couldn't figure that out either.
    Please help!!
    :-|

    A renderer is simply used to paint the contents of the header;
    it is not a child of the JTableHeader or anything like that. If
    you want the text field in the renderer to be editable, you are
    going to have to handle that yourself by taking care of
    all the necessary events, etc.

  • JTable with custom column model and table model not showing table header

    Hello,
    I am creating a JTable with a custom table model and a custom column model. However the table header is not being displayed (yes, it is in a JScrollPane). I've shrunk the problem down into a single compileable example:
    Thanks for your help.
    import javax.swing.*;
    import javax.swing.table.*;
    public class Test1 extends JFrame
         public static void main(String args[])
              JTable table;
              TableColumnModel colModel=createTestColumnModel();
              TestTableModel tableModel=new TestTableModel();
              Test1 frame=new Test1();
              table=new JTable(tableModel, colModel);
              frame.getContentPane().add(new JScrollPane(table));
              frame.setSize(200,200);
              frame.setVisible(true);
         private static DefaultTableColumnModel createTestColumnModel()
              DefaultTableColumnModel columnModel=new DefaultTableColumnModel();
              columnModel.addColumn(new TableColumn(0));
              return columnModel;
         static class TestTableModel extends AbstractTableModel
              public int getColumnCount()
                   return 1;
              public Class<?> getColumnClass(int columnIndex)
                   return String.class;
              public String getColumnName(int column)
                   return "col";
              public int getRowCount()
                   return 1;
              public Object getValueAt(int row, int col)
                   return "test";
              public void setValueAt(Object aValue, int rowIndex, int columnIndex)
    }Edited by: 802416 on 14-Oct-2010 04:29
    added                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

    Kleopatra wrote:
    jduprez wrote:
    See http://download.oracle.com/javase/6/docs/api/javax/swing/table/TableColumn.html#setHeaderValue(java.lang.Object)
    When the TableColumn is created, the default headerValue  is null
    So, the header ends up rendered as an empty label (probably of size 0 if the JTable computes its header size based on the renderer's preferred size).nitpicking (can't resist - the alternative is a cleanup round in some not so nice code I produced recently <g>):
    - it's not the JTable's business to compute its headers size (and it doesn't, the header's the culprit.) *> - the header should never come up with a zero (or near-to) height: even if there is no title shown, it's still needed as grab to resize/move the columns. So I would consider this sizing behaviour a bug.*
    - furthermore, the "really zero" height is a longstanding issue with MetalBorder.TableHeaderBorder (other LAFs size with the top/bottom of their default header cell border) which extends AbstractBorder incorrectly. That's easy to do because AbstractBorder itself is badly implemented
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6459419
    Thanks for the opportunity to have some fun :-)
    JeanetteNo problem, thanks for the insight :)

  • How to create a custom table in the below format

    Dear Friends
              can any one please let me know hot to create a custom table as below
    outpatient
    |employeeno | class | startdate | enddate | spouse |1stchild | 2nchild|  Rate | amount|
    My FO wants to enter in the SM30 as above ......i.e he wants to have spouse ,1st child and 2nd child under one group........so he asking me to make as one group
    and give a heading as outpatient.........similary i have to give for in patient.
    Please could any one tell is it possible.
    regards
    syamala...

    Under the SAP forums section, there is ABAP development and in That there is ABAP General.
    SAP forums > ABAP development > ABAP General.
    Post in that forum.
    Regards
    AK
    Please reward if helpful

  • Declare Types using a custom table

    Hi,
    I am creating a new structure in my program in ABAP Editor. The fields of this table will be all the fields in a custom table plus an additional field which is not a part of this table. The table has some 150 fields so I need to include it in my structure. I am using it in this way but its giving error:
    TYPES: BEGIN OF t_struct,
                 INCLUDE TYPE zcustom_table,
                 zzfield      TYPE c,
                 END OF t_struct.
    This structure is getting created but giving an error when I am creating a table of this type as:
    DATA : i_tab  TYPE STANDARD TABLE OF t_struct WITH HEADER LINE.
    Please suggest me how can get rid if this error.
    Thanks,
    Abhishek

    Hi,
    the syntax you declared is wrong,
    check the below code , it will solve your problem
    TYPES: BEGIN OF t_struct.
    INCLUDE TYPE zcustom_table.
    types : zzfield TYPE c.
    types : END OF t_struct.
    DATA : i_tab TYPE STANDARD TABLE OF t_struct WITH HEADER LINE.
    regards
    prasanth

  • Not able to insert in custom table.

    Hi All,
    I am trying to insert a row in a custom table.
    But getting the following error when the page opens up.
    oracle.jbo.RowCreateException: JBO-25017: Error while creating a new entity row for AllAreInOneEO.
    I am giving the details, what i have tried.
    Table
    create table apps.test_table
    PERSON_ID NUMBER(10) PRIMARY KEY,
    LAST_UPDATE_DATE DATE,
    LAST_UPDATED_BY NUMBER(15),
    LAST_UPDATE_LOGIN NUMBER(15),
    CREATED_BY NUMBER(15),
    CREATION_DATE DATE)
    AM
    package telenor.oracle.apps.ak.allareinone.server;
    import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
    // --- File generated by Oracle Business Components for Java.
    import oracle.apps.fnd.framework.OAViewObject;
    import oracle.jbo.Row;
    public class AllAreInOneAMImpl extends OAApplicationModuleImpl
    * This is the default constructor (do not remove)
    public AllAreInOneAMImpl()
    * Sample main for debugging Business Components code using the tester.
    public static void main(String[] args)
    launchTester("telenor.oracle.apps.ak.allareinone.server", "AllAreInOneAMLocal");
    * Container's getter for AllAreInOneVO1
    public AllAreInOneVOImpl getAllAreInOneVO1()
    return (AllAreInOneVOImpl)findViewObject("AllAreInOneVO1");
    public void createEmployee()
    System.out.println("3");
    OAViewObject vo = (OAViewObject)getAllAreInOneVO1();
    System.out.println("4");
    System.out.println(vo);
    System.out.println("4");
    if (!vo.isPreparedForExecution())
    System.out.println("In Exe -- Begin");
    vo.executeQuery();
    System.out.println("In Exe -- Begin");
    Row row = vo.createRow();
    vo.insertRow(row);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    } // end createEmployee()
    * Commits the transaction.
    public void Create()
    getTransaction().commit();
    } // end apply()
    Controller
    /*===========================================================================+
    | Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA |
    | All rights reserved. |
    +===========================================================================+
    | HISTORY |
    +===========================================================================*/
    package telenor.oracle.apps.ak.allareinone.webui;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.webui.OAControllerImpl;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.fnd.framework.OAApplicationModule;
    * Controller for ...
    public class AllAreInOneCO extends OAControllerImpl
    public static final String RCS_ID="$Header$";
    public static final boolean RCS_ID_RECORDED =
    VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
    * Layout and page setup logic for a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    if (!pageContext.isFormSubmission())
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    am.invokeMethod("createEmployee", null);
    } // end processRequest()
    * Procedure to handle form submissions for form elements in
    * a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am1 = pageContext.getApplicationModule(webBean);
    System.out.println("In Process Form Request");
    if (pageContext.getParameter("Create") != null)
    am1.invokeMethod("Create");
    Requesting everybody's help.
    Regards,
    Subhra

    Subhra,
    Your observation is correct. generally if you are working on a custom table or a table without the WHO columns, then you need to use your EO class as abstract.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                       

  • How to manage data in a custom table added in SBO?

    Hello,
    I'm developing a addon for one client that needs to control an aditional step, after each Invoice is posted.
    Since SBO does not allow me to add additional fields to Invoice header table (OINV), I thought to add a custom table to SBO database to control the process for each Invoice (simple table with 2 columns: DocNum to hold the Invoice number, and Status to keep track if the Invoice was processed or not).
    When I added a Custom Table in SBO and checked the table definition in SQL Manager, I found that SBO added automatically 2 new columns (Code and Name).
    Since the PK is defined at Code column (and not the DocNum has I wanted), I found that it not very handy to manage data (insert, delete & update) with this table definition.
    I tried to find a DI object that could manage easily the data of this table type but had no sucess.
    Then I thought in adding the custom table directly in SQL Manager, and manage it directly with Recordet objects.
    However this seems not a standard process to manage data since it interacts directly with the DBMS, which can be dangerous...
    Is there any way or DI object to manage this custom tables added in SBO?
    Thanks all!
    Manuel Dias

    Hi Manuel,
    What do you mean by SBO does not allow me to add additional fields to Invoice header table (OINV).
    Have you tried it add a UDF to OINV,if so what is the exception you got while adding.
    If you Have not tried Use the following code to create.
    Dim oUserFieldMD As SAPbobsCOM.UserFieldsMD
            oUserFieldMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
            If (Not isColumnExist(TableName, ColumnName)) Then
                oUserFieldMD.TableName = "OINV"
                oUserFieldMD.Name = ColumnName
                oUserFieldMD.Description = Description
                oUserFieldMD.Type = SAPbobsCOM.BoFieldTypes.db_Alpha
                oUserFieldMD.EditSize = Size
                (objUserFieldMD.Add() )
            End If
    if the field is added successfully.
    Then open the Invoice screen and goto View menu and click on user defined fields then it will show you one form which contains the field you added,
    You can access this field using DIAPI of Invoice object
    regards
    Vishnu

  • Button not working in a table header

    I have a custom view that implements table header. I have buttons in that view. The buttons used to work fine in SDK prior to 5. I moved directly to SDK 7, and the buttons stopped working. The action is not called anymore.
    Any help will be appreciated.
    Thanks

    Well, you have me stumped. I just replicated your code and it works fine for me:
    - (void)doStuff:(id)sender
    NSLog(@"Logo Touched!");
    - (void)viewDidLoad {
    // loadingView is a UIView that becomes the tableHeaderView
    self.tableView.tableHeaderView = loadingView;
    [loadingActivity startAnimating];
    // setup a sample button (declared in header)
    logoButton = [[UIButton alloc] initWithFrame:CGRectZero];
    [logoButton setImage:[UIImage imageNamed:@"logo_webclip.png"] forState:UIControlStateNormal];
    [logoButton addTarget:self action:@selector(doStuff:) forControlEvents:UIControlEventTouchUpInside];
    logoButton.tag = 100;
    [loadingView addSubview:logoButton];
    - (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    logoButton.frame = CGRectMake(50., 50., 64., 64.);
    That calls my target everytime it's touched... are you remembering to call the superclass for each of your overrided methods in your custom UIView? The only difference between my quick test and yours is that I didn't subclass UIView -- I just used the UIView class directly.

  • JTable column headers not displaying using custom table model

    Hi,
    I'm attempting to use a custom table model (by extending AbstractTableModel) to display the contents of a data set in a JTable. The table is displaying the data itself correctly but there are no column headers appearing. I have overridden getColumnName of the table model to return the correct header and have tried playing with the ColumnModel for the table but have not been able to get the headers to display (at all).
    Any ideas?
    Cheers

    Class PublicationTableModel:
    public class PublicationTableModel extends AbstractTableModel
        PublicationManager pubManager;
        /** Creates a new instance of PublicationTableModel */
        public PublicationTableModel(PublicationManager pm)
            super();
            pubManager = pm;
        public int getColumnCount()
            return GUISettings.getDisplayedFieldCount();
        public int getRowCount()
            return pubManager.getPublicationCount();
        public Class getColumnClass(int columnIndex)
            Object o = getValueAt(0, columnIndex);
            if (o != null) return o.getClass();
            return (new String()).getClass();
        public String getColumnName(int columnIndex)
            System.out.println("asked for column name "+columnIndex+" --> "+GUISettings.getColumnName(columnIndex));
            return GUISettings.getColumnName(columnIndex);
        public Publication getPublicationAt(int rowIndex)
            return pubManager.getPublicationAt(rowIndex);
        public Object getValueAt(int rowIndex, int columnIndex)
            Publication pub = (Publication)pubManager.getPublicationAt(rowIndex);
            String columnName = getColumnName(columnIndex);
            if (columnName.equals("Address"))
                if (pub instanceof Address) return ((Address)pub).getAddress();
                else return null;
            else if (columnName.equals("Annotation"))
                if (pub instanceof Annotation) return ((Annotation)pub).getAnnotation();
                else return null;
            etc
           else if (columnName.equals("Title"))
                return pub.getTitle();
            else if (columnName.equals("Key"))
                return pub.getKey();
            return null;
        public boolean isCellEditable(int rowIndex, int colIndex)
            return false;
        public void setValueAt(Object vValue, int rowIndex, int colIndex)
        }Class GUISettings:
    public class GUISettings {
        private static Vector fields = new Vector();
        private static Vector classes = new Vector();
        /** Creates a new instance of GUISettings */
        public GUISettings() {
        public static void setFields(Vector f)
            fields=f;
        public static int getDisplayedFieldCount()
            return fields.size();
        public static String getColumnName(int columnIndex)
            return (String)fields.elementAt(columnIndex);
        public static Vector getFields()
            return fields;
    }GUISettings.setFields has been called before table is displayed.
    Cheers,
    garsher

  • Vertical text in table heading

    Hi,
    I would like to save some space in some reports and I would like to change orientation of text in table heading.
    Is it posible to have vertical text in table heading?
    What I want is showed on this picture: [Vertical text|¨http://img179.imageshack.us/img179/234/obiverticaltext.jpg]
    Thank you for some tips.

    Hi,
    Go through this...will help you solve your requirement....http://blog.trivadis.com/blogs/andreasnobbmann/archive/2009/07/17/vertical-text-in-obiee.aspx
    Use the same code Writing-mode: tb-rl; filter: flipv fliph; in custom css style of column heading.(column properties->column format->edit format icon beside column heading->css style)
    Regards,
    Srikanth

  • Giving Error When Selecting From a Custom Table

    There is a custom report 'Z*'  which archives data.
    In this report, while selecting data(needs to be archived) from a custom table 'Z*_T', giving runtime error in Production Server.
    The select statement is written below :
    *data izX like z_t occurs 1000 with header line._
    *select * from z*t into table i_zX.*_
    How can I change the select statement so that it will work properly?

    Sas..
    From your example code it appears you are trying to use a wild card for both your dbtable and the internal table.
    To do this, you will lilkely need to use a Field Symbol for the target internal table and your FROM will need to be a varible
    FROM (dbtabname)
    The ABAP Helps gives this example for the Select Table
    DATA  TABNAME(10).
    DATA: BEGIN OF WA,
            ID   LIKE SCUSTOM-ID,
            NAME LIKE SCUSTOM-NAME,
            REST(134),
          END OF WA.
    TABNAME = 'SCUSTOM'.
    SELECT * INTO WA FROM (TABNAME).
      WRITE: / WA-ID, WA-NAME.
    ENDSELECT.

  • Downloading blob content from a custom table

    In our hosted Apex application, the following code from the Application Express Developer's Guide works great for allowing a user to download blob content from one of our custom tables via a download button. However, the code doesn't work on the Oracle Cloud because the "owa_util" package is no longer available. The code is as follows:
    CREATE OR REPLACE PROCEDURE download_my_file(p_file in number) AS
    v_mime VARCHAR2(48);
    v_length NUMBER;
    v_file_name VARCHAR2(2000);
    Lob_loc BLOB;
    BEGIN
    SELECT MIME_TYPE, BLOB_CONTENT, name,DBMS_LOB.GETLENGTH(blob_content)
    INTO v_mime,lob_loc,v_file_name,v_length
    FROM file_subjects
    WHERE id = p_file;
    -- set up HTTP header
    -- use an NVL around the mime type and
    -- if it is a null set it to application/octect
    -- application/octect may launch a download window from windows
    owa_util.mime_header( nvl(v_mime,'application/octet'), FALSE );
    -- set the size so the browser knows how much to download
    htp.p('Content-length: ' || v_length);
    -- the filename will be used by the browser if the users does a save as
    htp.p('Content-Disposition: attachment; filename="'||replace(replace(substr(v_file_name,instr(v_file_name,'/')+1),chr(10),null),chr(13),null)|| '"');
    -- close the headers
    owa_util.http_header_close;
    -- download the BLOB
    wpg_docload.download_file( Lob_loc );
    end download_my_file;
    Besides using web services, does anyone know of a way to do this? Is there a way to add access to the "owa_util" package in the cloud? I have also tried apex_util.get_blob_file_src but that is also unavailable in the Oracle Cloud.
    Thanks,
    Steve

    Following Joel's advice:
    The way I solved this was to split the code between two page processes and one application process. The download button first calls a page process to move the report data into a blob column and then calls another page process which is of "run application process" type. This calls the application level process where the download code, shown below, is called.
    Notice the following changes to the code from the one posted earlier (also from Joel)
    1) added sys.htp.init;
    2) "sys." to all htp, owa and wpg_docload calls
    3) added apex_application.stop_apex_engine; after the wpg_docload statement at the bottom of the script.
    Now the download button launches a "save as" dialog box and the report content is downloaded to the client.
    The code now looks like:
    CREATE OR REPLACE PROCEDURE download_my_file(p_file in number) AS
    v_mime VARCHAR2(48);
    v_length NUMBER;
    v_file_name VARCHAR2(2000);
    Lob_loc BLOB;
    BEGIN
    SELECT MIME_TYPE, BLOB_CONTENT, name,DBMS_LOB.GETLENGTH(blob_content)
    INTO v_mime,lob_loc,v_file_name,v_length
    FROM oehr_file_subject
    WHERE id = p_file;
    -- set up HTTP header
    -- use an NVL around the mime type and
    -- if it is a null set it to application/octect
    -- application/octect may launch a download window from windows
    sys.htp.init;
    sys.owa_util.mime_header( nvl(v_mime,'application/octet'), FALSE );
    -- set the size so the browser knows how much to download
    sys.htp.p('Content-length: ' || v_length);
    -- the filename will be used by the browser if the users does a save as
    sys. htp.p('Content-Disposition: attachment; filename="'||replace(replace(substr(v_file_name,instr(v_file_name,'/')+1),chr(10),null),chr(13),null)|| '"');
    -- close the headers
    sys.owa_util.http_header_close;
    -- download the BLOB
    sys.wpg_docload.download_file( Lob_loc );
    apex_application.stop_apex_engine;
    end download_my_file;
    Thanks Joel for your help.
    Steve

  • AP to GL Transfer: How to have a custom Journal Header name in GL.

    Hi,
    Does any one know how to have a custom Journal Header name while transferring the Journals from AP to GL?
    Assume that I am transferring the Journals which belongs to a Single Invoice from AP to GL. When these Journals are transferred from AP to GL, Oracle will create a Journal Header with the default naming convention. The Oracle generated Header name will be as shown below.
    *123456 Purchase Invoices USD*. Where 123456 is AE_HEADER_ID and USD is the Invoice Currency code.
    Our requirement is, we want the Journal Header name something like *"Hello World"+TIMESTAMP*, where TIMESTAMP is the date when the user has ran the AP to GL transfer program.
    I know that when building the AAD(Application Accounting Definition) we can define the Journal Header descriptions and Journal Lines descriptions. But, I did not see any setup option to have the custom Journal Header name in GL.
    Any suggestions on this issue are highly appreciated.
    Advanced Thanks,
    Lokesh.

    Hi Lokesh,
    The best way to have a custom journal header name is using hook package.
    When data move from XLA to GL, every time it creates a new dynamic table as GL_INTERFACE table but the name is different (XLA_GLT_XXXXX).
    This table information stores in 'gl_interface_control' table but after use the record has deleted from 'gl_interface_control'.
    So we can't see table information after finishing create accounting program.
    What the modification you will made in this table it will affect GL base table. So to made custom journal header name, we need to change Reference4 column of dynamic table.
    Here is the code to get the table name and through procedure you can update the Reference4 column.
    FUNCTION pre_module_hook(run_id IN NUMBER,
                   errbuf IN OUT NOCOPY VARCHAR2) RETURN BOOLEAN IS
    chr_errbuf varchar2(50);
    chr_retcode varchar2(50);
    l_interface_Table_name varchar2(2000);
    BEGIN
         SELECT interface_table_name
    into l_interface_Table_name
    FROM gl_interface_control
    WHERE interface_run_id = run_id;
         BEGIN     
    xxdb_gl_icaccntgdist_pkg.gl_int_jrnl_update (chr_errbuf,chr_retcode,l_interface_Table_name);
    RETURN(TRUE);
         END;
    END pre_module_hook;
    Make these changes in GL_IMPORT_HOOK_PKG.pre_module_hook function.
    You can make the changes through calling procedure using dynamic query under the function pre_module_hook.
    Thanks,
    Gaurav K
    Edited by: 972729 on Nov 22, 2012 4:46 AM

  • How to set the font of a table header?

    Hi,
    Is there a way to set the font of a table header? I do not mean how to change the header word but the font.
    Thanks
    Stephen

    Hi,
    for combobox in a table (I assume the combobox is shown un column 2, thus the index 1)
    oracle.jbo.uicli.jui.JUTableLOVEditor lovCellEditor = (oracle.jbo.uicli.jui.JUTableLOVEditor) jTable1.getColumnModel().getColumn(1).getCellEditor();
    lovCellEditor.getComponent().setFont(new Font("Arial",Font.BOLD,13));
    For the LOV panel this is a bit more complicated because you need to create a custom LOV panel as described in http://www.oracle.com/technology/products/jdev/howtos/10g/jclientlov/customadfjclientlovpanel.html
    I filed a bug today to expose the component on a LOV to public so they can be modified
    Frank

Maybe you are looking for