JPQL: problem creating it dynamically

I am building a JPQL String dynamically such that the entity requested and the criteria for the search will determine what the JPQL String will be. Example is like this
        BaseQueryBuilder builder = new AnnuityPolicyQueryBuilder();
        builder.setSexCd("M");
        builder.setLastName("a", WCString.LIKE);
        builder.setStatus("I");this piece of code should create a Query object with the JPQL string
SELECT o FROM AnnuityPolicy o WHERE o.status = :status AND o.lastName LIKE :lastName AND o.sexCd = :sexCdwhen I begin to dynamically set the parameter, an IllegalArgumentException is thrown like this:
Exception in thread "main" java.lang.IllegalArgumentException: You have attempted to set a parameter value using a name of :sexCd that does not exist in the query string SELECT o FROM AnnuityPolicy o WHERE o.status = :status AND o.lastName LIKE :lastName AND o.sexCd = :sexCd.
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.setParameterInternal(EJBQueryImpl.java:614)
        at oracle.toplink.essentials.internal.ejb.cmp3.EJBQueryImpl.setParameter(EJBQueryImpl.java:161)
        at com.leadway.util.eao.QueryBuilderUtil.buildQuery(QueryBuilderUtil.java:77)
        at com.mck.practical.eao.test.AnnuityPolicyEAO.findPolicies(AnnuityPolicyEAO.java:61)what could be wrong with this design. If I copy the same JPQ into the createQuery() method, it works fine and smooth.
Regards,
Michael

There should be no need for you to access the internals of the EnityManager to have a query parsed correctly. It should just work as is. Can you please provide the snipit of code that sets the parameter. Based on the exception you are getting it appears that James' suggestion is the problem. Please verify that you are calling setParameter("_*sexCd*_", Object) and not setParameter("_*:sexCd*_", Object);
If you are sure that you are not including the colon ( _:_ ) when setting the parameter verify, if you are using named queries, that the query you are getting is the query you expect.
If these prove to not be the problem and you are sure it is an activeSession issue can you provide information on your application and the state of the EM. Are you using containerManaged Entity Managers or Application Managed. Is your application in a container or Java SE? Is the EM in a transaction?
--Gordon ( www.eclipselink.org )                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Problem - Creating a Dynamic LOV using duplicate value in select statement

    I am trying to create a Dynamic LOV by attempting to follow a pattern similar to the following:
    select shop_name d, shop_id r
    from shops
    order by 1
    However, I want to use the shop_name twice as in the following because I do not have any other unique identifier available such as a shop_id to associate with the shop name:
    select shop_name d, shop_name r
    from shops
    order by 1
    But I get an error where I am not allowed to duplicate the shop_name in the select statement. I read somewhere on this forum where it can be done but I can't find exactly how.
    Can someone tell or show me how to accomplish this?
    Thanks in anticipation for your answer.
    Thanks,
    Ric

    Ric,
    I just tried to do this on APEX 3.0, and it worked just fine with this SQL:
    select ename d, ename r from emp order by 1Perhaps you could put an example on apex.oracle.com or specify the error message that you're getting.
    So as long as you have uniquely aliased both columns, this should not present a problem.
    Thanks,
    - Scott -

  • Problem with tutorial:Creating a dynamic playlist for streaming flash video

    hi, anyone tried the tutorial: creating a dynamic playlist
    for streaming flash video?
    i follow the instruction exactly as stated in the tutorial
    and test the fla file, it worked perfectly well when i open the swf
    using the macromedia flash 8. Everything look fine. Nothing is
    changed except the url is changed to "rtmp://localhost/videosource"
    in the xml file.
    after i publish the file using the setting: access network
    only, i try to open the swf and html file from the folder, the
    thumbnail did not appear and there is no way i can click on any
    videos. What i see is only the list, and there is no response from
    the flash media server 2. All the files is in the same folder.
    Anyone please help with this problem???? thanks

    ....i debug the movie step by step
    and realised that the xml file is being read by the code...
    Your original problem stated it worked but not when playing
    outside the
    Flash authoring environment by simply loading the swf from
    the hard drive.
    The Flash authoring environment is a trusted environment and
    so you really
    need to test in the actual deployment mode which loading an
    swf from the
    hard drive is not a valid deployment unless an installed
    Flash player is
    available outside the web browser which you would have as you
    have the
    authoring tool and your users will not.
    Use a browser with
    http://yourdomain.com/yourmovie.html
    to do final
    debugging.
    In this regard you may need to debug the movie while running
    in real time
    mode in a web browser with
    http:// A technique to trace I suggested is to
    create a temporary TextField perhaps named out_txt and send
    trace message to
    it such as out_txt.text += "My Trace Expression".
    Lon Hosford
    www.lonhosford.com
    May many happy bits flow your way!
    "free23" <[email protected]> wrote in
    message
    news:[email protected]...
    sorry but i don't understand what you mean....i debug the
    movie step by step
    and realised that the xml file is being read by the code...
    this is a sample of my log files:
    #Fields: date time x-pid x-status x-ctx x-comment
    2006-05-15 20:08:58 3072 (i)2651170 Unloaded application
    instance
    videosource/_definst_ -
    2006-05-15 20:48:19 3848 (s)2641173 FCApplication loaded
    successfully.
    2006-05-15 20:48:19 3848 (s)2641173 Communication Framework
    loaded
    successfully.
    2006-05-15 20:48:19 3848 (s)2641173 SimpleConnect loaded
    successfully. -
    2006-05-15 20:48:19 3848 (s)2641173 VideoConference loaded
    successfully. -
    2006-05-15 20:48:19 3848 (s)2641173 Video Playback loaded
    successfully. -
    2006-05-15 20:48:19 3848 (s)2641173 Communication Components
    loaded
    successfully.
    2006-05-15 20:48:19 3848 (s)2641173 Sending this message:
    Hello! You are
    connected as: undefined -
    2006-05-15 20:48:19 3848 (e)2641190 Error : command msg sent
    before client
    connection has been accepted. -
    2006-05-15 20:48:20 3848 (s)2641173 Sending this message:
    Hello! You are
    connected as: undefined -
    2006-05-15 20:48:20 3848 (e)2641190 Error : command msg sent
    before client
    connection has been accepted. -
    2006-05-15 20:48:20 3848 (s)2641173 Sending this message:
    Hello! You are
    connected as: undefined -
    2006-05-15 20:48:20 3848 (e)2641190 Error : command msg sent
    before client
    connection has been accepted. -
    2006-05-15 20:48:20 3848 (s)2641173 Sending this message:
    Hello! You are
    connected as: undefined -
    2006-05-15 20:48:20 3848 (e)2641190 Error : command msg sent
    before client
    connection has been accepted. -
    2006-05-15 20:48:20 3848 (s)2641173 Sending this message:
    Hello! You are
    connected as: undefined -
    2006-05-15 20:48:20 3848 (e)2641190 Error : command msg sent
    before client
    connection has been accepted. -
    2006-05-15 20:49:42 3848 (s)2641173 Sending this message:
    Hello! You are
    connected as: false -
    hope this help...

  • Problem redirecting to dynamically created htmls pages

    Hello All,
    Scenario is like this, i am creating the dynamic htmls pages, in the servlets
    and after creating the htmls pages in the servlets , the control passes to
    the jsp page, where i am including the html page that is created at the servlets,
    its works fine, but some time it shows me null exception at the jsp page, i.e
    it won't find the htmls pages, even they are created b'fore.
    I am using weblogic server 6.1 with sp3.
    Can anybody know what is the reason.

    Same problem here. Hopefully apple can get this fixed asap. I tried this with numbers and an Excel file and it worked just fine.
    Message was edited by: Spectre
    Message was edited by: Spectre

  • Problems creating dynamic selection screen

    Hi all,
    i'm trying to dynamically generate a selection screen and show it as subscreen using the two function modules FREE_SELECTIONS_INIT and FREE_SELECTIONS_DIALOG. I call the function modules in the PBO of the therefor defined subscreen. The FREE_SELECTIONS_DIALOG fm has the two import parameter "as_subscreen" and "as_window". If i use the "as_window" parameter the selection screen comes up as popup. If i use the "as_subscreen" parameter, i can't see anything in my defined subscreen.
    Any suggestions ?
    Thanks in Advance
    Dirk

    Hi,
    The above requirement is not possible without using logical database.
    The reason is that the compiler identifies the below syntax only inside a LDB program .
    SELECTION-SCREEN DYNAMIC SELECTIONS
                     FOR {NODE|TABLE} node [ID id].
    The above syntax creates a subscreen container on the standard selection screen of the program during generation
    and we are able to view the dynamic selections icon on the selection screen.
    Hence it is not possible to use the FM 'FREE_SELECTIONS_DIALOG' as a subscreen without using a
    logical database of the relevant table.
    However if you dont want to create a new LDB for each table, there is a trick which needs to be performed
    once in your SAP system and all custom programs can use this FM to create a dynamic selection screen
    as a subscreen of the standard selection screen.
    The prerequisite steps are as follows:
    1: Create a dummy  / test database table in SE11 with a single field i.e. for example mandt , matnr
    2: Create a new logical database program for this table in SE36. Save and activate.
    This will create dynamic selections for the fields of the table created in step 1.
    Steps to be followed in the required custom ABAP program to create the dynamic selection screen as a subscreen.
    A: Include the LDB program created in step 2, in the attributes of the custom ABAP program.
    Now when you execute the program, you can see the dynamic selection icon for the dummy table created in step 1.
    B: In your custom program we need to suppress the icon for 'Dynamic Selections' from the standard selection screen.
       We need to perform this action, because the 'Dynamic Selections' icon always triggers a call to the
       dynamic selection screen of the included LDB progam. ( In our case a dummy table created in step 1 ).
       Whereas we want to trigger a call of the dynamic selection screen of our desired table.
       Logic is as follows:
       In 'AT SELECTION-SCREEN OUTPUT' event call the FM RS_SET_SELSCREEN_STATUS to exclude the fcode 'DYNS'.
    C: Add a pushbutton / checkbox on your selection screen to trigger a call to the FM 'FREE_SELECTIONS_INIT' &
       'FREE_SELECTIONS_DIALOG' in the 'AT SELECTION-SCREEN' event.
    D: When the user clicks the pushbutton / checkbox for dynamic selections call the above 2 FM for the desired table
        with the AS_SUBSCREEN flag of FREE_SELECTIONS_DIALOG = 'X'
    Result: Your dynamic selections screen will be created as a subscreen of the standard selection screen and not as a pop-up.
    Advantage: With the creation of the single custom table & LDB, you are now able to create dynamic selections as subscreen
    in any program in the system. All we need to do is follow the steps A, B & C in each program.
    Note: Your other restrictions with dynamic selection screen ie. submit in background , save as variant still remain and
    you need to handle them accordingly.
    let me know if you need sample code.
    Regards,
    Bhawit Kumar

  • Problem with creating an dynamic internal table with only one field.

    Hi,
    i create an internal table like this:
    FIELD-SYMBOLS: <GT_ITAB>      TYPE TABLE,
                   <GS_ITAB>,
                   <FS>.
    DATA: GT_DATA TYPE REF TO DATA.
    DATA: GS_DATA TYPE REF TO DATA.
    DATA: TABNAME   LIKE DD03L-TABNAME.
    DATA: FIELDNAME LIKE DD03L-FIELDNAME.
    DATA: TBFDNAM   TYPE TBFDNAM VALUE 'LFA1-NAME1'.
    SPLIT TBFDNAM AT '-' INTO TABNAME FIELDNAME.
    CREATE DATA GT_DATA TYPE TABLE OF (TABNAME).
    ASSIGN GT_DATA->* TO <GT_ITAB>.
    CREATE DATA GS_DATA  LIKE LINE OF <GT_ITAB>.
    ASSIGN GS_DATA->* TO <GS_ITAB>.
    SELECT * FROM (TABNAME) INTO CORRESPONDING FIELDS OF TABLE <GT_ITAB>.
      BREAK-POINT.
    it works OK.
    Now i want to create an internal table not like LFA1 but with LFA1-NAME1 Field TBFDNAM.
    It's not only LFA1-NAME1 it shell be the value of TBFDNAM.
    When i change
    CREATE DATA GT_DATA TYPE TABLE OF (TABNAME).
    to
    CREATE DATA GT_DATA TYPE TABLE OF ( TBFDNAM).
    i get an shortdump.
    Any idea?
    Regards, Dieter

    Hi Dieter,
    Your approach is ok, but it will create dynamic table without a structure of NAME1. Only the line type will be suitable (but field name will not exists -> hence the error in the select statement).
    In this case you need to create a dynamic table which structure consists of one field named NAME1.
    This code is the appropriate one:
    " your definitions
    DATA: tabname LIKE dd03l-tabname.
    DATA: fieldname LIKE dd03l-fieldname.
    DATA: tbfdnam TYPE tbfdnam VALUE 'LFA1-NAME1'.
    FIELD-SYMBOLS <gt_itab> TYPE table.
    "new ones
    DATA: it_fcat TYPE lvc_t_fcat WITH HEADER LINE.
    DATA: gt_itab TYPE REF TO data.
    " get table and fieldname
    SPLIT tbfdnam AT '-' INTO tabname fieldname.
    " create dynamic table with structure NAME1 (only one field)
    it_fcat-fieldname = fieldname.
    it_fcat-tabname = tabname.
    APPEND it_fcat.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
      EXPORTING
        it_fieldcatalog           = it_fcat[]
      IMPORTING
        ep_table                  = gt_itab
      EXCEPTIONS
        generate_subpool_dir_full = 1
        OTHERS                    = 2.
    CHECK sy-subrc = 0.
    " dereference table
    ASSIGN gt_itab->* TO <gt_itab>.
    " insert data only to NAME1 field
    SELECT * FROM (tabname) INTO CORRESPONDING FIELDS OF TABLE <gt_itab>.
    I checked, this works fine:)
    Regards
    Marcin

  • How to create a dynamic action from link column in classic report

    I Have an apex page that display a modal window utilizing jquery. In the modal window I have a classic report with a link column that I want to capture its click event.
    I was thinking I could create a dynamic action with selection type=jquery selector. Not for sure if I need to do anything on link column and do not know the syntax
    for jquery selector. Would appreciate any help or direction???

    Thank you for your response. I am very new to Jquery so don't understand all that well.
    What I did:
    I created a dynamic action
    Event: Click
    Selection Type: jQuery Selector
    jQuery Selector: tdheaders
    Created True Actions
    I created an alert to see if this is being executed.
    Alert 'I made it here'
    What I have:
    I created a report region with the following query:
    Select empno, ename, 'SELECT' from emp
    where (ename like '%'||ltrim(rtrim(:P2_SEARCHPU))||'%'
    or :P2_SEARCHPU is null)
    I created 'SELECT' column as Link Column
    Report Attributes
    Link Text Select
    Target Page in this Application
    Page 2
    Region Header
    <div id="ModalForm2" title="Employee List" style="display:none">
    Region Footer
    </div>
    This report is displayed in a modal form when a button is clicked.
    Code for modal window in Page Header
    <script type="text/javascript">
    $( function() {
    $('#ModalForm2').dialog(
    { modal : true ,
    autoOpen : false ,
    buttons : {
    Cancel : function() {
    closeForm2();
    function openForm2()
    $('#ModalForm2').dialog('open');
    function closeForm2()
    $('#ModalForm2 input[type="text"]').val('');
    $('#ModalForm2').dialog('close');
    </script>
    I am trying to capture the click event on the link column of the report in the modal form. I want to pass a couple of column values
    back to the main form and close the modal window. I do not want to do the submit that happens if I click on the link column and link back to the main page(2)
    If I let the submit to happen, all other entered fields are cleared on my main form.
    Just don't understand the jQuery selector. I have no problem catching the button clicks on the modal form.

  • How to create Exchange dynamic distribution list using multivalue extension custom attribute

    I am trying to create a dynamic distribution list using an ExtensionCustomAttribute.  I am in hybrid mode with Exchange 2013.  The syntax I have is this: 
    New-DynamicDistributionGroup -Name "DG_NH" -RecipientFilter {(ExtensionCustomAttribute2 -eq 'NH')} 
    This works correctly on-prem.  But hosted always results in an empty list.  I can see in dirsync the attribute is in the hosted environment, but for whatever reason, the distribution group gets created but always come up null.
    If I create a group looking at the single valued attributes, such as CustomAttribute6 -eq 'Y', it works correctly on-prem and hosted.  
    If anyone has any suggestions I would appreciate it.

    I don't think I provided enough information about the problem.  Let me add some and see if it makes sense.
    I have an Exchange 2013 on-premise configured in hybrid mode with Office365.  For testing purposes, I have 2 users, Joe and Steve, one with the mailbox on-prem, and the other with the mailbox in the cloud.  Each of them has CustomAttribute6 = 'Y'
    and ExtensionCustomAttribute2 = 'NH'. Dirsync shows these users and these attributes are synced between on-prem and cloud.
    Using on-prem Exchange powershell, I run the following command:
    New-DynamicDistributionGroup -Name "DG_NH" -RecipientFilter {((RecipientType -eq UserMailBox) -or (RecipientType -eq MailUser) -and (CustomAttribute6 -eq 'Y')} 
    This correctly finds the 2 users when I query for them as follows:
    $DDG = Get-DynamicDistributionGroup DG_NH
    Get-Recipient -RecipientPreviewFilter $DDG.RecipientFilter | FT alias
    So I then delete this DG, and recreate it this time looking at the multi-value attribute ExtensionCustomAttribute2, as follows:
    New-DynamicDistributionGroup -Name "DG_NH" -RecipientFilter {((RecipientType -eq UserMailBox) -or (RecipientType -eq MailUser) -and (ExtensionCustomAttribute2 -eq 'NH')} 
    Replaying the query above, I can see this also works fine and finds my two users.
    Next I open a new powershell and connect to Office 365 and repeat the process there.
    New-DynamicDistributionGroup -Name "DG_NH" -RecipientFilter {((RecipientType -eq UserMailBox) -or (RecipientType -eq MailUser) -and (CustomAttribute6 -eq 'Y')} 
    This correctly finds the 2 users when I query for them.
    And then delete the group and recreate it using the multi-value attribute:
    New-DynamicDistributionGroup -Name "DG_NH" -RecipientFilter {((RecipientType -eq UserMailBox) -or (RecipientType -eq MailUser) -and (ExtensionCustomAttribute2 -eq 'NH')} 
    When I run the query this time it produces no result.  Every test I try results in an empty group if I am using a multi-valued attribute in the search criteria in the cloud.  If I use single valued attribute, it works fine.
    I really need to be able to get multi-valued DDG's working in the cloud.  If anyone has done this and has any suggestions, I would appreciate seeing what you did.  And if this is the wrong forum to port this, if you can point me to a more suitable
    forum I will report there.
    Thanks,
    Richard

  • How to create a dynamic link in a Form to link to a specific FOLDER

    Hello,
    I have created a reports of all employees of my department.
    This reports shows me the empno and ename
    When I clicked on a empno ( for example empno = 1 ) then then I got a MASTER DETAIL FORM about that employee(empno = 1) .
    Who he or she is and which course he or she had followed.
    I want create a dynamic link in the MASTER DETAIL FORM which shows me directly the folder of that employee ( in this example folder 1 ).
    If I clickt on the report with all employees of my department on an other number ( for example empno = 3333333) then if I click on the dynamic link in the MASTER DETAIL FORM I want to see the folder of employee 3333333 !!! You know what I mean ?
    What I want to know is, how to create a dynamic link that shows me directly a folder which is dependent on which empno I had clicked on in the report ( report with employee numbers and ename )
    Is there any way to pass some parameters into a link to a Folder ? Is this possible in Portal ? Does anyone know how to do this, or do you have a suggestion how to solve this problem ?
    Thanks a lot !!!
    Chu Lam

    Hi Chetan,
    I am glad that someone had replied on my question.
    I will explain it to you again.
    I have created a report that shows me all employees. If I click on a employee number then I get an MASTER DETAIL FORM on my screen with all the information(where he works now and which number I have to dial ifhow can I reach him by telephone) of that employee on which number I clicked on.
    I really like this mechanism. (You click on a number and the information that you see in the next screen is dependent of the number you clicked on ! )I have created all this. It works fine.
    What I want is to expand this example.
    Every employee has a FOLDER (yes, those ones in Content Area ) which they can insert text or image into that folder. The folder name is just the employee number. ( employee with employee number 3303, he owns a folder which is named 3303 and an employee with empno 9999, he or she owns a folder with the name 9999. )
    Every employee can tell more about himself in that FOLDER by iserting text and images. For example : What he likes, pictures of his vacation, something like this.
    What I want is this :
    If I click on the first report,which provides me all employees on screen, on a employee number 3303 then I get a Master Detail Form on my screen with all information about that employee with employee number 3303. And I want in this MASTER DETAIL FORM to create a link that shows me directly the FOLDER of that employee ( 3303), so I can learn more about employee with employee number 3303. But I don't know how to create this link.
    That link had to be dependent on the employee number. The difficult thing about this link is that this link had to be dynamic.
    I hope this will make it clear to you :
    (report all employees:)
    empno ename
    3301 john smith
    3302 peter clark
    3303 wilson jones
    If I click on a empno ( for example 3303) then I get a MASTER DETAIL FORM which provides me information.
    (MASTER DETAIL FORM )
    EMPNO 3303
    ENAME wilson jones
    department New York
    mobile number 98908763
    Company tel. no day
    AOL 097485838 monday till wednesday
    Oracle 04848584333 thursday and friday
    LINK
    (what I want is to create a link here )
    If I click on LINK in this MASTER DETAIL FORM then I want to link to the FOLDER of this employee ! ( In this example it is FOLDER 3303.
    BUT IF I CLICKED ON THE FIRST REPORT ON A DIFFERENT NUMBER ( FOR EXAMPLE 3301) THEN IF I CLICK ON LINK IN THE MASTER DETAIL FORM THEN I HAVE TO LINKED TO FOLDER 3301.
    I just want to know how to make a link like this ( create a dynamic link to a specific folder ).
    Thanks in Advance.
    Chu

  • Error while creating a dynamic internal table refers to custom field

    Hi all,
    I am getting the exception TYPE_NOT_FOUND when I try to create a dynamic internal table using:-
    DATA: gr_desc TYPE REF TO cl_abap_typedescr.
    gr_desc = cl_abap_typedescr=>describe_by_name( p_field ).
    The field p_field is a Z-field inside a DB table, (e.g. a user added field in MARA). The statement fails at that point and gives a runtime exception. Any suggestions to how I may solve this problem? Or any alternatives for the same? I guess we face this issue for all custom fields..has SAP released a note for this??
    Thanks..

    that's just the wrong method, you should use DESCRIBE_BY_DATA
    gr_desc = cl_abap_typedescr=>describe_by_data( p_field ).
    Note: DESCRIBE_BY_NAME is to be used for referencing a DDIC type by its name. Example:
    gr_desc = cl_abap_typedescr=>describe_by_name( 'MARA-ZZFIELD' ).

  • Javascript error while creating rows dynamically (IE)

    hi all,
    as per the requirement i am creating rows dynamically by createElement() method ...
    when i load the page method where i am creating the rows is called on onLoad ... bring the data required .. some method code like this ...
    function createRows()
    var myTable = document.getElementById("itemTable");
              var tBody = myTable.getElementsByTagName('tbody')[0];
              alert(tBody);
              var td;
              var classVar;
              var browser = navigator.appName;
              if(browser=="Microsoft Internet Explorer")
                   classVar = "className";
              }else{
                   classVar = "class";
              <%
              Set keyset = checklistItems.keySet();
              Iterator keySetIterator = keyset.iterator();
              while(keySetIterator.hasNext())
                   String checklistType = (String)keySetIterator.next();
                   %>
                   if ((type == "Show_All") || (type == '<%=checklistType%>'))
                                  var newTypeTR = document.createElement('tr');
                                  var newTypeTD = document.createElement('td');
                                  newTypeTD.setAttribute("width","100%");
                                  newTypeTD.setAttribute(classVar,"font_black_s_bold");
                                  if(browser=="Microsoft Internet Explorer")
                                       newTypeTD.innerText = '<%= checklistType %>';
                                  else
                                       newTypeTD.innerHTML = '<%= checklistType %>';
                                  newTypeTR.appendChild (newTypeTD);
                                  newTypeTR.setAttribute(classVar,"td5");
                                  tBody.appendChild (newTypeTR);
    table is defined in jsp like
    <table width="727" cellSpacing="0">
                   <tr>
                        <td>
                             <div id="checklist_item_div">
                                  <table border="0" id='itemTable' width="100%" cellPadding="4" cellSpacing="0">     
                                  <tbody>
                                       <tr>
                                       </tr>     
                                  </tbody>
                                  </table>
                             </div>
                        </td>
                   </tr>
    </table>
    Now i have a combo box on my page , where onchange i am bringing new data using ajax to fill ....
    and now i want to flush all the rows i created earlier ...and again call the same method as above to create the rors and cols dynamically ...
    so after ajax call my script code to flush all rows and cols like
    var browser=navigator.appName;
                        if(browser=="Microsoft Internet Explorer")
                             itmTable.innerText = "<tbody></tbody>";
                        else
                             itmTable.innerHTML = "<tbody> </tbody>";
    but when i call the createRows function after this , i got the error on the line
    tBody.appendChild (newTypeTR);
    as tBody now getting as undefined .... this problem is with IE (working on IE 7.0)
    works very fine on firefox and safari browsers ...
    please helm me out ...
    Edited by: prashant-kadam on Jun 12, 2008 5:22 AM

    what does this have to do with Java?
    hint: Java != Javascript

  • Problem in aligning dynamic UI with the static UI

    Hi All,
    I have problem in aligning dynamic UI with the static UI, I am using Matrix layout.
    Static fields are spread over 2 colums and 3 rows:
    lableA SPACE input field SPACESPACE lable B SPACE input field
    lableC SPACE dropdown SPACESPACElableD SPACE dropdown
    lableE SPACE dropdown SPACESPACElableF SPACE dropdown
    Now when a value is selected in C, than E becomes visible, and depending on the values selected in E, there are dynamic UI generated, i.e dynamic lables and depending on some validation it will be either a dropdowns or input fiels or both.
    at run time screen is like this:
    lableA SPACE input field SPACESPACE lable B SPACE input field
    lableC SPACE dropdown SPACESPACElableD SPACE dropdown
    lableE SPACE dropdown SPACESPACElableF SPACE dropdown
    dynaSPACEdropdown
    dynbSPACEinput field
    if I change my selection in E than layout looks like:
    lableA SPACE input field SPACESPACE lable B SPACE input field
    lableC SPACE dropdown SPACESPACElableD SPACE dropdown
    lableE SPACE dropdown SPACESPACElableF SPACE dropdown
    dynaSPACESPACEdropdown
    dynbSPACESPACEinput field
    Requirment: I need all the lables as well as dropdown/ input fiels in line with the static fields irrespective of my selection in E.
    Something like this:
    lableA SPACE input field SPACESPACE lable B SPACE input field
    lableC SPACE dropdown SPACESPACElableD SPACE dropdown
    lableE SPACE dropdown SPACESPACElableF SPACE dropdown
    dyna   SPACEdropdown
    dynbSPACESinput field
    dyncSPACESdropdown
    All this elements are in a group and that group has 2 transparent containers, 1 for static and for holding dynamic UI.
    I tried playing with the container properties, and also tried fixing width of dynamic UI but still the alignment issue is encountered.
    Can U guys plz give in ur valuable inputs as i need to fix this urgently.
    Regards,
    JJ

    Hi Armin,
    Can you please elaborate your solution ?, I do not have an idea of InvisibleElement & IWDView.resetView() ,
    If you can give me the exact pointer than it would be great and a good learning exp. for me.
    Thanks for the action assignment part, it worked.
    if (wdContext.nodeMaterialClass().size() > 0 && wdContext.currentContextElement().getActionMatCls()) {
         if (wdContext.currentMaterialClassElement().getMaterialClass_Description() != null || !wdContext.currentMaterialClassElement ().getMaterialClass_Description().equalsIgnoreCase(" ")) {
               IWDGroup Searchgroup = (IWDGroup) view.getElement("DynGroup");
    Searchgroup.destroyAllChildren();
    view.getContext().reset(false);
                                                      for (int i = 0; i < wdContext.nodeMaterialCharateristcs().size(); i++) {
                                  //this for label
         IWDLabel CharLabel = (IWDLabel) view.createElement(IWDLabel.class, "label" + i);
         CharLabel.setText(wdContext.nodeMaterialCharateristcs().getMaterialCharateristcsElementAt(i).getDescr_Char());
         CharLabel.setDesign(WDLabelDesign.EMPHASIZED);
         CharLabel.createLayoutData(MatrixHeadData.class);                              CharLabel.setWidth("154px");                              Searchgroup.addChild(CharLabel);
                 further there are conditions to create either dropdown or input field
    Can you please point where and how to apply your solution.
    Regards,
    JJ

  • Can I create a dynamic number of inputs during runtime?

    Can I create a dynamic number of inputs during runtime?
    Oracle 11g
    Application Express 4.0.2.00.06
    Here is my problem:
    We have a table that holds metadata about files (hardcopy or softcopy files).
    We expect we may need more columns in the table at some point and don't want to modify the table or the application.
    So in order to do this I would like to create:
    A table called TBL_FILE with the columns:
    TBL_FILE_ID               NUMBER                (This will be the primary key)
    TBL_FILE_NAME          VARCHAR2(1000) (This will be the name of the file)
    A second table will be called TBL_FILE_META with the columns:
    TBL_META_ID               NUMBER               (This will be the primary key)
    TBL_FILE_ID               NUMBER                (This will be the forign key to the file table)
    TBL_META_COLUMN     VARCHAR2(30)     (This is what the column name would be if it existed in TBL_FILE)
    TBL_META_VALUE          VARCHAR2(1000) (This is the value that record and the 'would be' column)
    So a person can have as much meta data on the file with out having to add columns to the table.
    The problem is how can I allow users to add as much data as they like with out having to re develop the page.
    Other things to note is that we would like this to be on a single page.
    I know how to add we can create multi-row inserts by using a SQL Query (updateable report),
    however the TBL_META_VALUE column in the TBL_FILE_META will sometimes be a select list and other times a text box or number field.
    So I don't see now a SQL Query (updateable report) would work for this and I can't create an array of page items at run time can I?
    Any idea's how I could accomplish this? Is there a better way of doing this?
    Also is there a term or a name for what I am doing by creating these 'virtual' columns in another table?
    I found this method when looking at Oracles Workflow tables.

    Welcome to the Oracle Forums !
    >
    Can I create a dynamic number of inputs during runtime?
    Oracle 11g
    Application Express 4.0.2.00.06
    Here is my problem:
    We have a table that holds metadata about files (hardcopy or softcopy files).
    We expect we may need more columns in the table at some point and don't want to modify the table or the application.
    So in order to do this I would like to create:
    A table called TBL_FILE with the columns:
    TBL_FILE_ID NUMBER (This will be the primary key)
    TBL_FILE_NAME VARCHAR2(1000) (This will be the name of the file)
    A second table will be called TBL_FILE_META with the columns:
    TBL_META_ID NUMBER (This will be the primary key)
    TBL_FILE_ID NUMBER (This will be the forign key to the file table)
    TBL_META_COLUMN VARCHAR2(30) (This is what the column name would be if it existed in TBL_FILE)
    TBL_META_VALUE VARCHAR2(1000) (This is the value that record and the 'would be' column)
    So a person can have as much meta data on the file with out having to add columns to the table.
    The problem is how can I allow users to add as much data as they like with out having to re develop the page.
    >
    Creating Page Items dynamically is not available. You will have to create excess items and hide/show , etc. But you cannot change the Item Type. All in all, too many limitations in this approach.
    >
    Other things to note is that we would like this to be on a single page.
    >
    The 100 item limit will hit you if you go with extra item on page. With Tabular Form that should not be a limitation, unless you are exceeding the 50 item limit of APEX_APPLICATION.G_Fnn items, and the 60 column limitation of Report region with "Use Generic Column Names (parse query at runtime only)" of Dynamic region.
    >
    I know how to add we can create multi-row inserts by using a SQL Query (updateable report),
    however the TBL_META_VALUE column in the TBL_FILE_META will sometimes be a select list and other times a text box or number field.
    >
    If the type if item is variable it only means you need a way to store the item type. Meta Data of the Meta Data.
    >
    So I don't see now a SQL Query (updateable report) would work for this and I can't create an array of page items at run time can I?
    >
    Yes, you can do it. Updatable report/ Tabular Form query can be constructed from the Meta Data using PL/SQL Function Returning SQL Query . It will be a bit of coding in PL/SQL where you use the Meta Data and the Meta Data of the Meta Data to piece together your SELECT with the right APEX_ITEMs. It might have a performance penalty associated with it, but will not be a serious degradation.
    >
    Any idea's how I could accomplish this? Is there a better way of doing this?
    Also is there a term or a name for what I am doing by creating these 'virtual' columns in another table?
    I found this method when looking at Oracles Workflow tables.
    >
    I guess that is just a good TNF. It is the Master-Detail Design Pattern, that sound more modern ? ;)
    Regards,

  • Acrobat 9 - how do you create a dynamic stamp to include the current date (java script)

    I have seen my question multiple places and times but the resolutions provided have not worked for me.
    I am running Acrobat 9 Pro, cannot run X or XI due to the use of ProSystem fx Engagement.
    I want to create what I thought would be a simple stamp. My initials and the current date. i.e. "crm 01/10/13".
    Simple right? I created a PDF of my initials. Now I just need the text field with the proper Java Script to insert the date, correct?
    I have tried opening "Dynamic.pdf" and copying and pasting the text field that includes the Java Script:
    " event.value = (new Date()).toString(); AFDate_FormatEx("h:MM tt, mmm dd, yyyy"); "
    The date does not update, it stays static.
    I have manually entered the Java Script.
    I have edited the Java Script to remove the "Ex".
    I have edited the Java Script to revise the "yyyy" to "yy".
    I have edited the Java Script to remove the " h:MM tt, " trying different formats to get "dd/mm/yy".
    I have selected "Use single-key accelerators to access tools" in Preferences/General.
    I have tried PDF files, PNG files. I have created the image files from Word and Excel.
    I am at my wits' end. Can someone PLEASE assist me to resolve what should be a simple issue (I hope).
    Thank you in advance.

    Thank you for your response.
    Your script works well, but I still have the same issue.  The date is remaining static to the system date when the stamp is created.  My initial idea was to create a pdf of my initials "crm" and then add the text field with the java script for the date behind my initials.  "crm" + (TEXT FIELD with JS).  I wanted 3 stamps, red, blue and green.  The colors correspond to specific processes in our workflow.
    Your script adds my initials as well as the date.
    My machine is running Windows 7.
    My stamps are located:
    C://Documents/Acrobat Stamps/...
    Acrobat templates:
    C://Program Files (x86)/Adobe/Acrobat 9.0/Acrobat/plug_ins/Annotations/Stamps/ENU/...
    I have no problem creating stamps, just a stamp that will use the current system date.  I HATE using the typewriter for my initials and the date.  I guess I can stamp my initials and then type the date...but what is the point?
    Do you have any further thoughts or suggestions?
    Thank you very much.
    crm 01/11/13 

  • Creating two dynamic action in a page

    Hi,
    I have created two dynamic action under the page_items(p6_item,p6_item1 both are hidden).
    First dynamic action under p6_item is action1.
    properties of action Event-> Change
    Selection_Type->Item
    Item-> p6_Item
    Value-> show
    (When i Hit the button viewall it should only display region1)
    True Action:
    sequence->10, Action->Show, Fire->Yes, Selection Type->region, Region->region1
    sequence->20, Action->Hide, Fire->Yes, Selection Type->region, Region->region2
    False action:
    sequence->30, Action->Hide, Fire->Yes, Selection Type->region, Region->region1
    Second Dynamic action under p6_item1 is action2
    properties of action Event-> Change
    Selection_Type->Item
    Item-> p6_Item1
    Value-> show
    (When i Hit the button Search it should only display region2)
    True Action:
    sequence->10, Action->Show, Fire->Yes, Selection Type->region, Region->region2
    sequence->20, Action->Hide, Fire->Yes, Selection Type->region, Region->region1
    False action:
    sequence->30, Action->Hide, Fire->Yes, Selection Type->region, Region->region2
    Here the problem is, when i hit the viewall button it is not displaying region1 instead region2 is displayin region1 is hidden. when i hit the Search Button it is displaying region2 , region1 is hidden. Foer me, When viewall hitted region1 should only display not region2. When Search button hitted region2 should only display not region1.

    Hi little foot,
    I have created my page in apex.oracle.com. you can clearly see the issue which i am having in the page.
    Workspace:listen
    Username: [email protected]
    Password:apex
    Application Name: 45665
    Page: page1

Maybe you are looking for

  • Sender SOAP Adapter

    Hi, Scenario is Sender SOAP and Receiver (Server Proxy) . Integrated the ESS applications on .net portal using soap adapter..example salary slip, ctcview.... If we give input as empno to soap adapter it will give you salary details back to .net porta

  • Portal Admin pages do not render properly

    Whenever I try to login to the Portal Admin pages, it throws the following errors. Interestingly, some pages are not rendered properly while other pages render fine. For example, Delegated Administration & Service Administration render fine. But none

  • Foreign currency and Related Party Disclosure

    Dear Sir, Please tell me transaction code for reporting purpose...   1. Earnings in foreign currency   2.Expenditure in foreign currency   3. Related Party Disclosure Please tell me transaction code only report only... Please revert I will waiting fo

  • Where is the Genius Mix download button in IOS 7 Music app?

    In the IOS 7 Music app there is no longer a download button to get your Itunes Genius mixes downloaded to your phone.  What's up with that?  Is there another way to do it?  There used to be a button at the top left to download the Genius mix from you

  • How to register flex webservice so i could connect from c#

    Hi I know that i could connect to flex using c# and that could be done through webservices my question is: how I could register these webservices... do I need to install something to have these webservices what i need to do... is sending some data fr