Dynamic Component in Table Column

JDev 11.1.1.6
Can anyone give me guidance on how to change the component that a table column uses at runtime?
Basically, I want to have an Input Text on Column B when the value on the Output Text on Column A is within a list of strings.
Otherwise, I want to have an image on Column B.
Here is the long-winded scenerio:
I have a table with 2 columns (Column A and Column B).
Column A is an OutputText.
Column B is an InputText.
The user is only allowed to enter data into Column B when Column A is 'A', 'B', or 'C'.
If Column A is something other than 'A', 'B', or 'C', I would like to display an image in Column B that alerts the user that they cannot enter any data in this field.
I tried making the InputText read only, but that doesn't look very good.
Any help would be appreciated.
Ray

You can add image component to the same column and use rendered property on both af:inputText and af:image to show/hide them.
Dario

Similar Messages

  • Dynamic iterating over table columns

    hello there,
    i have to create a string depending on the values in my table columns. this string creation is used on different tables with different number of columns and different column types.
    so i want to write a procedure which does simplified the following:
    1. create dynamic rowtype with a select statement
    2. iterate over rowtype columns and append column value to a string
    3. insert the created string in another table.
    by trying this dynamically for any table i run in the following two issues:
    1. creation of a rowtype needs the tabletype
    2. no iterating over rowtype possible
    are their any ideas to solve this issue. or do i have to write a procedure for every table i use.
    regards,
    rené

    You can do it with a single, generic procedure using DBMS_SQL.
    Joe Fuda
    SQL Snippets

  • Dynamic binding for table column

    Hi,
    I am using standard application and in a table (not ALV) i want to chnage the name of a column. Already a OTR is placed in it so am planning to do a dynamic bind for the text in the header. Kindly suggest ways.
    Thanks,
    Koushik

    DATA:
            l_caption          TYPE string,
            l_title            TYPE string.
      data lr_caption type ref to cl_wd_caption.
    *---Get OTR Text for Value Description
      CALL METHOD cl_wd_utilities=>get_otr_text_by_alias
        EXPORTING
          alias      = 'ZPERF_MGMT_DEV/RATING'
      language   =
        RECEIVING
          alias_text = l_title.
    lr_caption ?= view->get_element( 'TBL_VAL_HELP_DESCRIPTION_HEADER' ).
    lr_caption->set_text( value = l_title ).

  • Problem with adf table when adding component in table column.

    Hi All,
    i am using jdev version 11.1.1.5.0.
    use case: i have created one adf table which is based on DC VO. now i have added one select one radio group component(which contain 4 radio button approved ,reject,back,None) in adf table.
    table have many rows for example in first row i have select approved and to next row i have select reject now when i get value of radio group in backing bean using component binding i got last selected value.(in that case reject).
    And second is that when i set radio button value for current row using binding like
    rb.setValue("R") then reject option selected for all rows.
    so my question is that-
    how can i get and set value of select one radio group in row level using component binding.

    Hi,
    I don't see a reason for not using a transient attribute for the radioGroup in your previous reply.
    Here is the example i tried.
                            <af:selectOneRadio label="#{bindings.DeptView1.hints.DeptnoRadio.label}" id="sor1"
                                    value="#{row.bindings.DeptnoRadio.inputValue}">
                                <af:selectItem label="A" value="A" id="si1"/>
                                <af:selectItem label="B" value="B" id="si2"/>
                                <af:selectItem label="C" value="C" id="si3"/>
                                <af:selectItem label="D" value="D" id="si4"/>
                                <af:selectItem label="E" value="E" id="si5" disabled="#{row.bindings.EnableDisable.inputValue}"/>
                            </af:selectOneRadio>Where DeptnoRadio is the transient attribute i've created (which will have some random values between A and E), and EnableDisable is another transient variable of boolean type which would return true or false based on some condition.
    Now, for every row, the value is different (and corresponding radio button is selected) and for a row, which matches the condition, the option E is disabled.
    -Arun

  • Open a Dynamic URL from a Table column link

    Hi,
    Jdev Version (11.1.1.6.0)
    I have requirement to open a dynamic URL from table column. Any time I click on link, it should generate dynamic URL based on column attribute and open in popup or browser. Can someone pls suggest how to achieve this.
    Thanks
    Ank

    1)If you have any parameters that needs to be passed to build that dynamicURL, just set a propertyListener on the column attribute and get the value.
    2)Then on the af:commandLink action, build your dynamicURL with the required parameters.
    3) If you URL is all together a different application which doesn't share your transaction, you can open it as below
    In the below code, urlWithParams will be your dynamicURL.
    ExtendedRenderKitService erks =
    Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
    StringBuilder sbURL = new StringBuilder();
    sbURL.append("window.open(\"" + urlWithParams + "\");");
    erks.addScript(facesContext, sbURL.toString());
    You can also try the above response by user 948181.
    Hope it helps.

  • Dynamically changing the Advance table column Header.

    Dear All,
    I want to change dynamically the Advance table column header.
    I tried the below code and its working process request,not in process form request when button pressing.
    Please suggest me.
             OAAdvancedTableBean tableBean =
                               (OAAdvancedTableBean)webBean.findIndexedChildRecursive("advanceTableRN");
                           if (tableBean != null) {
                           System.out.println("tableBean");
                               OAColumnBean columnBean =
                                   (OAColumnBean)tableBean.findIndexedChildRecursive("column3");
                               if (columnBean != null) {
                                   System.out.println("columnBean");
                                   OASortableHeaderBean colHeaderBean =
                                       (OASortableHeaderBean)columnBean.getColumnHeader();
                                   if (colHeaderBean != null) {
                                       System.out.println("colHeaderBean");
                                       colHeaderBean.setText("Segment3");

    You can try 2 options:
    1. Try to call pageContext.forwardImmediatlytoCurrentPage();
    2. Try yo set a vo attribute to the columnbean text property and set the vo attribute programmatically. (I have not tried this but I think it should work)
    Cheers
    AJ

  • How to control internal table columns dynamically based on input

    i have 2 fields in the selection screen - user and tcode
    we can give any number of tcodes as in put
    based on requirement i need to display all the tcodes belongs to one user in one row
    in other words
    the out put table columns should increase dynamically based on number of tcodes entered
    in the input
    how to do this?
    Edited by: tummala swapna on Apr 7, 2009 11:55 AM

    This may be useful to you..
    FIELD-SYMBOLS : <FS_TABLE> TYPE ANY TABLE.
    DATA: DREF TYPE REF TO DATA,
          WA_DREF TYPE REF TO DATA,
          DY_LINE TYPE REF TO DATA,
          ITAB_TYPE TYPE REF TO CL_ABAP_TABLEDESCR,
          WA_TYPE TYPE REF TO CL_ABAP_STRUCTDESCR,
          STRUCT_TYPE TYPE REF TO CL_ABAP_STRUCTDESCR,
          ELEM_TYPE TYPE REF TO CL_ABAP_ELEMDESCR,
          COMP_TAB TYPE CL_ABAP_STRUCTDESCR=>COMPONENT_TABLE,
          COMP_FLD TYPE CL_ABAP_STRUCTDESCR=>COMPONENT,
          OTAB TYPE ABAP_SORTORDER_TAB,
          OLINE TYPE ABAP_SORTORDER.
    BEGIN DYNAMIC STRUCTURE FOR FINAL INTERNAL TABLE @@@@@@@@@@@@@@@@@@
    STRUCT_TYPE ?= CL_ABAP_TYPEDESCR=>DESCRIBE_BY_NAME('table or structure name').
    COMP_TAB = STRUCT_TYPE->GET_COMPONENTS( ).
    STRUCT_TYPE = CL_ABAP_STRUCTDESCR=>CREATE( COMP_TAB ).
    ITAB_TYPE = CL_ABAP_TABLEDESCR=>CREATE( STRUCT_TYPE ).
    CREATE DATA DREF TYPE HANDLE ITAB_TYPE.
    ASSIGN DREF->* TO <FS_TABLE>.
    END DYNAMIC STRUCTURE FOR FINAL INTERNAL TABLE @@@@@@@@@@@@@@@@@@

  • Nested Composite Component Doesn't work for table column

    I have reported this issue as defect 1541 but I'm hoping someone my have a suggestion on a work around for this. Here is the issue
    I am attempting to use composites to represent a table column. I have tried this with both IceFaces and the standard implementation. I have a custom component that is of type UIColumn that is being inserted into another composite that houses a table. The table renders and the column renders. However, the outputText that should represent the row data does not render. Interestingly this will render using composites when I don't have the column rendering as a composite (IE the table is contained in the composite and the row level output is contained in the top level page.). That is not my requirement though. This seems to be a tough cookie to crack. I have the source now and am starting to acquaint myself with it in an attempt to figure out what is going on. Any brilliant ideas out there?
    Code is below.
    tableColumn.xhtml
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:ice="http://www.icesoft.com/icefaces/component"
    xmlns:composite="http://java.sun.com/jsf/composite">
    <h:head>
    </h:head>
    <h:body>
    <composite:interface componentType="MyColumn">
    </composite:interface>
    <composite:implementation>
    <ice:column headerText="Make" id="column3">
    <composite:insertChildren />
    </ice:column>
    </composite:implementation>
    </h:body>
    </html>
    table.xhtml
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:ice="http://www.icesoft.com/icefaces/component"
    xmlns:composite="http://java.sun.com/jsf/composite">
    <h:head>
    <title></title>
    </h:head>
    <h:body>
    <composite:interface>
    </composite:interface>
    <composite:implementation>
    <ice:dataTable augmentTitle="false"
    rows="10"
    value="#{SessionBean1.carDataProvider.tableDisplayList}"
    var="item" >
    <composite:insertChildren />
    </ice:dataTable>
    </composite:implementation>
    </h:body>
    </html>
    Example Page
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:ice="http://www.icesoft.com/icefaces/component"
    xmlns:temp="http://java.sun.com/jsf/composite/tempcomp"
    <h:head id="outputHead1">
    </h:head>
    <h:body>
    <ice:form id="form1">
    <temp:table>
    <temp:tableColumn>
    <ice:outputText id="outputText3" value="#{item.make}"/>
    </temp:tableColumn>
    </temp:table>
    </ice:form>
    </h:body>
    </html>
    The the new UIMyColumn class
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package icefacestestapp2;
    import com.icesoft.faces.component.ext.UIColumn;
    import javax.faces.component.FacesComponent;
    @FacesComponent(value = "MyColumn")
    public class MyColumn extends UIColumn {
    @Override
    public String getFamily() {
    return "custom";
    Interestingly the row text will not render even if I add it directly to the new
    composite column class as seen below.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:ice="http://www.icesoft.com/icefaces/component"
    xmlns:composite="http://java.sun.com/jsf/composite">
    <h:head>
    </h:head>
    <h:body>
    <composite:interface componentType="MyColumn">
    </composite:interface>
    <composite:implementation>
    <ice:column headerText="Make" id="column3">
    <ice:outputText id="outputText3" value="#{item.make}"/>
    </ice:column>
    </composite:implementation>
    </h:body>
    </html>

    Hi,
    I recall an issue in 10.1.3.2 with inner frames that had the wrong JavaScript reference to the DOM. So I assume this to be the same in your case. So you can give it a try with JDeveloper 10.1.3.3 and see if this fixes the problem
    Frank

  • Dynamic table columns...

    hi there,
    i have a table on my webdynpro with several columns displaying values in EUR with 2 decimals.
    now my customer wants to be able to switch between EUR and Thousand-EUR. When Thousand-EUR is displayed ther should be no decimals visible anymore. How can i achieve that? in my context-node the values are defined with 2 decimals. is it possible to change types of context-attributes dynamically? or is there another way to achieve that.
    david

    Hi,
    Suppose ur text view element ID contained in a particular table column is 'TXT_VIEW_AMOUNT'.
    then you get its reference like this in domodifvview
    data: lo_text_view type ref to cl_Wd_text_view.
    lo_text_view ?= view->get_element( 'TXT_VIEW_AMOUNT' ).
    then call the corresponding bind_text method
    lo_text_view->bind_text( path = 'DATA.AMOUNT ). "here DATA.PATH is attribute path
    Hope this helps
    Regards
    Manas Dua

  • SQL from Table Column with Dynamic URL Problem

    This is the SQL I'm attempting to save to a table column via the Object Browser;
    select
    "a"."PBR_BRIEF_ID" "Brief ID",
    "a"."PROJECT_NUMBER" "Project",
    "b"."DESCRIPTION" "Description",
    "b"."ACTUAL_END_DATE" "Actual End",
    "b"."RFS_DATE" "RFS",
    "b"."LOCATION_CODE" "Location",
    ''||"b"."ESA_CODE"||'' "ESA",
    "b"."PROJECT_USER_STATUS" "Status",
    "b"."PROJECT_TRIGGER" "Trigger"
    from
    UPT1TRIAL.FUND_PLAN_BRIEF_LINK_CCR@NDSD "a",
    UPT1INTEGRAL.INT_PROJECT_DATA@NDSD "b"
    where
    "a"."PBR_BRIEF_ID" = :P3_BRIEF_ID and
    "a"."PROJECT_NUMBER" = "b"."PROJECT_DEFINITION_NUMBER"
    The intesting bit is the following, where a URL is return behind a particular column;
    ''||"b"."ESA_CODE"||'' "ESA",
    It's interesting because when I click on "Apply Changes" in the Object Browser, the text that appears in the column is as follows, i.e. with APP_ID and SESSION populated;
    ''||"b"."ESA_CODE"||'' "ESA",
    Why would that happen??
    The full SQL above is used in an application page with a SQL Query (PL/SQL function body returning SQL query). The basic SQL works OK but because of what the Object Browser is doing, the link does not.
    Message was edited by:
    Damian - apologies for lack of formatting!!
    Message was edited by:
    Damian

    Damian,
    Use
    & lt;
    for your &lt; tags and then the message will appear in the proper format.
    If you are using dynamic sql to generate an url with APP_ID and SESSSION you could:
    a) create page items (P1_APP_ID and P1_SESSION)
    b) compute those page items to the actual APP_ID and SESSION_ID
    c) use the value of those items while generating your dynamic sql (instead of APP_ID and SESSION)
    Then, your links will show the right APP_ID and the right SESSION.
    Denes Kubicek

  • Dynamic table column creation

    Hi All,
    I am trying to create a table where the number of columns is equal to the number of entries in an output table in my context. How do I go about creating columns dynamically dependant on the number of entries in a table?
    Kind regards
    Seb

    If you really need to create table columns programmatically, you can do this in the wdDoModifyView() method of the view controller.
    Store the configuration data for the columns in the view controller context and write some code like the following:
    private static void addColumn(IWDTable table, String id, String attributeName)
      IWDTableColumn column = (IWDTableColumn)
        table.getView().createElement(IWDTableColumn.class, id);
      IWDInputField editor = (IWDInputField)
        table.getView().createElement(IWDInputField.class, null);
      column.setTableCellEditor(editor);
      editor.bindValue(attributeName);
      table.addColumn(column);
    public static void wdDoModifyView(
      IPrivateXYZView wdThis,
      IPrivateXYZView.IContextNode wdContext,
      com.sap.tc.webdynpro.progmodel.api.IWDView view,
      boolean firstTime)
      //@@begin wdDoModifyView
      if (<table needs to be recreated>)
        IWDTable table = (IWDTable)      
          view.getElement(<tableID>);
        table.destroyAllColumns();
        addColumn(table, "columnA", "attributeA");
        // etc.
      //@@end
    This assumes you have created the table itself during design time and bound its data source already. If needed, this can also be done programmatically.
    Armin

  • Dynamic table column editing

    Hi,
    I made a VO with quite complex query (nested subqueries linked with inner join) and when I dragged it from Data Control to the page I didn't get the familiar context menu with implementation options I used to get it earlier.
    Instead of, I got an implemented table with following structure:
    - af:table - t3
    - af:forEach
    - af:column - #{...}
    - af:outputText - #{...}
    Did I get a dynamic table?
    My problem is that I cannot get the list of attributes from VO query and then to edit table columns.
    They are shown in table at runtime but with default properties. I can set up af:column options generally but I need to set up all of the attributes individually.
    Is this a query-level problem or there is another way doing this?
    Regards,
    Aleksandar Čkrebo

    Hi,
    I made a VO with quite complex query (nested subqueries linked with inner join) and when I dragged it from Data Control to the page I didn't get the familiar context menu with implementation options I used to get it earlier.
    Instead of, I got an implemented table with following structure:
    - af:table - t3
    - af:forEach
    - af:column - #{...}
    - af:outputText - #{...}
    Did I get a dynamic table?
    My problem is that I cannot get the list of attributes from VO query and then to edit table columns.
    They are shown in table at runtime but with default properties. I can set up af:column options generally but I need to set up all of the attributes individually.
    Is this a query-level problem or there is another way doing this?
    Regards,
    Aleksandar Čkrebo

  • Dynamic entry list used in a table column

    On a form, we noticed a dynamic entry list will limit which values a user may enter by validating against the entry list values.  We need to have the same validation occur when a dynamic entry list is used in a table column. Has anyone had success in getting the dynamic entry list to validate the cell values in a table column?

    Hey Dan,
    You are right.... Its a bug... we are also using VC CE 7.1 SP 05....
    When I try in form (with combo box) its working fine...I mean its giving error saying "Character string "4" does not exist in the allowed set of values and its not forwarding any values...
    but when I use it in table, its not giving any error.
    I saw some demos where it was working fine... but those are older sp versions of CE 7.1...
    Try to contact SAP VC team on this....
    PradeeP
    Edited by: pradeep bondla on Oct 6, 2010 12:06 AM

  • Appending column to an dynamically created internal table

    Hi folks,
    i have an dynamically created internal table <dyn_tab> which is based on a parameter p_table (  containing the table name ). now i want to add one more column to this <dyn_tab> table where i can store further information in. how can i do that ?
    i appreciate your help!

    Hi,
    Please check this sample program.
    type-pools : abap.
    field-symbols: <dyn_table> type standard table,
                   <dyn_wa>,
                   <dyn_field>.
    data: dy_table type ref to data,
          dy_line  type ref to data,
          xfc type lvc_s_fcat,
          ifc type lvc_t_fcat.
    selection-screen begin of block b1 with frame.
    parameters: p_table(30) type c default 'T001'.
    selection-screen end of block b1.
    start-of-selection.
      perform get_structure.
      perform create_dynamic_itab.     
    form get_structure.
      data : idetails type abap_compdescr_tab,
           xdetails type abap_compdescr.
      data : ref_table_des type ref to cl_abap_structdescr.
      * Get the structure of the table.
      ref_table_des ?= 
          cl_abap_typedescr=>describe_by_name( p_table ).
      idetails[] = ref_table_des->components[].
        loop at idetails into xdetails.
        clear xfc.
        xfc-fieldname = xdetails-name .
        xfc-datatype = xdetails-type_kind.
        xfc-inttype = xdetails-type_kind.
        xfc-intlen = xdetails-length.
        xfc-decimals = xdetails-decimals.
        append xfc to ifc.
      endloop.
    *Add your new field(s) into table ifc here.
    endform.
    form create_dynamic_itab.
    * Create dynamic internal table and assign to FS
      call method cl_alv_table_create=>create_dynamic_table
                   exporting
                      it_fieldcatalog = ifc
                   importing
                      ep_table        = dy_table.
        assign dy_table->* to <dyn_table>.
      * Create dynamic work area and assign to FS
      create data dy_line like line of <dyn_table>.
      assign dy_line->* to <dyn_wa>.
    endform.
    Regards,
    Ferry Lianto

  • How to create table columns dynamically ?

    Hi All,
    I am working on an SSRS report that will show sales in the past 5 years. If the user selected to view sales of past 3 years he will only see 3 columns. so How can I create table columns dynamically at run time and how can I make sure that their dimensions
    will adjust to fit the report page size.

    Hi Developer life,
    According to your description that you want to dynamically increase and decrease the numbers of the columns in the table, right?
    As Jason A Long mentioned that we can use the matrix to do this and put the year field in the column group, amount fields(Numric  values) in the details,  add  an filter to filter the data base on this column group, but if
    the data in the DB not suitable to add to the matrix directly, you can use the unpivot function to turn the column name of year to a single row and then you can add it in the column group.
    If there are too many columns in the column group, it will fit the page size automatically and display the extra columns in the next page.
    Similar threads with details steps for your reference:
    https://social.technet.microsoft.com/Forums/en-US/339965a1-8cca-41d8-83ef-c2548050799a/ssrs-dataset-column-metadata-dynamic-update?forum=sqlreportings 
    If your still have any problem, please try to provide us more details information, such as the data structure in the DB and the table structure you are currently designing.
    Any question, please feel free to let me know.
    Best Regards
    Vicky Liu

Maybe you are looking for

  • I rented a movie from my Apple TV account and it is nowhere to be found

    I was logged into my iTunes account on my Apple TV so I could bypass the technical difficulties of AirPlay or authorizing computers to play a movie. Now it's nowhere to be found. It looks like this is a reoccurring issue with apple. I already checked

  • Inserting data into a MySQL database

    Hi. I am currently working on a group project and know very little about java to be honest I'm trying to insert records into a local MySQL database, but I'm having trouble. When the application is started, a connection is made to the database, which,

  • Update to 10.4.6 results in unrepairable error on harddrive

    Responding to the software update notice, I tried to update from 10.4.5 to 10.4.6. I got a message that the installation failed. Performance started to deteriorate to the point where I could not even get Systems Preferences. I tried a restart and onl

  • How to disable back and refresh buttons in browser

    Hi, I need to disable the back and refresh buttons of the browser on the click of a button in a jsp as the process takes some time to be completed and i want to prevent the user from refreshing the screen. How can this be done? Thank you

  • Is BT Infinity good for Online Gaming...?

    I see many people on coming on complaining that they are getting many disconenctions, lag, high ping rates etc...which leads me to my question, Is BT Infinity good for online gaming?