Set the value of items when check box is checked

Hi,
My requirement is when we click a check box it should set the value of an item as 111111 and clear the values of two items in an apex page.
I used java script onClick event to set those items using document.getElementByID('Item_Name')='';
One of the item which needs to be cleared is a conditonal type.
When the condional item present, java script works fine. But if it is not present,
code works but it shows "error on page" for few seconds.
Is it possible to clear the item, only when the item is present in the page.
Thanks,
Ravi

Hi,
Yes e.g. like
if($x("ITEM_NAME")){
$s("ITEM_NAME", "");
}Regards,
Jari

Similar Messages

  • Check boxes not checked when value passed through a request

    I've a URL which sets default-check box values -
    f?p=121:41:&SESSION.::YES::P41_OWNER,P41_AI_TYPE:&BUGDB_USER.,\5,6,7\
    where "\5,6,7\" is the value of check-boxes.
    On Page 41, I compute P41_AI_TYPE as follows (as a Process - On Load Before Regions) -
    begin
    if (:P41_AI_TYPE = '5,6,7') then
    *:P41_AI_TYPE := '6:7:5';*
    end if;
    end;
    There are 3 conditional reports that are generated on the page 41 based on these values. i.e. 5,6,7. All the three reports are displayed indicating that the reports do indeed see the P41_AI_TYPE variable.
    The "Debug" shows
    0.03: ...Session State: Saved Item "P41_AI_TYPE" New Value="6:7:5"
    prior to displaying the checkbox
    The "Session" also shows -
    121     41     P41_AI_TYPE     Checkbox     6:7:5     U
    However none of the check-boxes are checked.
    What could be the issue ?
    Edited by: ygore on Aug 26, 2009 10:41 AM

    0.01:
    0.02: S H O W: application="121" page="41" workspace="" request="" session="692841112185158"
    0.02: Language derived from: FLOW_PRIMARY_LANGUAGE, current browser language: en-us
    0.02: alter session set nls_language="AMERICAN"
    0.02: alter session set nls_territory="AMERICA"
    0.02: NLS: CSV charset=WE8MSWIN1252
    0.02: ...NLS: Set Decimal separator="."
    0.02: ...NLS: Set NLS Group separator=","
    0.02: ...NLS: Set date format="DD-MON-RR"
    0.02: ...Setting session time_zone to dbtimezone
    0.02: NLS: Language=en-us
    0.02: Application 121, Authentication: CUSTOM2, Page Template: 5653628457062181
    0.02: ...Session ID 692841112185158 can be used
    0.02: ...Application session: 692841112185158, [email protected]
    0.03: ...Determine if user "YPGORE" workspace "943324391470666" can develop application "121" in workspace "943324391470666"
    0.03: Session: Fetch session header information
    0.03: Saving g_arg_names=P41_OWNER and g_arg_values=YGORE
    0.03: ...Session State: Saved Item "P41_OWNER" New Value="YGORE"
    0.03: Saving g_arg_names=P41_AI_TYPE and g_arg_values=5,6,7
    0.03: ...Session State: Saved Item "P41_AI_TYPE" New Value="5,6,7"
    0.03: ...Metadata: Fetch page attributes for application 121, page 41
    0.03: Fetch session state from database
    0.03: Branch point: BEFORE_HEADER
    0.03: Fetch application meta data
    0.04: Computation point: BEFORE_HEADER
    0.04: Processing point: BEFORE_HEADER
    0.04: Show page template header
    0.04: Computation point: AFTER_HEADER
    0.04: Processing point: AFTER_HEADER
    Root Cause Analysis
    ([email protected]) | Logout
         Reports      
    Edit
         Classify      
    Edit
         Administration      
    Edit
    EditEditEdit
    Summary Report     Area Report     Custom Reports     
    0.05: Region: Action Items Report
    Action Items Report
    0.05: Computation point: BEFORE_BOX_BODY
    0.05: ...Evaluate condition "NEVER" for computation of item: P41_AI_TYPE
    0.05: Processing point: BEFORE_BOX_BODY
    0.05: ...Process "Compute AI Type": PLSQL (BEFORE_BOX_BODY) begin if (:P41_AI_TYPE = '5,6,7') then :P41_AI_TYPE := '6:7:5'; :P41_AI_TYPE_COMMA := '5,6,7'; end if; end;
    *0.05: ...Session State: Saved Item "P41_AI_TYPE" New Value="6:7:5"*
    0.05: ...Session State: Saved Item "P41_AI_TYPE_COMMA" New Value="5,6,7"
    0.05: Region: Enter Bug User Id
    0.06: Item: P41_AREA TEXT
    Area :      Edit
    0.06: Item: P41_OWNER TEXT
         AI Owner :      Edit
    0.06: Item: P41_AI_PERCENT_LOW_MARK TEXT
         AI %age comp. range      Edit
    0.06: Item: P41_AI_PERCENT_HI_MARK TEXT
         And      Edit
    0.06: Item: P41_AI_TYPE CHECKBOX
         AI Type :      
    Test-Generic     TestCase     Development
    Edit
    0.06: Item: P41_AI_ID TEXT_WITH_ENTER_SUBMIT
         AI Id :      Edit
    0.06: Item: P41_GO BUTTON
         Go      
    Edit
    0.06: Item: P41_AI_TYPE_COMMA HIDDEN
              Edit
    0.06: Region: Test-Generic Action Items Report
         Test-Generic Action Items ReportEdit      
    0.06: show report
    0.07: determine column headings
    0.07: activate sort
    0.07: parse query as: RMTOOLS_QAINIT
    0.07: binding: ":P41_AREA"="P41_AREA" value="%"
    0.07: binding: ":P41_OWNER"="P41_OWNER" value="YGORE"
    0.07: binding: ":P41_AI_PERCENT_LOW_MARK"="P41_AI_PERCENT_LOW_MARK" value="0"
    0.07: binding: ":P41_AI_PERCENT_HI_MARK"="P41_AI_PERCENT_HI_MARK" value="100"
    0.07: binding: ":P41_AI_ID"="P41_AI_ID" value="%"
    0.08: print column headings
    0.08: rows loop: 15 row(s)
    No action items in this category.      
    0.08: Region: TestCase Action Items Report
         TestCase Action Items ReportEdit      
    0.08: show report
    0.08: determine column headings
    0.08: activate sort
    0.09: parse query as: RMTOOLS_QAINIT
    0.09: binding: ":P41_AREA"="P41_AREA" value="%"
    0.09: binding: ":P41_OWNER"="P41_OWNER" value="YGORE"
    0.09: binding: ":P41_AI_PERCENT_LOW_MARK"="P41_AI_PERCENT_LOW_MARK" value="0"
    0.09: binding: ":P41_AI_PERCENT_HI_MARK"="P41_AI_PERCENT_HI_MARK" value="100"
    0.09: binding: ":P41_AI_ID"="P41_AI_ID" value="%"
    0.09: print column headings
    0.09: rows loop: 15 row(s)
    No action items in this category.      
    0.09: Region: Development Action Items Report
         Development Action Items ReportEdit      
    0.10: show report
    0.10: determine column headings
    0.10: activate sort
    0.10: parse query as: RMTOOLS_QAINIT
    0.10: binding: ":P41_AREA"="P41_AREA" value="%"
    0.10: binding: ":P41_OWNER"="P41_OWNER" value="YGORE"
    0.10: binding: ":P41_AI_PERCENT_LOW_MARK"="P41_AI_PERCENT_LOW_MARK" value="0"
    0.10: binding: ":P41_AI_PERCENT_HI_MARK"="P41_AI_PERCENT_HI_MARK" value="100"
    0.10: binding: ":P41_AI_ID"="P41_AI_ID" value="%"
    0.11: print column headings
    0.11: rows loop: 15 row(s)
    No action items in this category.      
    0.11: Region: Print Region
         Print Report      
    Edit
    0.11: Computation point: AFTER_BOX_BODY
    0.11: Processing point: AFTER_BOX_BODY
    0.11: Computation point: BEFORE_FOOTER
    0.11: Processing point: BEFORE_FOOTER
    0.11: Show page tempate footer
    Home     Application 121     Edit Page 41     Create     Session     Activity     No Debug     Hide Edit Links     Show Edit Links
    0.11: Computation point: AFTER_FOOTER
    0.11: Processing point: AFTER_FOOTER
    0.11: Log Activity:
    0.11: End Show:

  • Setting the value of a single attribute for multiple line items

    Hi all,
    I am working on a Web Dynpro application, I have created this applicaion for an accounting document so it has header data and multiple line item data. As per the requirement I have to put the following logic:
    1. When a user enters a value in the field KBLNR on the line item, all the other fields like cost centerm fund, functional area should populate from a database table based on the value of the KBLNR. to get this I have put the following code:
    TYPES: BEGIN OF t_kblp,
              fipos     TYPE kblp-fipos,
              kostl     TYPE kostl,
                      END OF t_kblp.
      DATA lv_kblnr TYPE wd_this->element_t_bseg-kblnr.
      DATA: lt_kblp TYPE STANDARD TABLE OF t_kblp,
            wa_kblp LIKE LINE OF lt_kblp,
            lt_bseg              TYPE STANDARD TABLE OF bseg,
            wa_bseg              TYPE bseg.
      DATA lo_nd_t_bseg TYPE REF TO if_wd_context_node.
      DATA lo_el_t_bseg TYPE REF TO if_wd_context_element.
      DATA: ls_t_bseg TYPE wd_this->element_t_bseg,
            lo_api_controller    TYPE REF TO if_wd_controller,
            lo_message_manager   TYPE REF TO if_wd_message_manager,
            lo_nd_tbseg          TYPE REF TO if_wd_context_node,
             lo_el_tbseg          TYPE REF TO if_wd_context_element,
             lt_el_tbseg          TYPE wdr_context_element_set,
             lv_bseg              TYPE bseg.
      lo_nd_t_bseg = wd_context->path_get_node( path = `ZDATA.CHANGING.T_BSEG` ).
      lo_api_controller ?= wd_this->wd_get_api( ).
      CALL METHOD lo_api_controller->get_message_manager
        RECEIVING
          message_manager = lo_message_manager.
      lo_nd_tbseg = wd_context->path_get_node( path = `ZDATA.CHANGING.T_BSEG` ).
      lt_el_tbseg = lo_nd_tbseg->get_elements( ).
      LOOP AT lt_el_tbseg INTO lo_el_tbseg.
        lo_el_tbseg->get_static_attributes(
                               IMPORTING static_attributes = lv_bseg ).
      IF lv_bseg-kblnr NE ' '.
          SELECT belnr
                 fipos
                 kostl
                 PSPNR
                 geber
                 saknr
                 fkber
                 grant_nbr
                 gsber
                 FROM kblp
                 inTO corresponding fields of wa_kblp
                 WHERE belnr = lv_bseg-kblnr and
                      saknr = lv_bseg-saknr.
            ENDSELECT.
    lo_nd_t_bseg = wd_context->path_get_node( path = `ZPRELIMINARY_POSTING.CHANGING.T_BSEG` ).
    * get element via lead selection
            lo_el_t_bseg = lo_nd_t_bseg->get_element( ).
    lo_el_tbseg->set_static_attributes(
                               EXPORTING static_attributes = wa_kblp ).
       CLEAR: lv_bseg, wa_kblp.
      ENDLOOP.
    everything is working fine but now the problem is couple of fields that I have in wa_kblp are with different names in bseg table and hence they are not updating... I tried putting the following logic within the loop :
    lo_el_t_bseg->set_attribute(
        name =  `PROJK`
    value = wa_kblp-pspnr ).
    but it's only setting the value of the first line item and not working for the multiple line items, can you please tell me how can do this?
    Thanks,
    Rajat Garg
    Edited by: rajatg on Jun 24, 2011 5:09 PM

    Hi Chris,
    I tried your code and it worked fine but after I put this code I am getting another issue. within the loop I had a code to make the fields non modifiable on the screen and was working fine but now what's happening is it's making the all the lines uneditable except the one with data on it (which is completely opposite), this is what I have coded:
    LOOP AT lt_el_tbseg INTO lo_el_tbseg.
        lo_el_tbseg->get_static_attributes(
                               IMPORTING static_attributes = lv_bseg ).
    IF lv_bseg-kblnr NE ' '.
      SELECT belnr
                 fipos
                 kostl
                 PSPNR
                 geber
                 saknr
                 fkber
                 grant_nbr
                 gsber
                 FROM kblp
                 inTO corresponding fields of wa_kblp
                 WHERE belnr = lv_bseg-kblnr and
                      saknr = lv_bseg-saknr.
            ENDSELECT.
    move: wa_kblp-belnr to wa_bseg-kblnr,
    wa_kblp-fipos to wa_bseg-fipos,
    wa_kblp-kostl to wa_bseg-kostl,
    wa_kblp-pspnr to wa_bseg-projk,
    wa_kblp-geber to wa_bseg-geber,
    wa_kblp-saknr to wa_bseg-saknr,
    wa_kblp-fkber to wa_bseg-fkber,
    wa_kblp-grant_nbr to wa_bseg-grant_nbr,
    wa_kblp-gsber to wa_bseg-gsber,
    lv_bseg-dmbtr to wa_bseg-dmbtr.
    append wa_bseg to lt_bseg.
    lo_nd_edit_property = wd_context->path_get_node( path = `ZPRELIMINARY_POSTING.CHANGING.T_BSEG.EDIT_PROPERTY` ).
          get element via lead selection
          lo_el_edit_property = lo_nd_edit_property->get_element( ).
          lo_el_edit_property->set_attribute(
            name =  `EDIT_FIELD`
            value = 'ABAP_TRUE' ).
          lo_el_edit_property->set_attribute(
            name =  `EDIT_WBS`
            value = 'ABAP_TRUE' ).
    endif.
    endloop.
    o_nd_t_bseg = wd_context->path_get_node( path = `ZPRELIMINARY_POSTING.CHANGING.T_BSEG` ).
    get element via lead selection
            lo_el_t_bseg = lo_nd_t_bseg->get_element( ).
      CALL METHOD lo_nd_t_bseg->bind_table
        EXPORTING
          new_items            = lt_bseg.
    Can you please see what I am doing it wrong here....

  • How to prevent numericstepper from setting the value to the defined Maximum when a number greater than maximum is entered in by keyboard and user hits the "Enter" key.

    I need to set the Maximum so that the use can use the mouse to change the value of numericstepper (and not go over a certain number), but at the same time I have to allow the user to enter their value by typing in the text field. When the user enters a number greater than the Maximum, I disable the "Ok" button of the dialog and show a red warning(error message). The issue is that the user can hit "Enter" and numeric stepper would set the value to the Maximum and the dialog box would close and the rest of code would run. I want the numericstepper not to change the value and keep showing the warning even if the user hits the "Enter".
    Note: Setting maxChar does not help since my maximum is 1000, and user might enter 5555
    I would appreciate the help.

    Thanks for trying to help, But
    The issue is that if I set the maximum value of stepper 1 greater than the max value that I want, then the user can select an invalid value(of myMax + 1) when he clicks on the UP arrow of the numeric stepper(which is not acceptable for what I am working on).
    I need to preserve the users invalid number, while not letting the user to select an invalid number by clicking UP key.
    I noticed that when the user enters a number greater than the Maximum, and then click on the down arrow, it would set the value to 1 less than the maximum. This is not acceptable either.

  • Online Store 1.0  - which process set the value of App Item 'FULLNAME'

    Hi,
    I just very curious about which process set the value of App Item 'FULLNAME' ini the packaged Apex App - Online Store 1.0 .
    At Navigation Bar, there is a entry named "If you are not &FULLNAME., Click here |". However I can't find how the app set this application item value in any process when login.
    any idea, I will be very appreciated.
    Thanks in advance.
    PPMonkey

    Check the post-authentication process in the current authentication scheme and the call to ols_getname.
    Scott

  • How to set the value of application item using pl/sql in application process

    Hi guys,
    I want a global variable (application item) whose value will be set at the start when a user logs in to the application. The value will be retrieved from database using a sql query. I do not know the exact syntax to set the value of application item in application process. Also i want to know in which type of application process should i use to set the value of application item when a user starts a session. The value of application item varies from user to user.
    Please help.
    I am using apex 4.2
    Regards,
    Waqas

    You can use the application item as bind-variable with its name. ie. your application item is named G_MY_APPLICATION_ITEM, then you can access/set it using :G_MY_APPLICATION_ITEM.
    For example
    BEGIN
        -- assign like a variable
        :G_MY_APPLICATION_ITEM := 'LARRY';
        -- use in a SQL statement
        SELECT WHATEVER_COLUMN
          INTO :G_MY_APPLICATION_ITEM
          FROM MY_TABLE
         WHERE USERNAME = :APP_USER
    END;
    Peter

  • Cascading LOV does not work when setting the value of the parent LOV with DA

    Hello All,
    Using APEX 4.2.2.
    I have tow LOVs
    Parent LOV item is: P50_TYPE
    Child LOV item is :  P50_PROJECT_ID
    In other words in the attributes of the item P50_PROJECT_ID we have :
    > Cascading LOV Parent Item(s): P50_TYPE
    > Page Items to Submit: P50_TYPE
    > List of values definition: something similar to:
    Select * from mytable where type = :P50_TYPE
    I use DA that execute JS code to set the value of the P50_TYPE item
    something similar to:
    > $('#P50_TYPE').val(2);
    Having done this, the P50_PROJECT_ID item does not get refreshed, when the value of P50_TYPE is changed. Namely, P50_PROJECT_ID remains empty, unless end user manually changes the value of P50_TYPE.
    Any help please ?
    Regards,

    Thanks Scott,
    By the way, I remember reading a thread posted by you about  Sumneva Drag & Drop Report Region plugin that was answered by Tom . But, I cannot find this plugin anywhere. Does not it supported in APEX 4.2 ? Is there any alternative out there ?
    If you use it, and it works find with you, can you please send it to me on [email protected] ?
    Regards,
    Fateh

  • Can we set the dynamic data source when using getReportParameters() ?

    Hello!
    I have a report where one of its parameters refers to a list of values (LOVs). This list of values is an SQL Query type. When the data source used in the report is defined in the BI Publisher server, I'm able to get the report parameters using the getReportParameters() function in my application. However, if the data source is not defined the function throws an exception, which is understandable.
    I decided to dynamically set the data source so that even if the data source used by the report is not defined in the BI Publisher server, it still will be able to get the LOVs for the parameter. I tried setting the JDBCDataSource of the dynamicDataSource for the ReportRequest object that I passed to the getReportParameters() function. Please see the sample code below:
    reportRequest.dynamicDataSource = new BIP10.BIPDataSource();
    reportRequest.dynamicDataSource.JDBCDataSource = new BIP10.JDBCDataSource();
    setReportDataSource(reportRequest.dynamicDataSource.JDBCDataSource, connectstr, jdbc, dc); //function to set the values for JDBCDataSource object
    reportParams = webrs.getReportParameters(reportRequest, uid, pwd); //call the getReportParameters
    I was expecting this to work as this is what I did to dynamically set the data source before calling the runReport function. So, my question is -- can we set the dynamic data source when using getReportParameters() ? I tried this both in versions 10g and 11g. It does not seem to work on both versions.
    Regards,
    Stephanie

    report_id column of apex_application_page_ir_rpt can help us uniquely identify each saved report.
    We can assign this report_id value to a page item and this page item can be put in the Report ID Item text box of the Advanced section of the Report Attributes page of the IR.
    This should load the saved report identified by report_id and you can get rid of javascript
    Regards,
    Vishal
    http://obiee-oracledb.blogspot.com
    http://www.packtpub.com/oracle-apex-4-2-reporting/book
    Kindly mark the reply as helpful/correct if it solves your problem

  • Setting the value of dropdown according tio 1st dropdown values

    Hi All,
    I have a requiremnt.
    My code is like this.
    DATA: LV_GROUP               TYPE QCODEGRP,
              LV_CODE                TYPE QCODE,
              LV_GROUP_FIELDNAME(30) TYPE C,
              LV_CODE_FIELDNAME(30)  TYPE C.
    § 4.The event DOUBLE_CLICK provides parameters for row and column
      of the click. Use row parameter to select a line of the
      corresponding internal table.
        "  break-point.
        FIELD-SYMBOLS  TYPE LVC_T_MODI.
        DATA: LS_MODI TYPE LVC_S_MODI.
        CASE E_FIELDNAME.
          WHEN 'PART_CODE'     OR 'PART_GROUP'.
            PERFORM F4_GET_CATALOG_SELECTION USING    TQ80-OTKAT
                                             CHANGING LV_CODE
                                                      LV_GROUP.
            LV_GROUP_FIELDNAME = 'PART_GROUP'.
            LV_CODE_FIELDNAME  = 'PART_CODE'.
          WHEN 'JOB_CODE'      OR 'JOB_GROUP'.
            PERFORM F4_GET_CATALOG_SELECTION USING    TQ80-FEKAT
                                            CHANGING  LV_CODE
                                                      LV_GROUP.
            LV_GROUP_FIELDNAME = 'JOB_GROUP'.
            LV_CODE_FIELDNAME  = 'JOB_CODE'.
          WHEN 'ACTIVITY_CODE' OR 'ACTIVITY_GROUP'.
            PERFORM F4_GET_CATALOG_SELECTION USING    TQ80-MFKAT
                                             CHANGING LV_CODE
                                                      LV_GROUP.
            LV_GROUP_FIELDNAME = 'ACTIVITY_GROUP'.
            LV_CODE_FIELDNAME  = 'ACTIVITY_CODE'.
          WHEN OTHERS.
            EXIT.
        ENDCASE.
    FORM F4_GET_CATALOG_SELECTION USING     P_CATALOG
                                  CHANGING  P_CODE
                                            P_GROUP.
      DATA:
        LV_CATALOG                     LIKE QKAT-KATALOGART,
        LV_H_CODE                      LIKE VIQMFE-FECOD,
        LV_PICK                        TYPE C,
        LV_RETN                        TYPE C,
        LV_DISP                        TYPE C,
        W_NOTIF_CATALOG                LIKE LINE OF G_NOTIF_CATALOG,
        I_CODEGRP                      LIKE QPK1CODEGRP OCCURS 0 WITH HEADER LINE.
      DATA: BEGIN OF I_QPK1CD OCCURS 10.
              INCLUDE STRUCTURE QPK1CD.
      DATA: END   OF I_QPK1CD.
      LV_CATALOG = P_CATALOG.
      LV_H_CODE  = '*'.
    LV_PICK    = 'X'.
    LOOP AT G_NOTIF_CATALOG INTO W_NOTIF_CATALOG WHERE QKATART = LV_CATALOG.
        MOVE W_NOTIF_CATALOG-QCODEGRP TO I_CODEGRP-CODEGRUPPE.
        APPEND I_CODEGRP.
      ENDLOOP.
      CALL FUNCTION 'QPK1_GP_CODE_SELECTION'
        EXPORTING
          I_KATALOGART           = LV_CATALOG
         I_CODEGRUPPE           = CDGRP
          I_CODE                 = LV_H_CODE
          I_SPRACHE              = SY-LANGU
          I_PICKUP_MODE          = LV_PICK
          I_DISPLAY_MODE         = LV_DISP
          I_RETURN_IF_ONE        = LV_RETN
        TABLES
          T_QPK1CDTAB            = I_QPK1CD
          T_CODEGRPTAB           = I_CODEGRP
        EXCEPTIONS
          NO_MATCH_IN_RANGE      = 01
          NO_USER_SELECTION      = 02
          NO_AUTHORIZATION       = 03
          NO_SELECTION_SPECIFIED = 04
          OBJECT_LOCKED          = 05
          LOCK_ERROR             = 06
          OBJECT_MISSING         = 07.
      CHECK SY-SUBRC = 0.
      READ TABLE I_QPK1CD INDEX 1.
      P_CODE  = I_QPK1CD-CODE.
      P_GROUP = I_QPK1CD-CODEGRUPPE.
    My requirement is that I want to set the values of job_group and activity_group equal to values of part group drop down. I want to just select the value of part_group from the f4 option  and other values should auto populate with same values.
    Please help.
    Thanks in Advance,
    Hariom.

    Hi Hari,
    Check the below thread
    populate drop down menu based on entry in another field
    Cheerz
    Ram

  • Can I set the value of a list binding in my managed bean?

    Dear All,
    This is just an exercise for me and I just wanted to experiment on the bindings of ADF for me to understand it further.
    I wanted to create a custom Model Driven LOV with my data control listed below
    Countries
         -CountryId
         -CountryName..but I wanted to display the label similar to this
    1 - USA
    2 - England
    n - France..so I thought of manipulating the select items in a bean
    <af:selectOneChoice id="soc1" value="#{bindings.Countries.inputValue}">
      <f:selectItems value="#{pageFlowScope.MyBean.countries}" id="si1" valuePassThru="true"/>
    </af:selectOneChoice>..and the code similar to this
    public class MyBean{
         public List<SelectItem> getCountries(){
              //countryMap points to accessing the iterator binding
              //BindingsHelper is a utility class that sets the value
              for(...){
                   SelectItem item = new SelectItem();
                   item.setLabel(countryMap.get("CountryId") + " - " + countryMap.get("CountryName"));
                   item.setValue(countryMap.get("CountryId"));
                   list.add(item);
              //set the item to the first row
              BindingsHelper.setExpressionValue("#{bindings.Countries.inputValue}",
                                     list.get(0).getValue());
              return list;
    }...on the last part I wanted to set the value to the first item but I am encountering numberformatexception when setting the list binding.
    I know I can do this declaratively also by removing the unselected item but as I have said I am experimenting on the bindings.
    Is this not possible?
    Thanks.
    JDev 11G PS5

    Hi ,
    I understand that , you want to show select one choice (dropdown) with label (countyid - country name) and value is (countryid).
    and these informnation is coming from ADf Model ( may be a VO).
    in the UI page you used this list is coming from MyBean
    <af:selectOneChoice id="soc1" value="#{bindings.Countries.inputValue}">
    <f:selectItems value="#{pageFlowScope.MyBean.countries}" id="si1" valuePassThru="true"/>
    </af:selectOneChoice>
    so ,
    The Managed Bean code should be ,
    private List<SelectItem> countries;
    ///setter method
    public void setCountries(List<SelectItem> countries) {
    this.countries= countries;
    // getter method
    public List<SelectItem> getQuoteStatusList() {
    quoteStatusList =
    selectItemsForIterator("countriesVOIterator",
    "countryId", "countryName");
    return quoteStatusList;
    public static List<SelectItem> selectItemsForIterator(String iteratorName, String valueAttrName, String displayAttrName) {
    return selectItemsForIterator(findIterator(iteratorName), valueAttrName, displayAttrName);
    public static DCIteratorBinding findIterator(String name) {
    DCIteratorBinding iter = getDCBindingContainer().findIteratorBinding(name);
    if (iter == null) {
    throw new RuntimeException("Iterator '" + name + "' not found");
    return iter;
    public static List<SelectItem> selectItemsForIterator(DCIteratorBinding iter, String valueAttrName, String displayAttrName) {
    List<SelectItem> selectItems = new ArrayList<SelectItem>();
    for (Row r : iter.getAllRowsInRange()) {
    string labelValue = (String)r.getAttribute(valueAttrName) +"-"+ (String)r.getAttribute(displayAttrName);
    selectItems.add(new SelectItem(r.getAttribute(valueAttrName),labelValue ));
    return selectItems;
    this will give you what you except in the ui
    when you try to get the value form that seclecOneChoice value in MyBean what user selects , you can simply get the value of this selectOneChoice.

  • How do I set the desired search enging when I open a new browsing window?

    When I open a new browser window, I used to get the Bing search engine option but now only the Yahoo search engin is shown. How do I reset the system to show Bing when opening a new browser window? thanks.

    I'm going to go out on a limb and guess that you've got a custom timecode field somewhere in your production and/or asset metadata group(s), right? And I'm going to further guess that this timecode field has dashes in it like this --:--:--:--, right? If so, try this: Click the arrow next to the timecode field and adjust the timecode so that it has a number (it doesn't matter what the number is as long it's not dashes - "00:00:00:00" is fine). Then Save this asset, close it and then reopen it and see if the beeping madness has vanished. Then, to make this change permanent for all of your new assets, make sure to edit the default value of any custom timecode fields to put zeros (or some other numeric default value) into them when a new asset is generated. If the asset still beeps when you open it, check the other metadata groups in your set to see if there isn't another empty timecode field lurking in the shadows.
    Jason

  • How set the values programatically in custom tables ?

    Hi Guru's,
    Please help me where i did mistake....
    My scenario is i have 4 columns that 4 columns are look up based on row i need save the "XX_hr_Vacancies_CompTab"
    4 columns look like....
    column1(15 questions ) column2(message choice) column3(message choice) column4(free text)
    (1-15)question manually select (1-10) manually select (1-10) comments
    this vo purpose i am using this query
    SELECT ROWNUM,
    xhv.VACANCY_ID
    , xhv.RFP_NO
    , hl.lookup_code
    , hl.meaning
    , XJCT.BUHR_RATING
    , XJCT.COMBEN_RATING
    , XJCT.RATIONALE
    FROM hr_lookups hl ,
    xx_hr_vacancies xhv,
    XX_JOBEVAL_COMP_TAB XJCT
    WHERE lookup_type = 'XX_JE_QUESTIONAIRE'
    AND xhv.RFP_NO = 'IRC616'
    AND XJCT.VACANCY_ID(+) = XHV.VACANCY_ID
    ORDER BY ROWNUM
    I am using sample code is for one column inserting.....please help where i am doing mistake.
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    am.invokeMethod("createjobVacancy1");
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if (pageContext.getParameter("Save") != null)
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject vacncyVO = (OAViewObject)am.findViewObject("XXTableLookupVO1");
    int fetchedrowcount = vacncyVO.getRowCount();
    RowSetIterator multiIter;
    multiIter = vacncyVO.createRowSetIterator("VacancyId");//Attribite of the select box
    multiIter.setRangeStart(0);
    multiIter.setRangeSize(fetchedrowcount);
    System.out.println("no before for loop condition rows"+fetchedrowcount);
    for(int i=0;i<fetchedrowcount;i++)
    am.invokeMethod("createjobVacancy1");
    OAViewObject vacncyVO1 =
    (OAViewObject)am.findViewObject("XX_hr_Vacancies_CompTab_EOVO1");
    Object vacancy = vacncyVO.getRowAtRangeIndex(i).getAttribute("VacancyId"); */*63 Line code is this one*/*
    System.out.println("vacancy number is in table region current row is "+vacancy);
    System.out.println("no or rows"+fetchedrowcount);
    if(vacancy != null && !"".equals("vacancy"))
    vacncyVO1.getCurrentRow().setAttribute("VacancyId",vacancy);
    System.out.println("set create vacancy number is in table region current row is "+vacancy);
    }else{
    vacncyVO1.getCurrentRow().setAttribute("VacancyId",null);
    am.invokeMethod("apply1");
    System.out.println("out of for loop :"+fetchedrowcount);
    Sop:
    13/01/10 06:55:28 no before for loop condition rows15
    13/01/10 06:55:29 Header is =725
    13/01/10 06:55:30 vacancy number is in table region current row is 616
    13/01/10 06:55:30 no or rows15
    13/01/10 06:55:30 set create vacancy number is in table region current row is 616
    13/01/10 06:55:30 Header is =726
    Error:
    ## Detail 0 ##
    java.lang.NullPointerException
    at xxsup.oracle.apps.per.jobevaluation.webui.MainCO.processFormRequest(MainCO.java:63)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
    Regards,
    Srinivas

    Thanks Keerthi,
    i am getting values but i unable to set the values, once i am setting values i am facing null pointer exception ..
    java.lang.NullPointerException
         at xxsup.oracle.apps.per.jobevaluation.webui.MainCO.processFormRequest(MainCO.java:86)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
    i am using below coding in PFR
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if (pageContext.getParameter("Save") != null)
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject oaviewobject =(OAViewObject)am.findViewObject("XXTableLookupVO1");
    if(oaviewobject!=null)
    pageContext.writeDiagnostics(this,"View Object is exists",OAFwkConstants.STATEMENT);
    int rowcountValue = oaviewobject.getRowCount();
    pageContext.writeDiagnostics(this,"Row returned by the View Object"+rowcountValue,OAFwkConstants.STATEMENT);
    System.out.println("before for loop geting values = "+rowcountValue);
    Row rowAdv= oaviewobject.first();
    RowSetIterator iterator = oaviewobject.createRowSetIterator("iterator");
    iterator.setRangeStart(0);
    iterator.setRangeSize(oaviewobject.getRowCount());
    for(int i=0; i<iterator.getRowCount(); i++)
    pageContext.writeDiagnostics(this,"Inside For loop ",OAFwkConstants.STATEMENT);
    rowAdv =iterator.getRowAtRangeIndex(i);
    if(rowAdv != null)
    pageContext.writeDiagnostics(this,"flag not null",OAFwkConstants.STATEMENT);
    pageContext.writeDiagnostics(this,"Flag Value Checked as Y",OAFwkConstants.STATEMENT);
    OAViewObject vacncyVO1 =
    (OAViewObject)am.findViewObject("XX_hr_Vacancies_CompTab_EOVO1");
    if(rowAdv.getAttribute("VacancyId")!=null)
    Object vacancyname = rowAdv.getAttribute("VacancyId").toString();
    vacncyVO1.getCurrentRow().setAttribute("VacancyId",vacancyname); This is the 86 line
    System.out.println("Vacancy ID IS = "+vacancyname);
    System.out.println("Vacancy ID IS = "+rowAdv);
    am.invokeMethod("apply1");
    // System.out.println("out of for loop :"+iterator);
    please help me where i am doing mistake...
    Regards,
    Srinivas

  • How do I set the value of a dynamic row text field

    I have a repeated row form which contains a button and multiple text fields.  There is a text field (Input Data Field) further up with some information I want to place in the table and multiple buttons that I want to read the value of and set to the table.  I apologize there are multiple questions I have and I am using pseudocode to describe it.
    Top form looks like
    InputField
    | ButtonX1 | ButtonY1 | DescriptionX1 (read only Text Field)
    | ButtonXn | ButtonY1 | DescriptionXn
    OutputRow looks like
    | ButtonOutput | OutputField1 | OutputField2 | OutputField3 |
    So I would like it to do
    ButtonX1.click
    OutputTable.OutputRow.addInstance(true)  //this works - everything else I have questions on
    OutputTable.OutputRow.OutputField1.rawValue = DescriptionX1.rawValue
    Question 1
    How do I address the location in each table to set a value
    Question 2
    How do I get the value of the description field in the same table and row as the button
    I would like to say something to the effect of  OutputTable.OutputRow[??].OutputField1.rawValue = this.parent.DescriptionX
    OutputTable.OutputRow.OutputField2 = InputField.rawValue
      Same question as above - how do I specify a dynamic row - is this the proper syntax for getting the value from the input field?
    OutputTable.OutputRow.OutputField3 = this.ButtonLabel
    Question 3
      How can I get the value of the button's label to set in the field
      There should be very many of these buttons and buttons will be added - I would prefer to set the value based on the button's label to make the value easier - not requiring changing the code
    Question 4 - unrelated to those above.
    Is it possible to build the first table
    | ButtonX | ButtonY | Description |
    from an XML File.  I have seen examples of how to build if it is just data, but can the XML be pushed into a form with code to do the above actions?

    Each object in a form must have a unique name. I doing so it is not neccessarily the name but the path or SomExpression associated with that object that must be unique. In your case you have a Table.Row.object configuration. The Row is the part that is repeating so to give each object a unique name an instance number is placed on the repeating part. So objects in the 1st row woudl be Table.Row[0].object...objects in the second row woudl be Table.Row[1].object etc .....You can see this by adding a debug instruction on the Enter event of the description field. Put the code app.alert(this.somExpression) and when you enter the field you will see what the somExpression is. Do this for a few rows and you will see the pattern (don't forget to remove the debug code from the enter event). Now you know what you have to use to address the fields. If no instance is given it is assumed to be 0 ..that is why only the 1st row is being affected.
    So now to answer your questions:
    Question1: The square bracket notation is an issue for javascript (this is the notation for an array) so we have to use a different means of addressing the field to include the instance number. So to address the Description in the 3rd row we woudl use:
    xfa.resolveNode("Table.Row[2].Description").rawValue = "This is my new description";
    Note that the instance number is 2 for the 3rd row because the instance numbers are 0 based.
    Question2. The resolveNode notation allows you to pass a string so you can also concatinate expressions to make the string. If you are writing code on a button in the same row you can get the instance that you are on by using the expression this.parent.index. The "this" portion refers to the current object (the button) and the parent.index gets you th eindex of the Buttons parent. If the button is embedded deeper in a hierarchy then you can continue to add parent indicators until you get back to the node that you want. So rewriting your expression from Q1 it woudl be:
    xfa.resolveNode("Table.Row[" + this.parent.index + "].Description").rawValue = "This is my new description";
    Question3: The buttons caption can be retrieved by using ButtonName.caption.value.text.value
    Question4: When you say build from an XML file. What are you expecting to come from the XML file? The caption that goes on the button? Typically the XML file carries data (not to say that it cannot carry other things). Just need a bit of clarification on this one first.
    Hope that helps
    Paul

  • Not able to set the value in marketing context node for BP_HEAD

    Hi,
    I am trying to set the value in marketing node of BP_HEAD from bp_addr component. i am calling the set_property method but it is not changing the value, when i debugg the code, it actually changing the value in bol structure but it is not calling the get/set method of bp head.
    i am working on BP corporate person  creation i.e. in bp_head component and account details view. I added the marketing attributes in UI configuration and also the address attributes.
    this is what i coded in get method of country in standardaddress context node of BP_ADDR
    lv_entity ?= current.
        IF lv_entity IS BOUND.
          lv_parent = lv_entity->get_parent( ).
          IF lv_parent IS BOUND.
            lv_entity_mkt = lv_parent->get_related_entity( iv_relation_name = 'BuilMarketingRel' ).
            IF lv_entity_mkt IS BOUND.
              CALL METHOD lv_entity_mkt->set_property
                EXPORTING
                  iv_attr_name = 'ATTRIBUTE'
                  iv_value     = attribute1.
    Can anyone please guide me on how to set the value cross component and can we call the get/set method of that attribute which is not in same component?
    Regards,
    Kamesh Bathla

    Sorry, what I said was rubbish, because the LSMW and the session run in different external sessions.
    I have searched forum for these terms: "company BUK parameter BDC background"
    These threads Is it possible to set default company code in SM35? and Release BDC in SM35 in background, How to set defaul company code? seem promising, but I'm not sure they really solve.
    In case these threads don't help you, I think you can create your own Z transaction which sets the BUK parameter id and then does a LEAVE TO TRANSACTION 'ABAON'. Then create again the recording on the Z transaction.
    If you are using ECC6, then you may also enhance the standard to reset BUK parameter id at the very beginning of ABAON, in case it's run in batch input (sy-binpt = 'X'). Be careful as sometimes SAP does batch input on some transactions, so that could make the standard fail.
    Last thing, you can contact SAP support, though it might probably be considered as consulting.

  • Setting the value of a textbox from another page

    Hi Everyone,
    I have a multi paged application (multiple xib, multiple controllers)
    In my selection view, the view that holds the UIViewPicker control, I need to populate the page that called the selector page...
    I have the code to identify what page called the selector, and when the page is dismissed, I need to fill in the field from the calling page.
    I have included the header of the calling view in my selector view, and now I need to be able to fill in a readonly textbox in the calling view....
    Do I need to setup a property for each of the textboxes in the calling view, or can I populate them directly??
    thanks
    tony

    alt-088 wrote:
    I am sorry, but I am lost in this implementation....
    How exactly do I tell the self.parentViewController what control will receive the new text value??
    Ooooops!! I'm the one who needs to be sorry, Tony:
    // from previous post
    - (void)setTextInParent:(NSString* textValue) {
    // assume that every possible parent controller has a "textbox" object
    // which is a member of some class that has a writable 'text' property
    [previousViewController setValue:textValue forKey:@"text"]; // <-- * Idiot alert *
    Looks like another one of my senior moments. As you pointed out, we need the value of the 'textBox' property before we can set the value of the 'text' property.
    To your question on how I am displaying the second view, it is called via
    [self presentModelViewController:screen animated:YES]
    from a button click event
    Cool. That means we already have the address of vc1 in the 'parentViewController' ivar of vc2, so we don't need to add the 'previousViewController' ivar shown in my example.
    So here's a corrected and maybe more relevant example--this one has been tested (Duh!), btw:
    - (IBAction)done {
    // get the currently selected string
    NSInteger row = [pickerView selectedRowInComponent:0];
    NSString *selection = [dataArray objectAtIndex:row];
    NSLog(@"%s: selection=%@", _func_, selection);
    // set text in textBox property of parent controller
    [self.parentViewController setValue:selection forKeyPath:@"textBox.text"];
    [self dismissModalViewControllerAnimated:YES];
    I have tried to implement this code
    [self.parentViewController setValue:21 forKey:@"test"];
    but it is generating an error stating
    passing argument 1 of 'setValue:forKey:' makes pointer from integer without a cast
    Yeah, referring to the doc, [setValue:forKey:|http://developer.apple.com/iphone/library/documentation/Cocoa /Reference/Foundation/Protocols/NSKeyValueCodingProtocol/Reference/Reference.html#//appleref/occ/instm/NSObject/setValue:forKey:] wants an id type (pointer to an object of any Obj-C class) for the first arg. Since 21 is an int, i.e. a scalar value, the compiler doesn't like it (and the runtime system would like it even less).
    However when you want to use KVC to set a scalar property, the methods are actually smart enough to extract an int if you provide a NSNumber object (see "Setting Attribute Values Using Key-Value Coding" under [Key-Value Coding Fundamentals|http://developer.apple.com/iphone/library/documentation/Cocoa/Conc eptual/KeyValueCoding/Concepts/BasicPrinciples.html#//apple_ref/doc/uid/20002170 ] in the Key-Value Coding Programming Guide). So if 'test' is an int ivar of the parent controller, something like this should work:
    [self.parentViewController setValue:[NSNumber numberWithInt:21] forKey:@"test"];
    Does that cover your questions? Sorry again for the bad code. Most of the examples I post are pasted directly from working, tested code, and I usually add a disclaimer if it's just something I keyed into the forum. But when I"m having a senior moment all bets are off.
    - Ray

Maybe you are looking for