How does Toggle Visible for a Column in a Table work ?

Hi All,
I have a question for you.
Using version 11.1.1.7:
I was playing with a use case where I need to show and hide columns in an af:table component.
I want to do this clientside using javascript.
Guess what: It works, however, it only works for hiding columns ?!
Initially I have client component = true and visible is true.
See javascript below.
When I call hideColumn, the component is found and hidden after calling.
When I call showColumns (after it is hidden) the component cannot be found anymore.
  function showColumn(evt){
      var col = AdfPage.PAGE.findComponentByAbsoluteId("pt1:pc1:t1:c9")  ;
      col.setVisible(true);    
   function hideColumn(evt){
      var col = AdfPage.PAGE.findComponentByAbsoluteId("pt1:pc1:t1:c9")  ;
      col.setVisible(false);    
    }I checked and when the columns visible property is initially false, the column is not found by AdfPage.PAGE.findComponentByAbsoluteId("pt1:pc1:t1:c9"), which means it is not available ?!
It looks like the visible property for an af:column works slightly different then for other components such as buttons.
Also makes me wonder how the panelCollection component shows and hides columns. Doesn't that component do exactly the same ?
Thanks.

Luc,
couldn't find a hint in the sources (maybe didn't spend enough time). However, one reason for this behavior would be if the hidden column had no client component created (in which case it only exists as hidden HTML). The work around I think would be to use a serverListener on the table and to pass the columns to show/hide as the payload for server side show/hide
Frank

Similar Messages

  • How to toggle visible true-false for FourColListBoxNodeWidget Column

    Hi,
    I need to know that whether there is a way by which I can toggle visibility of a column (GenericPanelWithBorderWidget) on click of a button.
    Which Interface can be used to do the same?
    The code for table and button is given below.
    Following is "fr" code for four column table:
    type FourColListBoxNodeWidget(kViewRsrcType) : PrimaryResourcePanelWidget(ClassID = kDNDTreeNodeWidgetBoss) {};
    resource FourColListBoxNodeWidget(kFourColListBoxElementRsrcID + index_enUS) {
              __FILE__, __LINE__,
              kFiveColListParentWidgetId, kPMRsrcID_None,          // WidgetId, RsrcId
              kBindLeft | kBindRight,                              // Frame binding
              Frame(5, 0, 525, 17),                              // Frame
              kTrue, kTrue,                                                  // Visible, Enabled
              "",                                                                                // Panel name
                        GenericPanelWithBorderWidget (
                                  0, kPMRsrcID_None,                    // WidgetId, RsrcId
                                  kBindNone,
                                  Frame(0,-2,106,17)           // Frame
                                  kTrue, kTrue,                              // Visible, Enabled
                                            ColListBoxTextWidget (
                                                      k5ListTW3ID, kPMRsrcID_None,                                                            // WidgetId, RsrcId
                                                      kBindLeft | kBindRight,                                                                                // Frame binding
                                                      Frame(4,3,104,17)                                                                                          // Frame
                                                      kTrue, kTrue, kAlignLeft,kEllipsizeEnd                                        // Visible, Enabled, Ellipsize style
                                            #if CSVER >= 4
                                                      kTrue, //Convert ampersands
                                            #endif
                                                      "",                                                                                                                                   // Initial text
                                                      0,                                                                                                                                   // Associated widget for focus
                                                      kTipsWindowFontId, //kPaletteWindowFontId,                              // default font
                                                      kTipsWindowFontId,//kPaletteWindowSystemScriptHiliteFontId,                                         // for highlight state.
    Similarly other 3 columns.
    Code for Expand Button
                   // Button Expand
                                                                DynamicIconButtonWidget (
                                                                          kExpandButtonWidgetID,                              // fWidgetId
                                                                          kExpandIconPNGIconRsrcID, kIBPluginPluginID,                    // fRsrcId, fRsrcPlugin
                                                                          kBindNone,//kBindLeft | kBindRight,                    // fFrameBinding
                                                                          Frame(450, 37,470,68 )                              // fFrame
                                                                          kTrue,                              // fVisible
                                                                          kTrue,                              // fEnabled
                                                                          //kIconRaisedLook,          // fStyles
                                                                          kADBEIconSuiteButtonType,
                                                                                              IID_IDYNAMICBUTTONOBSERVER,
    Regards,
    Yogesh Walke

    You can try the approach discussed in this post(assuming you are on 11.1.1.5 or higher ) - http://jobinesh.blogspot.com/2011/07/overriding-display-at-run-time.html

  • How does APEX check for null values in Text Fields on the forms?

    Hello all,
    How does APEX check for null values in Text Fields on the forms? This might sound trivial but I have a problem with a PL/SQL Validation that I have written.
    I have one select list (P108_CLUSTER_ID) and one Text field (P108_PRIVATE_IP). I made P108_CLUSTER_ID to return null value when nothing is selected and assumed P108_PRIVATE_IP to return null value too when nothign is entered in the text field.
    All that I need is to validate if P108_PRIVATE_IP is entered when a P108_CLUSTER_ID is selected. i.e it is mandatory to enter Private IP when a cluster is seelcted and following is my Pl/SQL code
    Declare
    v_valid boolean;
    Begin
    IF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := FALSE;
    ELSIF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := FALSE;
    END IF;
    return v_valid;
    END;
    My problem is it is returning FALSE for all the cases.It works fine in SQL Command though..When I tried to Debug and use Firebug, I found that Text fields are not stored a null by default but as empty strings "" . Now I tried modifying my PL/SQL to check Private_IP against an empty string. But doesn't help. Can someone please tell me how I need to proceed.
    Thanks

    See SQL report for LIKE SEARCH I have just explained how Select list return value works..
    Cheers,
    Hari

  • How does one check for Updates...

    How does one check for Updates when :
    Registration
    Deactivation
    Updates
    Menu items are greyed out! ?

    Actually, it's a timing issue. Those items are greyed out for a couple of minutes after PPro starts. A little patience and they become available. ;)
    Cheers
    Eddie
    PremiereProPedia   (
    RSS feed)
    - Over 300 frequently answered questions
    - Over 250 free tutorials
    - Maintained by editors like
    you
    Forum FAQ

  • How does creative cloud for Enterprises licensing works?

    how does creative cloud for Enterprises licensing works? witch is the method of verification of keys?
    how does it works with active directory?

    There is no difference please be aware that each login is provided with two activations however.  If you wish to have a computer at both work and home activated though that is perfectly fine as long as your employer is ok with using company software at home.

  • How to show asterisk for required fields in a table row?

    Hi Folks,
    For showing the asterisk (*) for required fields in a form, I used to give required="true" for the component and surround the component with a af:panelLabelAndMessage for which I set showRequired="true". How to do this for a component in a table row. For a component in a table, there is no label per se. The required=true flag in the component shows proper error message saying that it is required but there is no (*) for that component.
    Thanks
    Vishal

    Table does not have any required attribute.But column has showRequired property .You can used this.If column has input text then also you put required true on this component.And set your required messages there .
    It will resolve your problem
    Thanks
    Prateek

  • Why does the "fix" for firefox copying and pasting not work?

    I did the fix a few times and restarted firefox, with no success. Also, I installed the latest version of firefox and it is slower now. I have to use firefox for school, otherwise I would just find another way.

    In what way is Firefox slow?
    Is this all the time or only with loading web pages?
    What kind of fix do you mean with: ''Why does the "fix" for firefox copying and pasting not work'' ?

  • How to display total for a column in updateble report

    How can I display total on a report column?
    the query is
    select htmldb_item.checkbox(1,invoice_id) invoice_id,
    htmldb_item.DISPLAY_AND_SAVE(2,invoice_no,15)invoice_no,
    htmldb_item.DISPLAY_AND_SAVE(3,to_char(invoice_date, 'DD-MON-YYYY'),20) invoice_date,
    htmldb_item.DISPLAY_AND_SAVE(4,net_amount,15) NET_AMOUNT,
    htmldb_item.text(5,net_amount,null,10) amount_adj,
    htmldb_item.text(6,net_amount,null,10) actual_amt
    from INVOICE
    where OWNER_TYPE = 'CUSTOMER'
    and OWNER_ID = :P57_CUSTOMER_NAME
    group by invoice_id,invoice_no, invoice_date,net_amount
    In the report column attributes the sum column is checked for the sal field
    When I run the report, I get a Sub-total of 0 and a Report Total of 0. What am I doing wrong?
    thanks

    Sunil,
    Which column is the sal column? I can’t see any numeric columns in your query. If you use htmldb_item calls in your query column, then this makes them strings and you can’t build sums on string columns. If you want to build sums in an updateable report / tabular form, then don’t use the htmldb_item API. Instead use the built-in display types on the report column attributes page. Using the built-in display types is the better options in most cases anyway and they do allow you to calculate sums even if the column is a text field or display and save type field.
    Regards,
    Marc

  • How to create  index for a column of a view

    Hi,
    I have created view for a table and then i am trying to create index for a column of that view. i am using the query "CREATE INDEX index_name ON view_name (col)". but Mysql is showing error like "view_name is not a base table".
    How can i do that......

    As mentioned this is a java forum not a mysql forum, but as I know the answer - you can't create an index directly on a view in mysql.

  • How to disable sorting for some columns in a ALV GRID?

    Hi i have requirement where I have to disable sorting for some columns in a ALV GRID. i am using REUSE_ALV_GRID_DISPLAY function module.
    Can anybody help me. how to acieve this? Any code snippets will really be appreciated.

    Hi,
    I have tried this but not completely successful. I think this can be done using the OOPS method.
      DATA: it_event_exit TYPE  slis_t_event_exit.
      DATA: w_exit TYPE slis_event_exit.
      w_exit-ucomm = '&ODN'.
      w_exit-before = 'X'.
      CLEAR w_exit-after.
      APPEND w_exit TO it_event_exit.
      w_exit-ucomm = '&OUP'.
      w_exit-before = 'X'.
      CLEAR w_exit-after.
      APPEND w_exit TO it_event_exit.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program          = w_repid
          i_callback_top_of_page      = 'ALV_TOP_OF_PAGE'
          i_callback_html_top_of_page = 'ALV_HTML_TOP_OF_PAGE'
          i_callback_user_command     = 'USER_COMMAND'  <- User command form
          is_layout                   = wm_layout
          it_fieldcat                 = wt_fieldcat
          it_events                   = i_events
          it_event_exit               = it_event_exit    <- Need to fill
          it_sort                     = wt_sort
          i_default                   = 'X'
    Now you can capture this events in the user command
    FORM user_command  USING r_ucomm LIKE sy-ucomm
                             rs_selfield TYPE slis_selfield.
      IF r_ucomm = '&OUP' and rs_selfield-SEL_TAB_FIELD = 'Your field name'.
      ENDIF.
    ENDFORM.                    "user_command
    In this form you will get the function code in 'r_ucomm' and the field selected for sorting in 'rs_selfield-SEL_TAB_FIELD'. But reseting 'r_ucomm' will not work.
    May be somebody else can give some help on this.
    But this will work if you follow the oop method.
    Please see this document for more info.
    http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an easy reference for alv grid control.pdf
    Thanks
    Vinod

  • How to provide formulae for the columns in report based on date column

    Hi,
    How can we provide formulae for the columns in report, where each column is based on another Date Column.
    Can anyone suggest on this.
    Thanks

    Hi Manu,
    I think you a logical column X on which you created another Logical Column Y.
    Now you want 'Y' to be filtered based on Date Column.
    1. If, my assumption is right - You can do your requirement i.e. Filtering the logical col. 'Y' on Reports.
    Else,
    2. See - Your Logical column 'Y' While creating log. column 'Y' make sure you use any expression builder to filter across Date column. (i.e. using any case statements or where clause).
    Else,
    3. Make sure your First Logical column comes from Table by default (i.e. Create the same col. in d/b so it would be your Physic col. )
    Thank you.
    Edited by: GRK on Jan 28, 2013 7:48 AM

  • How to put colours for a column in ALV

    Dear All,
    I need to put green colour for 1 column in an ALV report.
    Can anybody tell me how we can do that ...
    Thanking you in advance,
    Shankar

    Here's a little sample program.....  this illistrates coloring at the column, row, and cell level.
    report zrich_0002 .
    * Use of colours in ALV grid (cell, line and column)            *
    * Table
    tables : mara.
    * Type
    types : begin of ty_mara,
              matnr         like mara-matnr,
              matkl         like mara-matkl,
              counter(4)    type n,
              free_text(15) type c,
              color_line(4) type c,           " Line color
              color_cell    type lvc_t_scol,  " Cell color
    end of ty_mara.
    * Structures
    data  : wa_mara     type ty_mara,
            wa_fieldcat type lvc_s_fcat,
            is_layout   type lvc_s_layo,
            wa_color    type lvc_s_scol.
    * Internal table
    data : it_mara     type standard table of ty_mara,
           it_fieldcat type standard table of lvc_s_fcat,
           it_color    type table          of lvc_s_scol.
    * Variables
    data : okcode like sy-ucomm,
           w_alv_grid          type ref to cl_gui_alv_grid,
           w_docking_container type ref to cl_gui_docking_container.
    parameters : p_column as checkbox,
                 p_line   as checkbox,
                 p_cell   as checkbox.
    at selection-screen output.
      perform get_data.
      perform fill_catalog.
      if w_docking_container is initial.
        perform create_objects.
      endif.
    *&      Form  create_objects
    form create_objects.
      create object w_docking_container
        exporting
          ratio                       = 60
        exceptions
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5
          others                      = 6.
      create object w_alv_grid
        exporting
          i_parent          = w_docking_container.
    * Field that identify color line in internal table
      move 'COLOR_LINE' to is_layout-info_fname.
    * Field that identify cell color in inetrnal table
      move 'COLOR_CELL' to is_layout-ctab_fname.
      call method w_alv_grid->set_table_for_first_display
        exporting
          is_layout                     = is_layout
        changing
          it_outtab                     = it_mara
          it_fieldcatalog               = it_fieldcat
        exceptions
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          others                        = 4.
    endform.
    *&      Form  get_data
    form get_data.
      select * from mara up to 5 rows.
        clear : wa_mara-color_line, wa_mara-color_cell.
        move-corresponding mara to wa_mara.
        add 1                   to wa_mara-counter.
        move 'Blabla'           to wa_mara-free_text.
        if wa_mara-counter = '0002'
        and p_line = 'X'.
    * Color line
          move 'C410' to wa_mara-color_line.
        elseif wa_mara-counter = '0004'
        and p_cell = 'X'.
    * Color cell
          move 'FREE_TEXT' to wa_color-fname.
          move '6'         to wa_color-color-col.
          move '1'         to wa_color-color-int.
          move '1'         to wa_color-color-inv.
          append wa_color to it_color.
          wa_mara-color_cell[] = it_color[].
        endif.
        append wa_mara to it_mara.
      endselect.
    endform.
    *&      Form  fill_catalog
    form fill_catalog.
    * Colour code :                                                 *
    * Colour is a 4-char field where :                              *
    *              - 1st char = C (color property)                  *
    *              - 2nd char = color code (from 0 to 7)            *
    *                                  0 = background color         *
    *                                  1 = blue                     *
    *                                  2 = gray                     *
    *                                  3 = yellow                   *
    *                                  4 = blue/gray                *
    *                                  5 = green                    *
    *                                  6 = red                      *
    *                                  7 = orange                   *
    *              - 3rd char = intensified (0=off, 1=on)           *
    *              - 4th char = inverse display (0=off, 1=on)       *
    * Colour overwriting priority :                                 *
    *   1. Line                                                     *
    *   2. Cell                                                     *
    *   3. Column                                                   *
      data : w_position type i value '1'.
      clear wa_fieldcat.
      move w_position to wa_fieldcat-col_pos.
      move 'MATNR'    to wa_fieldcat-fieldname.
      move 'MARA'     to wa_fieldcat-ref_table.
      move 'MATNR'    to wa_fieldcat-ref_field.
      append wa_fieldcat to it_fieldcat.
      add 1 to w_position.
      clear wa_fieldcat.
      move w_position to wa_fieldcat-col_pos.
      move 'MATKL'    to wa_fieldcat-fieldname.
      move 'MARA'     to wa_fieldcat-ref_table.
      move 'MATKL'    to wa_fieldcat-ref_field.
    * Color column
      if p_column = 'X'.
        move 'C610'     to wa_fieldcat-emphasize.
      endif.
      append wa_fieldcat to it_fieldcat.
      add 1 to w_position.
      clear wa_fieldcat.
      move w_position to wa_fieldcat-col_pos.
      move 'COUNTER'  to wa_fieldcat-fieldname.
      move 'N'        to wa_fieldcat-inttype.
      move '4'        to wa_fieldcat-intlen.
      move 'Counter'  to wa_fieldcat-coltext.
      append wa_fieldcat to it_fieldcat.
      add 1 to w_position.
      clear wa_fieldcat.
      move w_position  to wa_fieldcat-col_pos.
      move 'FREE_TEXT' to wa_fieldcat-fieldname.
      move 'C'         to wa_fieldcat-inttype.
      move '20'        to wa_fieldcat-intlen.
      move 'Text'      to wa_fieldcat-coltext.
      append wa_fieldcat to it_fieldcat.
    endform.
    Regards,
    Rich HEilman

  • How does jmf support for avi format

    I have written code to play audio and video filesusing JMF..My code is able to run only in mp3 and other 2 formats, but it is failed to run other formats like avi, mov etc..Now i need to play my video file which is their in avi format. Please tell me how does my code supports in other formats too...I had searched in google and it has given me some sites, but i didnt get any solution from them.

    Ok, I rant about this same thing again
    AVI is a file format. Think of it like a can. Either you have a can openor or not, but just because you have the ability to open the can doesn't mean you can necessarily eat what's inside.
    AVI is simply a file format that you can embed audio and video data into. The video itself is going to be encoded using some video encoding, like, RGB or DivX or something like that.
    JMF supports the AVI filetype, but it only supports a few video encodings for the AVI.
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/formats.html]
    Same with MOV files. Again, a filetype. You need to make sure the encoding inside the file is supported by JMF, otherwise it won't be able to play it.

  • How does B2B Adapter for Inbound operation for SOA Composite works

    Hai,
    I am new to B2B. can any one share samples or links or doc's on B2B Adapter for inbound operation (receive)?
    Can any one share B2B inbound channel configuration ?

    1. How does the above can be achieved using JMS protocol?Where would you like to pitch-in JMS? You want to receive inbound message at B2B over JMS or between SOA and B2B, you want to use JMS?
    For receiving inbound message at B2B over JMS, please create a non-internal listening channel at B2B. Make sure to set JMS headers -
    http://docs.oracle.com/cd/E23943_01/user.1111/e10229/app_interface.htm#CACDFEAE
    For using JMS between, SOA and B2B, create a JMS channel in Host TP profile and add it in the inbound agreement (for inbound scenario). For outbound scenario, create an internal listening channel and make sure that from back-end, headers mentioned on above link, are being set.
    2. Will SOA Composite having B2B Adapter receive operation has first operation can get triggered automatically or not as soon as EDI----->XML message is found?Yes, it can be triggered. Provided the steps in your another thread.
    3. will B2B Adapter receive operation in SOA Composite will take EDI--------> xml msg as opaque?No, if while modelling B2B adapter, you selected a doc-def otherwise yes.
    Regards,
    Anuj

  • How does Creative Cloud for teams work with staff who work in two locations ie in the office/home

    How does Creative Cloud from teams work with staff who work in two locations i.e. in the office and home?

    There is no difference please be aware that each login is provided with two activations however.  If you wish to have a computer at both work and home activated though that is perfectly fine as long as your employer is ok with using company software at home.

Maybe you are looking for

  • Satellite M100 - TFncKy crashing as soon as Windows logs on

    Been having this problem with only one of the user accounts on my M100, the other account doesn't have the problem. As soon as I am logged in to Windows a message pops-up that TFncKy has unexpectedly quit (send error report, don't send error report,

  • Synching Issues with Self-Paced Learning and Embedded Flash Files

    Hi Everyone, I'm having some issues with my files not properly synching or displaying when Self-Paced Learning is active. Here is my set-up: Captivate 5 5 separate Captivate files combined using the Aggregator Each Captivate file is about 15 slides E

  • Event Library will not show External HD with the current project.

    Problem opening the project I'm working on...I start FCPX and the Event Library quickly shows the external hd with the current project I want but only for a slit second, then it fires up a error message(the I can't possibly read) and acts as if the h

  • SaveAS() not generating better quality images

    Hi I created jpegs of a pdf, however the quality is bad. Is there a way to improve the quality? jsObj.saveAs("FILENAME.PDF" & ".jpg", "com.adobe.acrobat.jpeg")

  • Menu not showing Workspace

    When I login to Workspace, the menu option to get to 'Dimension Library' is not accessible every time, when ti's not I have to logout/login to get itback. Is this an IE config option? Thanks, Jz