How Shall I programatically set  VO's  for Advanced Table?

I have Advanced Table which display data from 3 different table under certain conditions.
These 3 tables having same columns but different data.
Here I have defined 3 VOs for this 3 tables.
Now I want to programatically configure this VO to Advanced Table.
Also...How shall i set View Attribute for Column in Advanced Table.
I have written following code..but that didnt work...it is in processRequest()
OAAdvancedTableBean tableBean = (OAAdvancedTableBean) webBean.findChildRecursive("SampleTable");
if (tableBean!=null)
System.out.println("Table Bean is Not Null");
tableBean.prepareForRendering(pageContext);
tableBean.setViewUsageName("EMCOpptyLevel1DataVO"); //EMCOpptyLevel1DataVO is name of VO
OAMessageTextInputBean hours = (OAMessageTextInputBean)tableBean.findIndexedChildRecursive("hours1");
hours.setViewUsageName("EMCOpptyLevel1DataVO");
hours.setViewAttributeName("Hours");
am.invokeMethod("initialize");// This will execute query on EMCOpptyLevel1DataVO
}

We have done it in the follwoing way. I have created one VO and this was with qry "select a,b from tab1;"
I have written an public initialize(int condition){} method in VOImpl class. In the initialize method I used to change the qry of the VO something like this
public initialize(int condition){
if condition = 1
     setqry("select a,b from tab1");
     setFullSqlMode(FULLSQL_MODE_AUGMENTATION);
if condition = 2
     setqry("select a,b from tab2");
     setFullSqlMode(FULLSQL_MODE_AUGMENTATION);
Basically, I was using only one VO, but changing the qry on the VO dynamically depending on the condition. Depending on the condition I initialize my VO appropriately.

Similar Messages

  • How to retain current set of records in advanced table in OAF

    I have an advanced table in a OAF page. Number of records displayed is set to 5. Now, when I have more than 5 records, we can view the next set of records using navigation buttons of the advanced table. One of its column is an image which has "Action Type" as "fireAction" and "Submit" set to "True", which when clicked displays further details about the selected record in a separate region. However, in this process the page is getting refreshed and the table is again displaying the first set of 5 records even if i chose to display details about record in the next set of 5 (i.e after navigating using "Next 5" button of the table).
    Is there any way to retain the current set of records displayed in the advanced table across the page refresh.?
    Thanks
    Nagamanoj

    Solved.
    Somewhere in our code, while populating one of the columns of the table, we were resetting the VO which was causing the issue. Modified that method call to add a parameter to mention from which row should the table be populated.
    Thanks
    Nagamanoj

  • How to find programatically the installation location for Mysql?

    How to find programatically the installation location for Mysql?

    There are thousands of them. Probably hundreds of thousands. If you had a particular one in mind, just ask the person who set it up. There's no point in trying to write code for that, since you only need to ask once and put the location in your code.

  • How to set DDL lock for a table

    OCI,how to set DDL lock for a table?

    Oracle acquires a dictionary lock automatically on behalf of any DDL transaction requiring it. Users cannot explicitly request DDL locks. Only individual schema objects that are modified or referenced are locked during DDL operations. The whole data dictionary is never locked
    DDL locks fall into three categories: exclusive DDL locks, share DDL locks, and breakable parse locks.
    see this link
    http://www.sc.ehu.es/siwebso/KZCC/Oracle_10g_Documentacion/server.101/b10743/consist.htm#i5281

  • Programatically setting column values for table

    hi...
    I am programatically setting column values for table.
    But these values are not getting reflected on table after commit.
    I mean to say,new values are not persisted after commit.
    The code is as follows,It is in Application Module class
    public void createRecord()
    OAViewObject vo = (OAViewObject)this.getOpptyLoeVO1();
    if (!vo.isPreparedForExecution())
    vo.executeQuery();
    Row row = vo.createRow();
    row.setAttribute("Id",new Number(850));
    row.setAttribute("Model","Honda");
    row.setAttribute("Role","Team Lead");
    row.setAttribute("Hours",new Number(35));
    vo.insertRow(row);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    getTransaction().commit();
    Here "Id,Model,Role,Hours" are columns in table .

    Hi,
    is your VO based on an Entity Object?
    If not, you can't update values in the DB using only a View Object!
    If yes, you should control that, in your VO, you have not selected the flag "Read Only" for the EO you want to update.
    Hope this helps you.
    Bye
    Raffy

  • How to add a new data element for existing table filed(Primary key field)

    Hi Experts,
    How to add a new data element for existing table field(Primary key field)
    For this filed ther is no foreign key relation ships and even check table.
    while activating table it is giving message like below.
    can you help any one to solve this and wil steps to add new dataelement for existing primary key filed of a table.
    Check table (NAMING SPACE/TABLE NAME(EX:/TC/VENDOR)) (username/19.02.10/03:29)           
    Primary key change not permitted for value table /TC/VENDOR
    Check on table  /TC/VENDOR resulted in errors              
    Thanks
    Ravi

    Hi,
    Easiest way is to download the table eg into an Excel table (if possible) or text table. Drop the table from the database. Build your table with the new key field. Build the database table again and fill it.
    You can do it also over the database into a new table. Drop the old one. Build the enhanced one and fill it. Afterwards drop your (temporary) table.
    Maybe there are other ways, but this works.
    Success,
    Rob

  • How to read and set Pane value for new adding folder

    Hi Experts,
    I tried to add a new folder in to a system form as below
    Itm = form.Items.Add("UserFolder"), SAPbouiCOM.BoFormItemTypes.it_FOLDER)
    form.DataSources.UserDataSources.Add("F_new", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1)
    Dim oFolder As SAPbouiCOM.Folder
    oFolder.DataBind.SetBound(True, "", "F_new")
    oFolder.GroupWith("138")
    My quester is what is the panelevel for this new folder? And how to set value to panelevel for this folder.
    If we design a folder from Screen Painter, we can set the pane value manually, can we do this from code?
    Thanks a lot
    Tim

    Hello,
    You do not have to set any panelevel for your folder, if you would like to display it all the panelevels. (Let's see an example on Item Master data form).
    Sales, Purchase, Inventory etc tabs (folders) are always visible, there is no panelevel set for them.
    To change between panelevels, you can trigger et item pressed event, and  before_action = false, then you may change the panelevel of the form poperly.
    For initially you may use the Folder.Select() command to show the default panelevel
    >The problem is here, it looks like oFrom.Panelevel property can only accept integer value, so how can I know what's the pane level number for my folder?
    Do not set panelevel for your folders, you should drive your form's panelevel based on a selection tree:
    To see clear, please check the following code in the help sample: CompexForm
    C:Program FilesSAPMásolat - SAP Business One SDKSamplesCOM UIVB.NET07.ComplexForm2003
    to make it clear:
            '// Adding Folder items
            For i = 1 To 2
                oItem = oForm.Items.Add("Folder" & i, SAPbouiCOM.BoFormItemTypes.it_FOLDER)
                oItem.Left = (i - 1) * 100
                oItem.Width = 100
                oItem.Top = 6
                oItem.Height = 19
                oFolder = oItem.Specific
                '// set the caption
                oFolder.Caption = "Folder" & i
                oFolder.DataBind.SetBound(True, "", "FolderDS")
                If i = 1 Then
                    oFolder.Select()
                Else
                    oFolder.GroupWith(("Folder" & i - 1))
                End If
            Next i
    This code add 2 folders to the form: and the first (i = 1) is selected.
    IN itemevent, the panelevel property of the form is depending from the item you have clicked:
    Case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED
                        '// Check if the event was raised by one of the Folder items
                        '// and change the form's pane level
                        If pVal.ItemUID = "Folder1" Then
                            oForm.PaneLevel = 1
                        End If
                        If pVal.ItemUID = "Folder2" Then
                            oForm.PaneLevel = 2
                        End If
    Regards
    János

  • How to set title/text for ALV table column header in WD ABAP

    Hello,
    I am working in WDA using SALV_WD_Table to display data in table. I need to change the column header text, the obvious way is to get the column header and call the method SET_TEXT to set new text / title. However, this method does NOT work, it does not change the column header text. I also tried the SET_TOOLTIP, this one works, but SET_TEXT does not work. Anyone has idea why this not working and do you find any go-around solution?
    My version is NW 7.0
    Thank
    Jayson

    Hi jason ,
    For setting Heder text for your ALV table
    ip_confing type ref to CL_SALV_WD_CONFIG_TABLE.
    "set alv table header
      ip_config->if_salv_wd_table_settings~r_header->set_text( 'Test ALV Header functionality' ).
    first you have to hide the DDIC text and then try to set your own text .
    "modify columns
      LOOP AT lt_columns INTO ls_column.
        lr_column = ls_column-r_column.
        CASE ls_column-id.
          WHEN 'MANDT'.
            "hide this field
            lr_column->set_visible( cl_wd_abstr_table_column=>e_visible-none ).
           WHEN 'SEQNR'.
            "set header to different string
            lr_column->r_header->set_ddic_binding_field( if_salv_wd_c_column_settings=>ddic_bind_none )." use this line to hide ddic text
            lr_column->r_header->set_text( 'Position' ).     
        endcase.
      endloop.
    Regards
    Chinnaiya P

  • How to maintain two sets of separate auto numbered tables?

    Hi everyone,
    Here is what I'm trying to do with FrameMaker and find impossible to do:
    I have to maintain two sets of different tables each starts with number 1 inside the table. So I created two paragraph tags with 'Auto Number' checked and applied to the two different tables. But the result is not what I want: the number inside one table continues from the other one, instead of 1, 2, 3, 4, ... and 1, 2, 3, 4... It is 1, 2, 3, 4...
    Am I doing anything wrong here? Must be, for it doesn not work.
    Thanks for any help.

    You're not doing anything wrong, just perhaps missing some of the details. FM autonumbering is a joy to work with once you've got the hang of it, and/but different from most other approaches. (and by "different", I don't just mean flexible and reliable)
    Broadly speaking, I'd say you have two options:
    define two styles for the numbering you use inside tables, let's say TableNumberStart and TableNumberContinue. Define autonumbering so that TableNumberStart uses <n=1> and TableNumberContinue uses <n+1>
    This works because you've made the extra effort yourself.
    use one style – let's say TableAnchor – to anchor each table, and another style – let's say TableNumber – for the numbering you use inside tables. Define autonumbering so that TableAnchor uses < =0>, and TableNumber uses <n+1>.
    This works because you've asked FM to make the effort for you :-} TableAnchor resets the counter to zero, and TableNumber increments it as required. Note: in the definition < =0> the space before the equals sign is essential. It keeps the counter from displaying on the page.
    While you're experimenting, read up on Series labels – so you can manage separate numbering for, say, tables and figures. And on Building blocks – I was so impressed the first time I managed to use numbered heading styles to reset numbering in a list …
    HTH

  • Setting JcomboBox editor for a table cell

    Hi,
    I have a ComboBox editor for a cell in my table. I want to set this editor depending on the value of another column
    qualifierTable.addMouseListener(new MouseAdapter(){
       public void mouseClicked(MouseEvent e){
        int selRow = qualifierTable.getSelectedRow();
        int selCol = qualifierTable.getSelectedColumn();
       if (someCondition)
                JComboBox comboBoxEditor = new JComboBox();
                comboBoxEditor.addItem("Private");
                 comboBoxEditor.addItem("Protected");
                 comboBoxEditor.addItem("Public");
                 qualDataValueCol.setCellEditor(new DefaultCellEditor(comboBoxEditor));
                 Object dataValue = comboBoxEditor.getSelectedItem();
                                          if (dataValue!= null)
                 {                              qualifierTablemodel.setValueAt(dataValue, selRow, selCol);
    }The problem is this sets the editor for all cells in the column. However I want the editor to revert to JTextField if this condition is not met. Where should I set it back. It does not work if I set it in the else part

    Override the getCellEditor(...) method to return the appropriate editor. Something like this:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=637581

  • How do i display input values (POV) for a table control field

    Hi guyz !
    How do i display input values (POV) for a field in table control,
    i mean when user presses F4 on a table control field.
    Please help.
    Thanks
    jahan

    PROCESS ON VALUE-REQUEST( F4 ) statement  
    Code to demonstrate how to perform a manual value help(F4) on a particular field using the PROCESS ON VALUE-REQUEST statement and how to return values back to a table control on the screen. For standard screen fields simply move the value to the appropriate screen field name.
    * Screen flow logic........
    PROCESS BEFORE OUTPUT.
    *MODULE PBO_MODULE.
    PROCESS AFTER INPUT.
    *MODULE PAI_MODULE.
    PROCESS ON VALUE-REQUEST. "F4
      FIELD EKPO-EBELP MODULE help_ekpo.
    MODULE help_ekpo INPUT.
    **Transport values to table dynpro/screen table control
      DATA: l_stepl LIKE  sy-stepl,
            l_indx  LIKE  sy-stepl.
      DATA: dynpfields        LIKE dynpread OCCURS 5 WITH HEADER LINE.
    * Adjust for scroling within table control
      CALL FUNCTION 'DYNP_GET_STEPL'
        IMPORTING
          povstepl        = l_stepl
        EXCEPTIONS
          stepl_not_found = 0
          OTHERS          = 0.
      l_indx = tc_ekpotable-top_line + l_stepl - 1.
              "tc_ekpotable should already have been declared
      REFRESH dynpfields.
      CLEAR   dynpfields.
      dynpfields-fieldname  = 'EKPO-EBELN'.
      dynpfields-fieldvalue = '00010'   "wa_ekpo-ebeln.
      dynpfields-stepl      = l_stepl.
      APPEND dynpfields.
      dynpfields-fieldname  = 'EKPO-EBELP'.
      dynpfields-fieldvalue = '00020'   "wa_ekpo-ebelp.
      dynpfields-stepl      = l_stepl.
      APPEND dynpfields.
      CALL FUNCTION 'DYNP_VALUES_UPDATE'
        EXPORTING
          dyname     = 'SAPLZZ_EKKO'    "Program name
          dynumb     = '0100'           "Screen number
        TABLES
          dynpfields = dynpfields
        EXCEPTIONS
          OTHERS     = 0.
    ENDMODULE.                 " help_ekpo  INPUT
    reward points  if it is usefull ..
    Girish

  • How to get the Horizontal Scroll Bar for a Table?

    Hi All,
    As per my requirement, I am displaying several records in a Screen in a Tabular Format. But here I have to show 21 Columns in that table which is too high. I am able to display it but due to it I am getting a Horizontal scroll bar for the whole screen since all the columns are not getting displayed in the normal window screen space. But its looking too odd since once I am scrolling it to right the columns are getting displayed but the above Header Bar and Global buttons are not displaying, they are bound to the normal screen space.
    Is there a way to have a Horizontal scroll bar only for that table instead of the entire screen so that on scrolling that bar only the table rows will beshifted ant got displayed?
    With Thanks
    Kumar Gautam

    try this approach.
    include a raw text item before and table item.
    include the appropriate HTML tags in raw text item to enable horizontal scroll
    --Prasanna                                                                                                                                                                                                                                                                                                                                   

  • How to find out last updatde timestamp for a table

    Hi All,
    I want to find out the last updated time stamp of a table. Is there some thing available with the sys tables. Is there something can be done with user_objects.
    Or, is there any need to write pl/sql code to get the last updated timestamp for a table.
    Please provide some inputs.
    regards,
    Naresh

    Hi Oleg,
    Select * from user_objects.I belieive it gives you the last_ddl_time not the time a update or delete was done.
    Not sure if we have this feature in any new release.
    I am working on Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
    to the OP
    I will suggest if you planto audit then use the audit feature based on your DB version.
    Or to make it more simple have a column called modified_date and update this column whenever you update the record.
    Regards,
    Bhushan

  • How to Use Detail Region in Table Input for Advanced Tables

    Hi, I have a requirement to have an editable table mapped to a VO with 30-40 fields.
    User does not want horizontal scrolling, so it is important to enable user input in the detail region of the advanced table
    The problem is whenever the detail link is clicked the table bean submits and validates the VO immediately even if there are required fields to be filled inside the detail region.
    How do I stop the table region from submitting everytime detail link is clicked?

    Note: There is not disable Server side validation in advanced table properties

  • How to get control on each row in advance table

    hi, i have a advanced table with some data, in each row i have two radio buttons which i need to set depending on some column value in the row, i tried by following code
    for(SoftCompVORowImpl row2 = (SoftCompVORowImpl)svo.first();row2!=null;row2=(SoftCompVORowImpl)svo.next())
    if(row2.getAttribute("CommitEndDate")==null || row2.getAttribute("CommitEndDate").equals(""))
    onetime.setSelected(true);
    recurring.setSelected(false);
    else
    onetime.setSelected(false);
    recurring.setSelected(true);
    but this code is making set only one radio button (onetime), which ever i am making first true its getting selected, i need to know how to get control of each row....

    Babu,
    Basically you should use the decode function in your sql query itself and attach it with BC4J properties of radio buttons.In that case you don't have to worry about setting them declaratively !
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • HP Color LaserJet Pro MFP M177fw Scanning

    I bought and jsut setup an HP Color LaserJet Pro MFP M177fw.   We are a Mac household, and we connect via wireless to the printer, which works great.  My issue is scanning.  On the little screen on the printer, I can copy, print and even fax.  No opt

  • How do I connect my new MacBook Pro with my wireless printer?

    New to Apple products, and can't figure out how to wirelessly connect to my printer.  I am assuming that it has that capacity....but can't find a way.  I have an HP officejet 4500 wireless printer. Appreciate the help.

  • Problems with Droid Razr

    I sent a couple of message to my e-mail from my phone. Shortly on after that night I got a thing on the top of my phone saying that there is 4 items waiting to upload and Remote device offline. I have no idea what this could possibly be. Everytime I

  • Optimal configuration for inspire 5700

    I juz bought a inspire 5700 and a audigy 2 ZS. Currently i am using the digital connection through the Digital Din input on the decoder from the Digital out of the soundcard. However, when i m playing mp3, only the centre and front speakers are worki

  • Can I alter the properties of an individual link on a HTML page without changing the other links?

    Hi there, I have a contact page created in Dreamweaver and have created an email link to launch Outlook when clicked on. However, all the links in my design have been set a certain way, i.e. white text knocked out of darker background. My email link