Change Item Type at Run Time!!

Hi all,
I am using apex 4.0, and I want to know if their is any plug-in that can help me to change the type of an item at run time.
what exactly i want to do is to change the type of an item according to the value of a select list, for example when the user select a specific value from the select list,this item should be displayed as a date piker.
so, can any one help me?
thanks in advance,
Ola,

Hi,
Here is sample
https://apex.oracle.com/pls/otn/f?p=40323:81
When you select "Date" from select list and submit Field is changed to datepicker.
I did create select list P81_SELECT with static LOV
STATIC2:Text;T,Date;DNormal text item P81_FIELD and to page JavaScript Execute when Page Loads
if($v('P81_SELECT')=='D'){
$('#P81_FIELD').datepicker({showOn:'both',buttonImage:'#IMAGE_PREFIX#asfdcldr.gif',buttonImageOnly:true});
}Regards,
Jari

Similar Messages

  • How to bind chart type at run time

    Hi,
    I want to select chart type at run time using a drop down , i know the class name (CL_WD_BUSINESS_GRAPHICS) which
    has to be bind. but iam unable to bind the class.
    can any one help me.

    Hi,
    **... check view exists
    check me->if_salv_wd_view~r_view is bound.
    *... get wd root uie for adding graphic control uie
      data:
        lr_wd_root type ref to cl_wd_transparent_container.
      lr_wd_root ?= me->if_salv_wd_view~r_view->get_element( if_salv_wd_comp_table_ui=>c_uie_root ).
      check lr_wd_root is bound.
    *... use a group container
      data:
        lr_wd_group type ref to cl_wd_group.
      lr_wd_group ?= me->if_salv_wd_view~r_view->get_element( if_salv_wd_comp_table_ui=>c_uie_graphic_container ).
    *... if wd uie group container does not exist create group container
      if lr_wd_group is not bound.
        lr_wd_group = me->if_salv_wd_comp_table_ui~create_graphic_container( ).
      endif.
    *... get wd uie graphic
      value ?= me->if_salv_wd_view~r_view->get_element( if_salv_wd_comp_table_ui=>c_uie_graphic ).
    *... if wd uie graphic does not exist create graphic
      if value is not bound.
        data:
          l_source_category type string,
          l_source_series   type string,
          l_source_point    type string.
        concatenate if_salv_wd_comp_table_data=>c_name_node_graphic '.'
                    if_salv_wd_comp_table_data=>c_name_node_graphic_category
                    into l_source_category.
        concatenate if_salv_wd_comp_table_data=>c_name_node_graphic '.'
                    if_salv_wd_comp_table_data=>c_name_node_graphic_series
                    into l_source_series.
        concatenate if_salv_wd_comp_table_data=>c_name_node_graphic '.'
                    if_salv_wd_comp_table_data=>c_name_node_graphic_series '.'
                    if_salv_wd_comp_table_data=>c_name_node_graphic_point
                   into l_source_point.
        value = cl_wd_business_graphics=>new_business_graphics(
                  view                 = me->if_salv_wd_view~r_view
                  id                   = if_salv_wd_comp_table_ui=>c_uie_graphic
                  bind_category_source = l_source_category
                  bind_series_source   = l_source_series ).
        data:
          l_bind_value type string.
        data:
          lr_wd_category type ref to cl_wd_category.
        concatenate l_source_category '.' 'LABEL' into l_bind_value.
        lr_wd_category = cl_wd_category=>new_category(
                           view             = me->if_salv_wd_view~r_view
                           bind_description = l_bind_value
                           bind_tooltip     = l_bind_value ).
        value->set_category( lr_wd_category ).
        data:
          lr_wd_series type ref to cl_wd_series.
        concatenate l_source_series '.' 'LABEL' into l_bind_value.
        lr_wd_series = cl_wd_series=>new_series(
                         view              = me->if_salv_wd_view~r_view
                         bind_point_source = l_source_point
                         bind_label        = l_bind_value
                         bind_tooltip      = l_bind_value ).
        value->add_series( lr_wd_series ).
        data:
          lr_wd_point type ref to cl_wd_point.
        concatenate l_source_point '.' 'LABEL' into l_bind_value.
        lr_wd_point = cl_wd_point=>new_point(
                        view              = me->if_salv_wd_view~r_view
                        bind_value_source = l_source_point
                        bind_label        = l_bind_value
                        bind_tooltip      = l_bind_value ).
        lr_wd_series->set_point( lr_wd_point ).
        data:
          lr_wd_value type ref to cl_wd_numeric_value.
        concatenate l_source_point '.' 'VALUE' into l_bind_value.
        lr_wd_value = cl_wd_numeric_value=>new_numeric_value(
                        view       = me->if_salv_wd_view~r_view
                        bind_value = l_bind_value ).
        lr_wd_point->add_value( lr_wd_value ).
        me->if_salv_wd_comp_table_ui~add_child_to_container(
          r_container = lr_wd_group
          r_child     = value ).
      endif.

  • How to determine itab type at run time

    I need to write a subroutine that organizes data in internal tables for presentation by a smartform. There are a few similarly structured internal tables all with the same field name ("recipe_type") by which the data is sorted. My problem is that how I can determine the type of the itab inside my subroutine at run time? Is it ever possible in ABAP?
    The subroutine code is attached below. Thanks for any help.
    FORM beautify_itab    TABLES itab_in TYPE table
                                     USING v_type TYPE any
                                     CHANGING itab_out TYPE table.
    Data declaration
      DATA: v_data_row LIKE LINE OF itab_in,                " THIS WON'T COMPILE!
                 v_blank_row LIKE LINE OF itab_in.              " blank row
    Organize the display of the table data
      LOOP AT itab_in INTO v_data_row.
        IF v_type <> itab_in-recipe_type.                     " 'recipe_type' is the sort key for the incoming itabs
          v_type = itab_in-recipe_type.
          IF sy-tabix > 1.
            APPEND v_blank_row TO itab_out.
          ENDIF.
          APPEND v_data_row TO itab_out.
        ELSE.
          CLEAR v_data_row-recipe_type.
          APPEND v_data_row TO itab_out.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    "beautify_itab

    The following code does what I want, but only if the input itab structure is declared first in the program. It won't work if the itab is declared as itab_in TYPE TABLE OF sflight. This is because the function 'GET_COMPONENTS_LIST'  only can load the structure of a field declared explicitly in the program.  Does anybody know of any method to load the structure of an itab based off a dtab? 
    Thanks you guys for answers. Points have been rewarded.
    *& Report  Z_GET_ITAB_TYPE_AT_RUN_TIME
    REPORT  z_get_itab_type_at_run_time.
    DATA: BEGIN OF itab_in OCCURS 0,
             seatsocc_b LIKE sflight-seatsocc,
             fldate LIKE sflight-fldate,
          END OF itab_in,
          itab_out TYPE TABLE OF string,
          wa_itab_out TYPE string.
    SELECT seatsocc_b fldate
    INTO TABLE itab_in
    FROM sflight
    WHERE carrid = 'AA' AND
          connid = '0017'
    ORDER BY seatsocc_b.
    PERFORM beautify_itab
                TABLES
                   itab_in
                USING
                   sy-repid
                   'itab_in'
                   'SEATSOCC_B'
                CHANGING
                   itab_out.
    LOOP AT itab_out INTO wa_itab_out.
      WRITE: / wa_itab_out.
    ENDLOOP.
    *&      Form  beautify_itab
          text
         -->ITAB_IN    text
         -->V_KET_FIELD   text
         -->ITAB_OUT   text
    FORM beautify_itab TABLES itab_in TYPE table
                       USING  v_prog_name LIKE sy-repid
                              v_itab_in_name TYPE any
                              v_key_field_name TYPE rstrucinfo-compname
                       CHANGING  itab_out TYPE table.
      DATA: itab_fields TYPE TABLE OF rstrucinfo,
            v_field_name LIKE rstrucinfo-compname,
            v_old_key TYPE string,
            v_field_value TYPE string,
            v_data_line TYPE string,
            v_tabix LIKE sy-tabix,
            c_blank_row TYPE string VALUE ''.
      FIELD-SYMBOLS: <fs_field>,
                     <fs_data_line>,
                     <fs_field_list> TYPE  rstrucinfo.
    gets all of the components of a structure
      CALL FUNCTION 'GET_COMPONENT_LIST'
        EXPORTING
          program    = v_prog_name
          fieldname  = v_itab_in_name
        TABLES
          components = itab_fields.
      LOOP AT itab_in ASSIGNING <fs_data_line>.
        v_tabix = sy-tabix.
        LOOP AT itab_fields ASSIGNING <fs_field_list>.
          v_field_name =  <fs_field_list>-compname.
          ASSIGN COMPONENT v_field_name OF STRUCTURE
                        <fs_data_line> TO <fs_field>.
          v_field_value = <fs_field>.
          IF v_key_field_name = v_field_name.
            IF v_old_key <> v_field_value.
              v_old_key = v_field_value.
              IF v_tabix > 1.
                APPEND c_blank_row TO itab_out.
              ENDIF.
            ELSE.
              CLEAR v_field_value.
            ENDIF.
          ENDIF.
          CONCATENATE v_data_line v_field_value INTO v_data_line
                      SEPARATED BY space.
        ENDLOOP.
        APPEND v_data_line TO itab_out.
        CLEAR v_data_line.
      ENDLOOP.
    ENDFORM.                    "beautify_itab

  • [CS4 Mac] Change PictureWidget image at running time.

    Hello,
    I have a PictureWidget on a panel - by default it displays a PNG file loaded from resources.
    It can also display error icons when a query fails - etc: these icons are loaded from plugin's 'PICT' resources.
    So far so good.
    Now - when a query doesn't fail it would need to display an image stored as a 'PICT' file on a server: the query result is telling me which 'PICT' file is to be displayed in the PictureWidget.
    For QXP I was using DrawPicture() to draw the PicHandle directly in the item rectangle.
    Switching it to InDesign - I am looking for a recipe to achieve same result but following InDesign SDK means and spirit.
    In other words - how do we change a PictureWidget image at running time in order to display a PICT files from server instead of built-in default PNG or 'PICT' resources.
    Any pointer or direction to achieve this would be very much appreciated indeed.
    Best regards
    Patrick Perroud

    Hi,
    I have to add a image on a dialog, I am able to add a image on Windows by associating a image resource ID with image path in .rc file. But not able to do the same on mac. How can we associate image resource ID with image path on MAC?
    Thanks in advance.

  • Read Data's from the Form step type at run time

    Hi Experts,
    I have the 'Form' step type in my workflow and it will displays some values at the Run time. In this form I have one IO field called 'Comments'. So at the runtime manager can Enter the comments on it.
    Now my need is I need to get the 'Comments' data from that form. How can I get this value?
    Thanks in Advance,
    Helps will be Appreciated..

    I got the solution.
    Thanks All..

  • How to change the skin at run time

    I am using jDeveloper 11.1.1.3 for ADF.
    My UseCase: i want to give a dropdown for skins. User should be able to select the skin at run time and it should be loaded. Please let me know how can i achieve it.
    Zee

    As per usecase, looks like you have the LOV containing the different skins.
    You can ensure that the application is skinned according to the selected value in the LOV.
    Ensure that you have a session scope variable that is set, whenever you change the LOV.
    For more details, look into this link http://download.oracle.com/docs/cd/E14571_01/web.1111/e10140/skinning.htm
    Thanks for your reply, but then...... what will be the skin loaded by default before the user selects the skin - drop down. Do i have to set something default before hand .?Define the LOV such that there are no empty elements. i.e the first element in the LOV is selected.
    In the Managed bean, if the session scope is not set, return the skin family for the first element. This would be the scenario when the application loads.
    Thanks,
    Navaneeth

  • Change display pattern at  run time

    I have a date/time field which has display pattern set as MM/DD/YYYY...
    During run time, if user clicks on a check box...the display should change to DD/MMM/YYYY...How can i do that?

    You can do this with a little bit of script on your check box's Click event (in FormCalc in this example):
    if ($ == 1) then
    DateTimeField1.format.picture = "DD/MMM/YYYY"
    else
    DateTimeField1.format.picture = "MM/DD/YYYY"
    endif
    The trick is to know that in XFA, what Designer refers to as the "Display" picture is the <format> node which contains a <picture> which, in turn, contains the "display" picture; or, the picture used to
    format the field's value for display purposes.
    I've attached a sample form which demonstrates this.
    Stefan
    Adobe Systems

  • Warning when casting object into generic type at run time.

    I am getting this message when casting an object at run time:
    Type safety: The cast from Object to Tree<V> is actually checking against the erased type TreeI'm overloading an equals(Object o) method in my class.
    Is there a way to get rid of the warning (besides turning the warning off :))

    I'm overloading an equals(Object o) method in my
    class.
    Is there a way to get rid of the warning (besides
    turning the warning off :))No. The best you can do is what is demonstrated in the previous link.

  • How to clear this type of run time error

    good eve,
    i am migrating sql server procedures to oracle procedures
    i am trying to execute char(39) function in plsql is the following way correct and if this way is correct i am getting
    run time error like
    create or replace
    procedure Sel_subgroup(key in varchar2,gradename in varchar2)
    as
    gid res_grades.grade_id%type;
    gn res_grades.gradename_en%type;
    stid sub_topics.subtopic_id%type;
    stn sub_topics.subtopicname_en%type;
    cc res_grades.countrycode%type;
    estid exsub_topics.exsub_topics_id%type;
    estn exsub_topics.exsubtopicname_en%type;
    d_stmt varchar2(500);
    type ref_cursor is ref cursor;
    rc ref_cursor;
    begin
    d_stmt :='SELECT RG.Grade_ID,RG.Gradename_'||key||',ST.SubTopic_ID,ST.SubTopicname_'||key||', RG.CountryCode,
    Est.ExSub_Topics_ID, Est.ExSubTopicname_'||key||' from
    Res_Grades RG INNER JOIN Sub_Topics ST ON RG.Grade_Id= ST.Grade_ID
    INNER JOIN ExSub_Topics Est ON ST.SubTopic_ID = Est.Sub_Topics_Id
    Where Gradename_'||key||' = '''||gradename||'''';
    open rc for d_stmt;
    loop
    fetch rc into gid,gn,stid,stn,cc,estid,estn;
    if rc%found then
    dbms_output.put_line(gid||gn||stid||stn||cc||estid||estn);
    else
    exit;
    end if;
    end loop;
    close rc;
    commit;
    end Sel_subgroup;the out screen result is:
    Connecting to the database rasool.
    Process exited.
    Disconnecting from the database rasool.can u please help me,
    thanking you,
    prakash

    to samb,
    It doesn't look like you are getting a runtime error. Is it possible your query is returning no rows?
    If you are sure your query should be returning rows, you probably need to check if DBMS_OUTPUT is enabled in SQL Developer (View menu I think).my query is returning a row
    where where 123=key and 'FUBAR'=gradename?
    If so, you want 3 single-quotes at the end of the string, not 4:
    You sure? I think 4 is correct.i am sure 4 is correct i have tried as per jeenesh said
    to jeenesh
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace
      2  procedure Sel_subgroup(key in varchar2,gradename in varchar2)
      3  as
      4   d_stmt varchar2(500);
      5  begin
      6  d_stmt :='SELECT RG.Grade_ID,RG.Gradename_'||key||',ST.SubTopic_ID,ST.SubTopicname_'||key||', RG.CountryCode,
      7  Est.ExSub_Topics_ID, Est.ExSubTopicname_'||key||' from
      8  Res_Grades RG INNER JOIN Sub_Topics ST ON RG.Grade_Id= ST.Grade_ID
      9  INNER JOIN ExSub_Topics Est ON ST.SubTopic_ID = Est.Sub_Topics_Id
    10  Where Gradename_'||key||' = '''||gradename||'''';
    11  dbms_output.put_line(d_stmt);
    12* end Sel_subgroup;
    SQL> /
    Procedure created.
    SQL> set serverout on
    SQL> exec Sel_subgroup('1','TEST');
    SELECT RG.Grade_ID,RG.Gradename_1,ST.SubTopic_ID,ST.SubTopicname_1,
    RG.CountryCode,
    Est.ExSub_Topics_ID, Est.ExSubTopicname_1 from
    Res_Grades RG
    INNER JOIN Sub_Topics ST ON RG.Grade_Id= ST.Grade_ID
    INNER JOIN ExSub_Topics
    Est ON ST.SubTopic_ID = Est.Sub_Topics_Id
    Where Gradename_1 = 'TEST'
    PL/SQL procedure successfully completed.i have also executed your code sir it is executing.in my coding,i found that the part of dbms_output.put_line in my ref cursor loop is not displaying me the print.
    to karthick arp
    Did enable serveroutput?yes i have enabled it with buffer size 200000
    to
    Billy Verreynne     & Frank Kulash
    as per you said sir i have done and got an error my code as follows
    SQL> var rc refcursor
    SQL> var key varchar2(2)
    SQL> var gradename varchar2(30)
    SQL> exec :key :='EN';
    PL/SQL procedure successfully completed.
    SQL> exec :gradename :='PRE-K';
    PL/SQL procedure successfully completed.
    SQL> begin sel_subgroup(key => :key, gradename => :gradename,rc => :rc); end;
      2  /
    PL/SQL procedure successfully completed.
    SQL> print rc
    ERROR:
    ORA-24338: statement handle not executed
    SP2-0625: Error printing variable "rc"how to handle this error sir

  • Possible to conditionally change item type?

    Hi there,
    I've been trying to find a possibility to change the item type (text item) into another (disabled text-item) based on the value of that field.
    Thus far I haven't found it. Is there anybody who knows if this is possible and how I can do it?
    Thanks!
    Jacob
    null

    Hello Jacob,
    >> I've been trying to find a possibility to change the item type (text item) into another (disabled text-item) based on the value of that field.
    You should check the “Read Only” section of the item. It allows you to define a condition to set the item as “readOnly”, and in version 3.1 also allows you to define a proper (different) style for it.
    Hope this helps,
    Arie.

  • Changing item type programmatically

    We've created a custom item type and would now like to programmatically update existing CA items to use that type. Does anyone know of any API or examples to accomplish this?
    much appreciated,
    -john

    Sorry, that feature is currently not available. Something we're considering for a future release.
    Regards,
    Jerry
    PortalPM

  • How to change the Destination URI value of a item table at run time

    I'd like to change the Destination URI of item of a table region when a column X of my view is not NULL. Where should I set the new Destination URI value for the item table region for specific row? Is in the RowImpl for the view object or in the Controler of the page?
    I'd really appreciate any suggestion.
    Thanks in advance.

    Hi,
    Thanks for the help, but I still dont know where I should to use setAttributeValue(DESTINATION_ATTR,OADataBoundValueViewObject());
    All examples that I saw till now here, suggestes to change something in the page in Controller but based on something entered in the page. In my case is IN to OUT, I will render some item table with a specific value parameter based what is in the database. Being more specific, I have a html table and one column Col1 has a value and it will have a DESTINATION URL if another column Col2 is Null. I believe I would have to check somewhere if the Col2 is null or not and change the DESTINATION URL property.
    Thanks again..

  • Want to change item category at the time of order creation

    Hi Gurus,
    Client require to implement individual PO scenario.
    I was configured the same and working fine.
    I am facing problem at the time of item category determination.
    User using same material and order type and they are not ready to accept to create new order type.
    Now My order type is OR and item category group is NORM and right now system determine item category TAN.
    User not want to change manually at the time of order creation.
    I have specific condition on which i want to apply this logic.
    Now i want to determine TAB item category through some user exits or enhancement.
    Can anyone suggest exact in which user exit or enhancement i have to change.
    Thanks & Regards,
    Chirag

    1. Use TCode 0VVW for creating a Z Item Usage, say, ZPO1
    2. Do an item Cat determination in VOV4, as
    Sales Doc type
    Item Cat Group
    Usage
    Item Category
    OR -
    NORM -
    ZPO1 -
    TAB
    3. Maintain Customer Materials Info Record by using VD51.
    In item screen for Cust-Mat combination maintain Item usage
    Regards
    JP

  • Change Windows Title in run-time

    I can change windows title in File-->VI Properties--< Windows Title.
    I wish You write in a string box change the windows title. How can i made it?
    Thanks.

    GerdW,
    If you open a reference, and then, in a loop, change the title, there is no
    problem.
    But if you open a reference and change the title in a loop, you get problems
    when you don't close the reference. This does not happen when you don't use
    the Open VI Reference.
    The attached VI will hopefully clear things up...
    Regards,
    Wiebe.
    "GerdW" wrote in message
    news:[email protected]..
    > Hello Wiebe,
    >
    > what do you mean with new and old reference? Does the reference of the
    > vi change, when you change the FP.Title property?
    > I have a vi, that runs as long as I'm sitting in front of my computer
    > (say 10 hours a day). It sets the title every 90 seconds to signal
    > running pr
    ocesses in Windows taskbar. I close the reference on vi exit
    > and never realize some memory leaks.
    >
    > Best regards,
    > GerdW
    [Attachment Change Title Leak.vi, see below]
    Attachments:
    Change_Title_Leak.vi ‏50 KB

  • Change style property at run time

    Hi,
    I have one table with update icon(as column), if i click that icon of any row means it needs to change the table as editable.
    I don't know whether it is possible or not.
    If possible means please tell me how to do that.
    Thanks
    SAN

    Hi San
    Yes it is possible.You need to make use of SPEL and PPR for that.I have exact scenario on my blog.You can refer
    http://oracleanil.blogspot.com/2010/08/how-to-make-read-only-selected-row-in.html
    Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for

  • Iphone stop syncing to itunes

    Problem signature:   Problem Event Name:                        BEX   Application Name:                             iTunes.exe   Application Version:                           11.0.3.42   Application Timestamp:                     51940491   Fault Mo

  • Ensure payment is received before creating sales order

    Hi For some customers we want to ensure that payment is received in advance. i.e., before the sales order is created. Unless the payment is entered in SAP, system should not allow the users to either create sales order or delivery or billing document

  • Error in loadjava

    The following message is shown after using loadjava: initialization complete loading: myclass creating: myclass error while retrieving error for myclass ORA-00904: invalid column name resolver : error while retrieving error for myclass ORA-00904: inv

  • IPhoto Keywords - Disappearing?

    Has anyone's iPhoto Keywords disappeared? Mine just have and it's not cool! I think it happened after Security update v1.0. So what gives, yo? Do I now have to sort through my whole freaking library again?

  • Screen moving when using Execute query (F8)

    Hi i have a screen oracle form when i used the key F8 ( execute query) then the screen moved down a half. Could you please help me how to fix it.