String trim() does not work

Here is the code:
String item = " abc ";
int before = item.length();
item.trim();
int after = item.length();
The result is before == after.
What's wrong?

Remember that Strings in Java are immutable, so calling item.trim() does nothing to the original String. Did you notice that the trim() method returns a String? The String that is returned is the new String that has been trimmed. So, you must assign this new value to the item variable.
item = item.trim();
SAF

Similar Messages

  • TRIM does not work for SSD in a RAID configuration

    According to Intel, SSDs that are used in a RAID configuration cannot use the TRIM function in Windows 7. This would seem to lead to an eventual degradation of those RAID SSD configurations. Is there any work ongoing to enable TRIM in the future?
    "....Intel later clarified that TRIM was supported for the BIOS settings of AHCI mode and RAID mode, but not if the drive was part of a RAID volume.[16]..."
    W520, i7-2820QM, BIOS 1.42, 1920x1080 FHD, 32 GB RAM, 2000M NVIDIA GPU, Samsung 850 Pro 1TB SSD, Crucial M550 mSata 512GB, WD 2TB USB 3.0, eSata Plextor PX-LB950UE BluRay
    W520, i7-2760QM, BIOS 1.42 1920x1080 FHD, 32 GB RAM, 1000M NVIDIA GPU, Crucial M500 480GB mSata SSD, Hitachi 500GB HDD, WD 2TB USB 3.0
    Solved!
    Go to Solution.

    The performance hit would only be on the write side of the equation. If the garbage collection of these SSD drives is sufficient, I wonder why TRIM exists? I'm posting an excerpt from Wikipedia on the subject below:
    "All SSDs have garbage collection. That is a function of NAND flash memory used in SSDs. Some drives may be more efficient at GC than others. Some do not recover as well as others after they have been used for a period of time. Some drives perform GC in the background when the drive is otherwise not busy with user data (idle), but there are some drawbacks to that background operation (you can see the wikipedia article for more details). In general background GC is not good for the endurance of the drive because it moves data that the OS (and user) may delete and render unnecessary to GC in the first place. The best solution is to do it on the fly as fast as possible.
    TRIM is a command sent by the OS to the drive identifying the actual logical block addresses (LBAs) that are no longer needed. To understand TRIM you must understand how the OS and SSD tracks the data. When you put an item in the OS trash you are not actually deleting the items. They are just marked ready for deletion. If the user says to empty the trash, the OS notes this and now says those LBAs are free to accept new data. This is true for all storage devices, not just SSDs. Many people do not realize that the storage device does not actually delete the data at that point. The act of erasing a file is simply the OS marking its internal lookup tables for that file as free to store new information. An HDD still has the data on the drive at that location until the OS writes something new into that spot. For an SSD it is the same; the SSD still has the data in the flash at that location until the OS writes something new into that spot. Of course the NAND flash memory requires the replacement data to be written into a new location and the old data is marked as "invalid" now. Then during garbage collection that invalid data is NOT moved with other valid data in that block to a new block.
    The performance of an SSD is at its peak when it is brand new out of the box because there is nothing to GC. Unfortunately this occurs only at the beginning of the drive's life or after you secure erase the drive and start over. Performance is also affected by the size of the over provisioning (OP) (details also in the wikipedia article above). During GC if the drive does not have to move around as much data it can operate faster. The TRIM command enables the OS to tell the SSD what LBAs are no longer valid data. Without the TRIM command this only happens when the OS tries to write something new into that same spot or it tries to replace the current data. If the SSD knew in advance that some of the LBAs holding data were invalid the drive would not move that data during GC. The effect gets you closer to the performance of a drive with larger OP. Without the TRIM command the drive will perform like it is at full capacity at all times and only has the amount of OP set at the factory (plus any space left unused during the partition process when first setting up the drive)."
    W520, i7-2820QM, BIOS 1.42, 1920x1080 FHD, 32 GB RAM, 2000M NVIDIA GPU, Samsung 850 Pro 1TB SSD, Crucial M550 mSata 512GB, WD 2TB USB 3.0, eSata Plextor PX-LB950UE BluRay
    W520, i7-2760QM, BIOS 1.42 1920x1080 FHD, 32 GB RAM, 1000M NVIDIA GPU, Crucial M500 480GB mSata SSD, Hitachi 500GB HDD, WD 2TB USB 3.0

  • After update Mac OS 10.9.1 Trim Enabler does not work anymore!

    After updating from Mac OS 10.9.0 to 10.9.1 the program Trim Enabler does not work anymore and my 4 SSDs from Samsung and Kingston are no longer supported.
    What can I do?
    Should I scrap my SSDs?
    Why does Apple do such things?
    Will Apple that I switch to Windows? There Trim works with all SSDs and BluRay will not boycott!

    Apple does not support TRIM for SSDs that were not factory
    installed and TRIM Enabler is a hack to get around this.  Any
    hack is always subject to being disabled, or worse, with any
    system update whether it is OSX or Windows.

  • Concatenating a string in a URL syntax does not work (syntax error)

    I am trying to print a Report in PDF format. The code is:
    select '<a href="http://oasdev.oh.gov./reports/rwservlet?GDMS_ACR&Y='||:P106_YEAR||'&B='||:P100_BUSINESS_UNIT_ID||'&C='||:P106_COMMISSION_ID||'&d=('||TO_CHAR(SYSDATE,'MMDDYYYYhhMISS')||')", target=_new> <font color="blue"><b>Print PDF Version of the report</b></font> </a>' url from dual
    GLOBAL_URL should carry the value ( a sring) ----> http://oasdev.oh.gov.
    Therefore I changed it to the following code:
    select '<a href="GLOBAL_URL/reports/rwservlet?GDMS_ACR&Y='||:P106_YEAR||'&B='||:P100_BUSINESS_UNIT_ID||'&C='||:P106_COMMISSION_ID||'&d=('||TO_CHAR(SYSDATE,'MMDDYYYYhhMISS')||')", target=_new> <font color="blue"><b>Print PDF Version of the report</b></font> </a>' url from dual
    But it does not work. Any suggestion would be highly appreciated.
    Thanks in advance.
    Gouri
    Edited by: user1046395 on Dec 8, 2010 8:41 AM

    When you do a select, you need to select into a variable..
    select ' Print PDF Version of the report ' url INTO <Variable>from dual
    Are you trying to run an Oracle Report from APEX??
    If so look at this thread: Using popupURL to call Oracle Reports - Problem passing parameters
    Thank you,
    Tony Miller
    Webster, TX
    When you have enough clowns, you have a circus.

  • ReadObject query by idfr does not work first call

    I am running Toplink 10.1.3.0.0 inside the oc4j container. A basic example is that I have an object Employee that has a String attribute id. This class goes to the employee table. I have set an Expression in the Toplink Workbench to do Read Object and it just checks that id = the idfr passed in as an argument. When running the query by the idfr in the container, the idfr is set as the argument and the data exists in the database. With Toplink logging turned onto FINE I see the query being run "select xyz from employee where idfr = x". But the return value from the query is null. But if I run the query through a second time it returns with the correct object. I have tried changing this to a Read All query, and then just accessing the 0th element from the List returned, and this seems to work fine. I am still concerned, though, as to why the Read Object query does not work on the first go around as is expected?

    Any reason you set the Read Object query? The Expression you've provided is the same as what TopLink generates.
    Out of interest, does the problem occur if your primary key attribute is an int/long, or some other numeric type. Does your String attribute value or query id value have trailing or leading spaces? Oracle database will trim leading and trailing blanks on INSERT/UPDATE which can lead to confusion.
    Turn the logging up to FINEST and look for log messages relating to registration of existing objects. If you can post the test code and log that would help.
    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Voice Memo does not work on 3g

    The voice memo does not work. If I scream in to the mic it finally shows movement on the readout. But, when you play it back all you get is static noise where I screamed. Other wise, any normal voice speck is totally silent.
    Actually it works with the iPhone head phones but not the mic in the phone it's self.
    Message was edited by: Hoddypeek

    Yes, the low level while recording doesn't result in a low or weak "memo". Sounds fine and mails to my email as well . . . But !
    I had a phone-message waiting two months, a little song-fragment I called home to leave with the hope that Voice-Memo would eventually save it for me. And it sounded better once mailed that it even did playing out of my cheap little land-line speaker ( I guess mic-placement is everything ! )
    But the recording was 2 min 50 seconds and trying to mail it to myself brought up the warning that it was "too big" !! Luckily, the first 27 seconds was unrelated and expendable . . . and being able to trim it did the trick.
    *So what's the size limit on a mailable Memo Apple people ?*
    ( It was 4.1 mb as attached to the mail )
    Also, how odd is it that it was still "Sending" within the iPhone, yet already sitting in my iMac's email well before the "airplane whoosh" of sent mail sounded.
    Hmm . . . . .

  • Flash Player does not work after steps to resolution

    I am using Windows 8.1 and flash player will not work.  I have "enabled" and removed Active X control as per instructions but it still does not work.

    8.1 means Ie11... and that means...
    "User-Agent Strings"
    That doesn't mean a lot, I'm sure, but it's the root of your problems, and Flash Player has nothing to do with it.
    Microsoft "rewrote" the User-Agent Strings for the abomination they call their latest and greatest browser. User-Agent Strings are what websites use to identify the browser you're using and provide the proper content for it's browser engine, like ActiveX stuff, and Flash or HTML5 video. Thanks to the geniuses in Redmond, WA, the User-Agent Strings for IE11 (which has a Trident engine), ID it as either "Gecko" (Firefox) or "Webkit" (Chrome). Problem is: when the site the directs to the content for one of these two engines, the Trident engine in IE can't intepret it and the site then sees IE as an "unidentified" browser.
    The problem with an unidentified browser is that the plug-ins in that browser aren't recognized either, so even though you're up to date, it says you need the latest Flash Player when you use IE11. YouTube... has converted to HTML5 video so if it doesn't detect Flash Player, it can display HTML5 (MP4) video which requires no plug-in to play. Facebook can't do that, because HTML5 doesn't apply to games... only video.
    Microsoft has no plans to "fix" the mess thay've created because they think it's a great idea to block you out of the websites you visit.
    They recommend using "Compatibility View" and pretending that you're using an older verison of IE... Problem with that is that it's seen limited success, and you have to enable it for EVERY page that has problems... individually.
    I'm not big on "pretending" so I recommend actually using another browser.
    Firefox (from Mozilla)
    Opera (from Opera)
    Safari (from Apple)
    Chrome (from Google)
    ANY of those will work where IE11 won't, with the Flash Player Plug-in (For all other browsers), and Chrome doesn't even need that because it has its own Flash Player plugin built in.

  • Help with util.zip up files... does not work

    I am writing a program so my mum can zip up new photos she takes and then send them to me. The program creates a html file for the webpage plus a smaller version of her original photo and places them all in a 1 folder with a new name. Al this part works... I want to afterwards place my files in a zipped up folder that she can e-mail me with her normal client. How... I picked up this code on the net and have changed it to incoporate my parameters. The files which are created ..paths are (String in an String[]) I then send to my zipping method.
    The zip file is created but does not work when I try to extract from it ??? I also know that the String [] works becuse I have made a loop to check its properties at each index.
    what am I doing wrong?
    This is a modified code I found on the internet but with no author??
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.util.zip.ZipEntry;
    import java.util.zip.*;
    public class Test{
        private File zipDir;
        private String[] filename;
        public Test(String[] recivedFilename){
            filename = recivedFilename;
            try {
                ZipOutputStream zos = new
                        ZipOutputStream(new FileOutputStream("c:\\curDir.zip"));
                from,
                zipDir("c:\\batviapictures\\", zos);
                zos.close();
            } catch(Exception e) {
                //handle exception
        public void zipDir(String dir2zip, ZipOutputStream zos) {
            try {File
                zipDir = new File(dir2zip);
                String[] dirList = filename;
                byte[] readBuffer = new byte[2156];
                int bytesIn = 0;
                //loop through dirList, and zip the files
                for(int i=0; i<dirList.length; i++) {
                    File f = new File(zipDir, dirList);
    if(f.isDirectory()) {
    String filePath = f.getPath();
    zipDir(filePath, zos);
    continue;
    FileInputStream fis = new FileInputStream(f);
    ZipEntry anEntry = new ZipEntry(f.getPath());
    zos.putNextEntry(anEntry);
    while((bytesIn = fis.read(readBuffer)) != -1) {
    zos.write(readBuffer, 0, bytesIn);
    fis.close();
    catch(Exception e) {

    I make no guarantees that this will completely solve all your problems, but I just know these calls are needed but missing from your OP:
    try {
        ZipOutputStream zos = new
                        ZipOutputStream(new FileOutputStream("c:\\curDir.zip"));
                        from,
                        zipDir("c:\\batviapictures\\", zos);
        zos.flush(); // ADD THIS after all files have been written to the zos
        zos.close();
    } catch(Exception e) {
        //handle exception
    }And
    while((bytesIn = fis.read(readBuffer)) != -1) {
        zos.write(readBuffer, 0, bytesIn);
    zos.closeEntry(); // ADD THIS after each file is written to the zos
    fis.close();

  • Why ribbon XML does not work in Excel 2007?

    I installed 4 VSTO Excel add-ins on an Excel 2007 PC today. The two that use a visual designer ribbon worked fine. But the 2 that use a Ribbon (XML) did not. The add-in starts ok. But the ribbon does not show. Why would that be?
    I wrote two more add-ins to demonstrate the problem. One puts an OK button on the ribbon using the visual designer. That add-in installs on the excel  2007 PC and works as it should. But the 2nd, an add-in that uses Ribbon (XML) to put a button on the
    ribbon, does not work.  The add-in does not display on the ribbon.
    Here is the code of the Ribbon (XML) add-in project.  How to get a ribbon (XML) ribbon to display in excel 2007?
    thanks,
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Xml.Linq;
    using Excel = Microsoft.Office.Interop.Excel;
    using Office = Microsoft.Office.Core;
    using Microsoft.Office.Tools.Excel;
    namespace ExcelAddIn4
    public partial class ThisAddIn
    private void ThisAddIn_Startup(object sender, System.EventArgs e)
    private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
    protected override Office.IRibbonExtensibility CreateRibbonExtensibilityObject()
    return new Ribbon1();
    #region VSTO generated code
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InternalStartup()
    this.Startup += new System.EventHandler(ThisAddIn_Startup);
    this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
    #endregion
    <?xml version="1.0" encoding="UTF-8"?>
    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
    <ribbon>
    <tabs>
    <tab idMso="TabAddIns">
    <group id="ContentGroup" label="Content">
    <button id="Button1" label="ok" screentip="Text"
    onAction="Button_OnAction" supertip="Inserts text at the cursor location"/>
    </group>
    </tab>
    </tabs>
    </ribbon>
    </customUI>
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.Reflection;
    using System.Runtime.InteropServices;
    using System.Text;
    using System.Windows.Forms;
    using Office = Microsoft.Office.Core;
    // TODO: Follow these steps to enable the Ribbon (XML) item:
    // 1: Copy the following code block into the ThisAddin, ThisWorkbook, or ThisDocument class.
    // protected override Microsoft.Office.Core.IRibbonExtensibility CreateRibbonExtensibilityObject()
    // return new Ribbon1();
    // 2. Create callback methods in the "Ribbon Callbacks" region of this class to handle user
    // actions, such as clicking a button. Note: if you have exported this Ribbon from the Ribbon designer,
    // move your code from the event handlers to the callback methods and modify the code to work with the
    // Ribbon extensibility (RibbonX) programming model.
    // 3. Assign attributes to the control tags in the Ribbon XML file to identify the appropriate callback methods in your code.
    // For more information, see the Ribbon XML documentation in the Visual Studio Tools for Office Help.
    namespace ExcelAddIn4
    [ComVisible(true)]
    public class Ribbon1 : Office.IRibbonExtensibility
    private Office.IRibbonUI ribbon;
    public Ribbon1()
    public void Button_OnAction(Office.IRibbonControl control)
    MessageBox.Show("Button_OnAction");
    #region IRibbonExtensibility Members
    public string GetCustomUI(string ribbonID)
    return GetResourceText("ExcelAddIn4.Ribbon1.xml");
    #endregion
    #region Ribbon Callbacks
    //Create callback methods here. For more information about adding callback methods, visit http://go.microsoft.com/fwlink/?LinkID=271226
    public void Ribbon_Load(Office.IRibbonUI ribbonUI)
    this.ribbon = ribbonUI;
    #endregion
    #region Helpers
    private static string GetResourceText(string resourceName)
    Assembly asm = Assembly.GetExecutingAssembly();
    string[] resourceNames = asm.GetManifestResourceNames();
    for (int i = 0; i < resourceNames.Length; ++i)
    if (string.Compare(resourceName, resourceNames[i], StringComparison.OrdinalIgnoreCase) == 0)
    using (StreamReader resourceReader = new StreamReader(asm.GetManifestResourceStream(resourceNames[i])))
    if (resourceReader != null)
    return resourceReader.ReadToEnd();
    return null;
    #endregion

    Hello Steve,
    Most probably you have got an error in the ribbon XML markup. See
    How to: Show Add-in User Interface Errors for more information.
    I have noticed the following xml namespace:
    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
    Use the following one instead:
    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
    Also make sure that specified idMso values exist in Office 2007.
    You can read more about the Fluent UI (aka Ribbon UI) in the following series of articles in MSDN:
    1.
    Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
    2.
    Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
    3.
    Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)

  • Rtexprvalue true does not work

    I write a tag ,it works well( tomcat 5.5 ,jdk5):
         <u:repeat num="5">
                   ${count} of 5<br>
              </u:repeat>
         <%
              request.setAttribute("number",2);
         %>
    but when I use it like this:
              <u:repeat num="${number}">
                   ${count} of 5
              </u:repeat>     
    i got the error:
    NumberFormatException: For input string: "${number}"
    It seems the rtexprvalue does not work at runtime.
    tag class:
    import javax.servlet.jsp.JspException;
    import javax.servlet.jsp.tagext.SimpleTagSupport;
    import java.util.HashMap;
    import java.io.IOException;
    public class RepeatSimpleTag extends SimpleTagSupport {
         private int num;
         public void doTag() throws JspException, IOException {
              for (int i = 0; i < num; i++) {
                   getJspContext().setAttribute("count", String.valueOf(i + 1));
                   getJspBody().invoke(null);
         public void setNum(int num) {
              this.num = num;
    TLD:
         <tag>
              <name>repeat</name>
              <tag-class>boc.common.tags.RepeatSimpleTag</tag-class>
              <body-content>scriptless</body-content>
              <variable>
                   <description>Current invocation count (1 to num)</description>
                   <name-given>count</name-given>
              </variable>
              <attribute>
                   <name>num</name>
                   <required>true</required>
                   <rtexprvalue>true</rtexprvalue>
              </attribute>
         </tag>
    then I change the code to:
         public void setNum(String num) {
              this.num = Integer.parseInt(num);
    still got the error
    org.apache.jasper.JasperException: Exception in JSP: /WEB-INF/jsp/spring/userauth.jsp:22
    19:           request.setAttribute("number",2);
    20:      %>
    21:      
    22:           <u:repeat num="${number}">
    23:                ${count} of 5
    24:           </u:repeat>          
    25:           <u:repeat num="5">
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
    root cause
    java.lang.NumberFormatException: For input string: "${number}"
         java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
         java.lang.Integer.parseInt(Integer.java:447)

    I set <el-ignored>true</el-ignored>
    change it to false and all is ok

  • Lead Selection does not work after setting filter for ALV.

    Hi, Can you please suggest on below scenario :
    I have a Node with a sub node in it .
    I am using the supply function on Sub Node to retrieve the date based on Parent Node.
    There are two ALV's to display parent and item data. The issue is when a filter(user defined filter) is done on Parent table, the supply function does not work. The value is that of the selected row before setting the filter. Even after removing the filter, the item data is stuck and does not change on Lead Selection.
    One thing I noticed is if the child table is a table UI, there is no issue. The only problem is when the second table is ALV
    Thanks In Advance

    Hi Prashanthi,
    Your issue can be resolved as below
    Create an event handler method 'set_alv_data'  for the event 'ON_LEAD_SELECT' of parent alv
    Write the below code inside the event handler method
    METHOD set_alv_data.
      DATA lo_node TYPE REF TO if_wd_context_node.
      DATA lv_path TYPE string.
      DATA lv_index TYPE string.
      lv_index = r_param->index.
      CONDENSE lv_index.
      CONCATENATE wd_this->wdctx_my_parent_node
      lv_index
      wd_this->wdctx_my_child_node
      INTO lv_path SEPARATED BY '.'.
      lo_node = wd_context->path_get_node(
          path                          = lv_path
      DATA lo_interface TYPE REF TO iwci_salv_wd_table.
      lo_interface = wd_this->wd_cpifc_alv_child( ). "get the ref of alv comp of child
      lo_interface->set_data(
        EXPORTING
    *    only_if_new_descr =
          r_node_data       = lo_node
    ENDMETHOD.
    The above code sets the data node of child alv based on lead selection of parent alv data.
    Note: Replace 'parent_node', 'child_node'  with your nodes & 'alv_child' with your alv component name of child alv.
    If you want to control the data of child alv on filter function, you can use the event ON_STD_FUNCTION_AFTE and once you define the filter you get the r_param->id = 'SALV_WD_FILTER_DEFINE'  & now you can clear data of child alv.
    Hope this helps you.
    Regards,
    Rama

  • Update process does not work on Tabular Form

    Hello,
    I have 2 tabular forms on one page, which are using manual update processes.
    First form is created using wizard, and therefore works perfectly.
    The update process is as follows:
    DECLARE
      lc_string VARCHAR2(4000);
    BEGIN
      FOR i IN 1..APEX_APPLICATION.G_f01.COUNT
      LOOP
         lc_string := lc_string|| '[' ||APEX_APPLICATION.G_f*03*(i) || '|' || APEX_APPLICATION.G_f*04*(i) || ']';
      END LOOP;
      --Database processing using the concatenated string here
    END;Second form is created manually, using the following code:
    SELECT apex_item.checkbox (30,
                               '#ROWNUM#',
                               'onclick="highlight_row(this,' || '#ROWNUM#'|| ')"',
                               NULL,
                               'f30_' || '#ROWNUM#'
                              ) delete_checkbox,
           CATALOG_ID,
              apex_item.hidden (31, CATALOG_ID)
           || apex_item.text (32,
                              LANG,
                              80,
                              100,
                              'style="width:100px"',
                              'f32_' || '#ROWNUM#'
           || apex_item.hidden (33, wwv_flow_item.md5 (LANG, DESCRIPTION)) LANG,
           apex_item.text (34,
                           DESCRIPTION,
                           80,
                           100,
                           'style="width:255px"',
                           'f34_' || '#ROWNUM#'
                          ) DESCRIPTION
      FROM V_CATALOGS
    UNION ALL
    SELECT     apex_item.checkbox
                              (30,
                               TO_NUMBER(9900 + LEVEL),
                               'onclick="highlight_row(this,' || '#ROWNUM#' || ')"',
                               NULL,
                               'f30_' || TO_NUMBER (9900 + LEVEL)
                              ) delete_checkbox,
               NULL,
                  apex_item.hidden (31, NULL)
               || apex_item.text (32,
                                  NULL,
                                  80,
                                  100,
                                  'style="width:100px"',
                                  'f32_' || TO_NUMBER (9900 + LEVEL)
               || apex_item.hidden (33, NULL) LANG,
               apex_item.text
                                               (34,
                                                NULL,
                                                80,
                                                100,
                                                'style="width:255px" '  ,
                                                'f34_'
                                                || TO_NUMBER (9900 + LEVEL)
                                               ) DESCRIPTION
          FROM DUAL
         WHERE :P18_TEMP = 'ADD_ROWS1'
    CONNECT BY LEVEL <= 1However, the update process does not work on this form.
    I created it using the first one as an example, but with the id's of the second form:
    DECLARE
      lc_string VARCHAR2(4000);
    BEGIN
      FOR i IN 1..APEX_APPLICATION.G_f*30*.COUNT
      LOOP
         lc_string := lc_string|| '[' ||APEX_APPLICATION.G_f*32*(i) || '|' || APEX_APPLICATION.G_f*34*(i) || ']';
      END LOOP;
      --Database processing using the concatenated string here
    END;Also, both forms are opening in a modal pop-up dialog window.
    I use a Dialog Region plug-in for that.
    Please advise, what is causing a problem with update?

    Sloger,
    if this is your tabular form
    SELECT apex_item.checkbox (30,
    ...and this is your update statement
    FOR i IN 1..APEX_APPLICATION.G_f*30*.COUNT
    ...Then you will only ever update records that have been checked. Unchecked checkboxes are not passed back in the global array. You need to have a hidden column with the ID's for the record and loop through that when you are updating/inserting. That is why the built in tabular form has a MRU and a MRD. the MRU loops through the hidden ID column. The MRD loops through the checkbox.
    Thanks,
    Tyson Jouglet

  • Slide show does not work

    I created a slide show. It works really well on the Prieview with a browser. Once I put it on the web it does not work. here is the code.
    <%@LANGUAGE="JAVASCRIPT"
    CODEPAGE="65001"%>
    <!doctype html>
    <html><!-- InstanceBegin template="/Templates/template.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta charset="utf-8">
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>Untitled Document</title>
    <style type="text/css">
    /* BeginOAWidget_Instance_2141542: #ImageSlideShow */
    #ImageSlideShow.ImageSlideShow {
        width: 300px;
        height: 300px;
        border: solid 5px #000000;
    #ImageSlideShow .ISSClip {
        background-color: #333333;
    /* EndOAWidget_Instance_2141542 */
    </style>
    <!-- InstanceEndEditable -->
    <style type="text/css">
    #apDiv16 {
        position: absolute;
        left: 267px;
        top: 289px;
        width: 402px;
        height: 331px;
        z-index: 14;
        border: thick ridge rgb(0,0,255);
    </style>
    <style type="text/css">
    #apDiv17 {
        position: relative;
        left: 687px;
        top: 287px;
        width: 346px;
        height: 65px;
        z-index: 15;
        font-family: Verdana, Geneva, sans-serif;
        font-size: 18px;
        line-height: 20px;
        font-weight: bold;
        font-style: italic;
    </style>
    <style type="text/css">
    #apDiv18 {
        position: absolute;
        left: 814px;
        top: 318px;
        width: 254px;
        height: 369px;
        z-index: 16;
        font-family: Arial, Helvetica, sans-serif;
        line-height: 3px;
        color: rgb(0,0,0);
        font-weight: bold;
    #apDiv18 P FONT {
        color: rgb(0,0,0);
    #apDiv18 P FONT {
        font-weight: normal;
    </style>
    <style type="text/css">
    #apDiv19 {
        position: absolute;
        left: 301px;
        top: 280px;
        width: 426px;
        height: 328px;
        z-index: 1000;
    </style>
    <style type="text/css">
    #apDiv20 {
        position: absolute;
        left: 314px;
        top: 319px;
        width: 437px;
        height: 312px;
        z-index: 16;
    </style>
    <style type="text/css">
    #apDiv21 {
        position: absolute;
        left: 273px;
        top: 231px;
        width: 520px;
        height: 23px;
        z-index: 16;
        font-size: 18px;
    </style>
    <style type="text/css">
    <!--
    /* ~~ Element/tag selectors ~~ */
    ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */
        padding: 0;
        margin: 0;
    h1, h2, h3, h4, h5, h6, p {
        margin-top: 0;     /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */
        padding-right: 15px;
        padding-left: 15px; /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */
    a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */
        border-top-width: medium;
        border-right-width: medium;
        border-bottom-width: medium;
        border-left-width: medium;
        border-top-style: ridge;
        border-right-style: ridge;
        border-bottom-style: ridge;
        border-left-style: ridge;
    /* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */
    a:link {
        color: #42413C;
        text-decoration: underline; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */
    a:visited {
        color: #6E6C64;
        text-decoration: underline;
    a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
        text-decoration: none;
        color: #0000FF;
    /* ~~ this fixed width container surrounds the other divs ~~ */
    .container {
        width: 2000px;
        background-color: #666;
        margin: 0 auto; /* the auto value on the sides, coupled with the width, centers the layout */
        position: absolute;
        height: 1000px;
        left: 0px;
        top: 0px;
    /* ~~ the header is not given a width. It will extend the full width of your layout. It contains an image placeholder that should be replaced with your own linked logo ~~ */
    .header {
        background-color: #333333;
        border-bottom-width: thick;
        border-bottom-style: double;
        border-bottom-color: rgb(255,0,0);
        width: 2000px;
        position: absolute;
        left: 0px;
        top: 0px;
        height: 150px;
    /* ~~ The footer ~~ */
    .footer {
        padding: 10px 0;
        background-color: #FF0000;
        height: 150px;
        width: 2000px;
        border-top-width: thick;
        border-top-style: double;
        border-top-color: rgb(0,0,0);
        left: 0px;
        position: absolute;
        top: 850px;
    /* ~~ miscellaneous float/clear classes ~~ */
    .fltrt {  /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
        float: right;
        margin-left: 8px;
    .fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */
        float: left;
        margin-right: 8px;
    .clearfloat { /* this class can be placed on a <br /> or empty div as the final element following the last floated div (within the #container) if the #footer is removed or taken out of the #container */
        clear:both;
        height:0;
        font-size: 1px;
        line-height: 0px;
    #apDiv1 {
        position: absolute;
        left: 204px;
        top: 13px;
        width: 317px;
        height: 49px;
        z-index: 1;
        font-family: "Arial Black", Gadget, sans-serif;
        text-transform: uppercase;
        color: #F00;
        font-size: 40px;
    #apDiv4 {
        position: absolute;
        left: 180px;
        top: 19px;
        width: 585px;
        height: 23px;
        z-index: 4;
        font-family: "Arial Black", Gadget, sans-serif;
        font-size: 24px;
        font-style: oblique;
        color: #FF0;
    #apDiv12 {
        position: absolute;
        left: -6px;
        top: 52px;
        width: 201px;
        height: 27px;
        z-index: 9;
        font-family: "Arial Black", Gadget, sans-serif;
        font-size: 36px;
        color: #0FF;
        font-weight: bold;
        text-transform: lowercase;
        font-style: oblique;
    #apDiv5 {
        position: absolute;
        left: 0px;
        top: 53px;
        width: 757px;
        height: 26px;
        z-index: 5;
        font-family: "Arial Black", Gadget, sans-serif;
        font-size: 36px;
        color: #06F;
        text-transform: lowercase;
    #apDiv6 {
        position: absolute;
        left: 366px;
        top: 155px;
        width: 1413px;
        height: 32px;
        z-index: 999;
        color: #999;
        font-family: Georgia, "Times New Roman", Times, serif;
        font-weight: bold;
    -->
    </style>
    <link href="../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    #apDiv8 {
        position: absolute;
        left: 70px;
        top: 66px;
        width: 1280px;
        height: 41px;
        z-index: 8;
        font-family: Arial, Helvetica, sans-serif;
        color: #000;
        font-weight: bold;
    #apDiv2 {
        position: absolute;
        left: 11px;
        top: 213px;
        width: 140px;
        height: 308px;
        z-index: 9;
    </style>
    <link href="../SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    #apDiv3 {
        position: absolute;
        left: 302px;
        top: 321px;
        width: 654px;
        height: 466px;
        z-index: 10;
        font-family: Verdana, Geneva, sans-serif;
        font-size: 14px;
        font-weight: bold;
        line-height: 10px;
        border-top-width: thick;
        border-top-style: solid;
        border-right-style: solid;
        border-bottom-style: solid;
        border-left-style: solid;
        border-top-color: rgb(0,51,255);
    #apDiv7 {
        position: absolute;
        left: 2px;
        top: 35px;
        width: 302px;
        height: 326px;
        z-index: 7;
        font-family: Verdana, Geneva, sans-serif;
        font-size: 16px;
        line-height: 5px;
        font-weight: normal;
        color: #666;
    #apDiv9 {
        position: absolute;
        left: 270px;
        top: 302px;
        width: 382px;
        height: 295px;
        z-index: 11;
        border: thick solid rgb(0,51,255);
    .style12 {font-size: 18pt}
    #apDiv7 P FONT {
        color: rgb(0,0,0);
        font-family: Verdana, Geneva, sans-serif;
        font-size: 16px;
    #apDiv10 {
        position: absolute;
        left: 4px;
        top: 164px;
        width: 131px;
        height: 293px;
        z-index: 999;
    #apDiv11 {
        position: absolute;
        left: 670px;
        top: 298px;
        width: 268px;
        height: 61px;
        z-index: 13;
        font-family: Verdana, Geneva, sans-serif;
        font-size: 18px;
        color: #000;
    .container .content #apDiv11 P FONT {
        color: rgb(0,0,0);
    #apDiv13 {
        position: absolute;
        left: 134px;
        top: 230px;
        width: 864px;
        height: 551px;
        z-index: 13;
    #apDiv14 {
        position: absolute;
        left: 151px;
        top: 252px;
        width: 605px;
        height: 278px;
        z-index: 13;
    #apDiv15 {
        position: absolute;
        left: 98px;
        top: 392px;
        width: 1350px;
        height: 496px;
        z-index: 13;
    #apDiv16 {
        position: absolute;
        left: 339px;
        top: 249px;
        width: 724px;
        height: 37px;
        z-index: 900;
        border-bottom-width: thick;
        border-bottom-style: solid;
        border-bottom-color: rgb(255,0,0);
    #apDiv17 {
        position: absolute;
        left: 50;
        top: 266px;
        width: 620px;
        height: 1;
        z-index: 13;
        background-color: #FF0000;
    #apDiv22 {
        position: absolute;
        left: 132px;
        top: 50px;
        width: 40px;
        height: 46px;
        z-index: 1000;
        color: #FFF;
    #apDiv23 {
        position: absolute;
        left: -103px;
        top: 340px;
        width: 800px;
        height: 3;
        z-index: 10;
        border-top-width: thick;
        border-top-style: groove;
        border-top-color: rgb(255,0,0);
    #apDiv30 {
        position: absolute;
        height: 30px;
        width: 1000px;
        left: -102px;
        top: 288px;
    </style>
    <script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <!-- InstanceBeginEditable name="head" -->
    <style type="text/css">
    #apDiv16 {
        position: absolute;
        left: 264px;
        top: 326px;
        width: 402px;
        height: 331px;
        z-index: 14;
        border: thick ridge rgb(0,0,255);
    </style>
    <style type="text/css">
    #apDiv17 {
        position: absolute;
        left: 687px;
        top: 324px;
        width: 346px;
        height: 65px;
        z-index: 15;
        font-family: Verdana, Geneva, sans-serif;
        font-size: 18px;
        line-height: 20px;
        font-weight: bold;
    </style>
    <style type="text/css">
    #apDiv18 {
        position: absolute;
        left: 687px;
        top: 392px;
        width: 254px;
        height: 358px;
        z-index: 16;
        font-family: Verdana, Geneva, sans-serif;
        font-size: 16px;
        line-height: 0px;
    </style>
    <style type="text/css">
    #apDiv19 {
        position: absolute;
        left: 214px;
        top: 293px;
        width: 952px;
        height: 375px;
        z-index: 101;
    </style>
    <style type="text/css">
    #apDiv22 {
        position: absolute;
        left: 216px;
        top: 286px;
        width: 906px;
        height: 348px;
        z-index: 17;
    #apDiv24 {
        position: absolute;
        left: 70px;
        top: 518px;
        width: 785px;
        height: 113px;
        z-index: 1000;
    #apDiv25 {
        position: absolute;
        left: 222px;
        top: 361px;
        width: 115px;
        height: 250;
        z-index: 7;
    </style>
    <link href="../Spry-UI-1.7/css/SpryImageSlideShow.css" rel="stylesheet" type="text/css">
    <script src="../Spry-UI-1.7/includes/SpryDOMUtils.js" type="text/javascript"></script>
    <script src="../Spry-UI-1.7/includes/SpryDOMEffects.js" type="text/javascript"></script>
    <script src="../Spry-UI-1.7/includes/SpryWidget.js" type="text/javascript"></script>
    <script src="../Spry-UI-1.7/includes/SpryPanelSet.js" type="text/javascript"></script>
    <script src="../Spry-UI-1.7/includes/SpryFadingPanels.js" type="text/javascript"></script>
    <script src="../Spry-UI-1.7/includes/SpryImageLoader.js" type="text/javascript"></script>
    <script src="../Spry-UI-1.7/includes/SpryImageSlideShow.js" type="text/javascript"></script>
    <script src="../Spry-UI-1.7/includes/plugins/ImageSlideShow/SpryPanAndZoomPlugin.js" type="text/javascript"></script>
    <script type="text/xml">
    <!--
    <oa:widgets>
      <oa:widget wid="2141542" binding="#ImageSlideShow" />
    </oa:widgets>
    -->
    </script>
    <!-- InstanceEndEditable -->
    </head>
    <body>
    <div>Content for New Div Tag Goes Here</div>
    <div>Content for New Div Tag Goes Here</div>
    <container class="container">
    <div id="apDiv1">
      <!-- InstanceBeginEditable name="EditRegion4" -->
    <div id="apDiv25">
      <ul id="ImageSlideShow">
        <li><a href="../images/bent_shank_wnuts.jpg"><img src="../images/src/bent_shank_wnuts.jpg" alt="" /></a></li>
        <li><a href="../images/champion_rivet_at_operator.JPG"><img src="../images/src/champion_rivet_at_operator.JPG" alt="" /></a></li>
        <li><a href="../images/coining.jpg"><img src="../images/src/coining.jpg" alt="" /></a></li>
        <li><a href="../images/dry_box_workers.jpg"><img src="../images/src/dry_box_workers.jpg" alt="" /></a></li>
        <li><a href="../images/laser_shlomo.jpg"><img src="../images/src/laser_shlomo.jpg" alt="" /></a></li>
      <li><a href="../images/lung-blocker-white-gowns.jpg"><img src="../images/src/lung-blocker-white-gowns.jpg" alt="" /></a></li> 
      </ul>
      <script type="text/javascript">
    // BeginOAWidget_Instance_2141542: #ImageSlideShow
    var ImageSlideShow = new Spry.Widget.ImageSlideShow("#ImageSlideShow", {
        widgetID: "ImageSlideShow",
        injectionType: "replace",
        autoPlay: true,
        displayInterval: 4000,
        transitionDuration: 2000,
        componentOrder: ["view", "controls"],
        plugIns: [ Spry.Widget.ImageSlideShow.PanAndZoomPlugin ]
    // EndOAWidget_Instance_2141542
      </script>
    </div>
    <div id="apDiv23"></div>
    <!-- InstanceEndEditable -->
      NOGAH
      <div id="apDiv5">Machine Designers &amp; Builders</div>
    <div id="apDiv4">smart innovative engineering </div>
    </div>
    <!-- InstanceBeginEditable name="EditRegion3" -->
    <div id="apDiv15">
      <p> </p>
    </div>
    <!-- InstanceEndEditable -->
    <div class="header"><a href="#"><img src="../images/logoN.jpg" alt="Insert Logo Here" name="Insert_logo" width="100" height="150" id="Insert_logo" style="color: #F00; text-transform: uppercase; font-size: 40px; font-family: 'Arial Black', Gadget, sans-serif; display: block;"></a>
    <!-- end .header --></div>
      <div class="content">
        <div id="apDiv6" style="left: 100px; top: 170px">
          <ul id="MenuBar1" class="MenuBarHorizontal">
            <li><a href="index.html">Home</a>        </li>
            <li><a href="facility.html">Our Facility</a></li>
            <li><a href="about%20us.html">About Us</a></li>
    <li><a href="contact%20us.html">Contact Us</a></li>
            <li><a href="#" class="MenuBarItemSubmenu">Medical</a>
              <ul>
                <li><a href="lung%20blocker%20bed%20mounted.html">Lung Blocker Bed Mounted</a></li>
                <li><a href="lung%20blocker%20stand.html">Lung Blocker Stand</a></li>
                <li><a href="couch.html">Radiation Couch</a></li>
                <li><a href="lab%20bench.html">Lab Bench</a></li>
              </ul>
            </li>
            <li><a href="#" class="MenuBarItemSubmenu">Biotech</a>
              <ul>
                <li><a href="mega%20base%20SH.html">Mega Base Dispensing S.H</a></li>
                <li><a href="mega%20base%20DH.html">Mega Base Dispensing D.H</a></li>
                <li><a href="filling%20machine.html">Liquid Filling Machine</a></li>
                <li><a href="powder%20dispenser.html">Powder Dispensing</a></li>
                <li><a href="capper.html">Capper</a></li>
                <li><a href="laser%20labeler.html">Laser Labeler</a></li>
                <li><a href="racker.html">Vial Racker</a></li>
                <li><a href="dry%20box.html">Glove Box</a></li>
                <li><a href="heat%20seal.html">Sealing Press</a></li>
    </ul>
            </li>
            <li><a href="#" class="MenuBarItemSubmenu">Polymers</a>
              <ul>
                <li><a href="lid%20stacking.html">Lid Stacking</a></li>
                <li><a href="heat%20staking%20machine.html">Heat Staking</a></li>
                <li><a href="tire%20assembly.html">Roller Assembly</a></li>
                <li><a href="lint%20trap.html">Lint Trap</a></li>
                <li><a href="bosch.html">Dryer Assembly</a></li>
                <li><a href="marbal.html">Cooling Tower</a></li>
                <li><a href="jar%20trimming.html">Jar Trimming</a></li>
              </ul>
            </li>
            <li><a href="#" class="MenuBarItemSubmenu">Fasteners</a>
              <ul>
                <li><a href="bent%20shank.html">Bent Shank </a></li>
                <li><a href="lug%20nuts%20tapping%20machine.html">Lug Nuts</a></li>
                <li><a href="round%20small%20nuts.html">Rivets Tapping</a></li>
                <li><a href="knurling.html">Knurling</a></li>
                <li><a href="eyebolts.html">Eye Bolts</a></li>
              </ul>
            </li>
            <li><a href="#" class="MenuBarItemSubmenu">Feeding</a>
              <ul>
                <li><a href="feeding%20with%20vision.html">Using Vision</a></li>
              </ul>
            </li>
            <li><a href="#" class="MenuBarItemSubmenu">Metal</a>
              <ul>
                <li><a href="champion.html">Rail Road</a></li>
                <li><a href="assembly.html">Assembly</a></li>
                <li><a href="coining.html">Coining</a></li>
                <li><a href="pointing.html">Pointing</a></li>
                <li><a href="damper%20assembly.html">Damper Assembly</a></li>
                <li><a href="fomo.html">Notching</a></li>
                <li><a href="nut%20welder.html">Nut Welding</a></li>
                <li><a href="soundwich.html">Dashboard</a></li>
                <li><a href="water%20pump.html">Drilling</a></li>
                <li><a href="rotor_deburing.html">Deburing</a></li>
              </ul>
            </li>
            <li><a href="#" class="MenuBarItemSubmenu">General</a>
              <ul>
                <li><a href="road%20construction.html">Road Construction</a></li>
                <li><a href="large%20hose.html">Large Hose Mfg.  Drive</a></li>
              </ul>
            </li>
            <li><a href="IMTS%20show.html">IMTS Show</a></li>
            <li><a href="http://www.yedaengineering.com/">Yeda LLC</a></li>
          </ul>
    </div>
    <h2> </h2>
        <p class="MenuBarHorizontal"> </p>
        <p> </p>
    <p class="style12"> </p>
        <p> </p>
        <p> </p>
        <p> </p>
        <p> </p>
        <p> </p>
        <p> </p>
        <p> </p>
        <p> </p>
    </div>
    <div class="footer">
        <div id="apDiv8">Nogah Engineering 1800 London Road Unit C Cleveland Ohio 44112 USA Tel: 216.738.1730 Fax: 216.738.1770 </div>
        <p> </p>
      <!-- end .footer --></div>
    <!-- end .container --></div>
    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
    </script>
    </body>
    <!-- InstanceEnd --></html>
    Thanks.

    All these supporting files are missing (404 not found on server). 
    <link href="../Spry-UI-1.7/css/SpryImageSlideShow.css" rel="stylesheet" type="text/css">
    <script src="../Spry-UI-1.7/includes/SpryDOMUtils.js" type="text/javascript"></script>
    <script src="../Spry-UI-1.7/includes/SpryDOMEffects.js" type="text/javascript"></script>
    <script src="../Spry-UI-1.7/includes/SpryWidget.js" type="text/javascript"></script>
    <script src="../Spry-UI-1.7/includes/SpryPanelSet.js" type="text/javascript"></script>
    <script src="../Spry-UI-1.7/includes/SpryFadingPanels.js" type="text/javascript"></script>
    <script src="../Spry-UI-1.7/includes/SpryImageLoader.js" type="text/javascript"></script>
    <script src="../Spry-UI-1.7/includes/SpryImageSlideShow.js" type="text/javascript"></script>
    <script src="../Spry-UI-1.7/includes/plugins/ImageSlideShow/SpryPanAndZoomPlugin.js" type="text/javascript"></script>
    Upload Spry-UI-1.7 folder to your remote server by clicking the folder and hitting the UP arrow in your Files Panel.
    Also, validate your code and fix reported errors.  You have unbalanced div tags.
    HTML - http://validator.w3.org/
    Nancy O.

  • ORDS Template with parameter does not work

    Hello everybody,
    I can not get working a RESTful Service using the ORDS_SERVICES -API (ORDS version 3.0.0.343.07.58), same Query without parameter (hardcoded product_id) works fine.
    declare
    l_module_id number;
    l_template_id number;
    l_handler_id  number;
    l_parameter_id number;
    begin
    ORDS_SERVICES.delete_module(p_name => 'test_parameter');
    l_module_id := ORDS_SERVICES.create_module(p_name => 'test_parameter',
                                p_uri_prefix => '/test_parameter',
                                p_items_per_page => 10,
                                p_status => 'PUBLISHED',
                                p_comments => null);
    l_template_id := ORDS_SERVICES.add_template(p_module_id => l_module_id,
                               p_uri_template => '/demo_product_info_10/',
                               p_priority => 0,
                               p_etag_type => 'HASH',
                               p_etag_query => null,
                               p_comments => null);
    l_handler_id := ORDS_SERVICES.add_handler(p_template_id => l_template_id,
                               p_source_type => 'MEDIA', -- source_type IN ('COLLECTION_FEED', 'COLLECTION_ITEM', 'FEED', 'MEDIA', 'PLSQL', 'QUERY', 'QUERY_1_ROW')
             p_source => 'select mimetype, product_image from demo_product_info where product_id = 2',
             p_format => 'DEFAULT',
             p_method => 'GET',
             p_items_per_page => null,
             p_mimes_allowed => null,
             p_comments => null);
    /* now same result but with parameter */
    l_template_id := ORDS_SERVICES.add_template(p_module_id => l_module_id,
                               p_uri_template => '/demo_product_info/{product_id}',
                               p_priority => 0,
                               p_etag_type => 'HASH',
                               p_etag_query => null,
                               p_comments => null);
    l_handler_id := ORDS_SERVICES.add_handler(p_template_id => l_template_id,
                               p_source_type => 'MEDIA', -- source_type IN ('COLLECTION_FEED', 'COLLECTION_ITEM', 'FEED', 'MEDIA', 'PLSQL', 'QUERY', 'QUERY_1_ROW')
             p_source => 'select mimetype, product_image from demo_product_info where product_id = :product_id',
             p_format => 'DEFAULT',
             p_method => 'GET',
             p_items_per_page => null,
             p_mimes_allowed => null,
             p_comments => null);
    l_parameter_id := ORDS_SERVICES.add_parameter(p_handler_id => l_handler_id,
                               p_name =>  'product_id',
             p_bind_variable_name => 'product_id',
             p_source_type => 'URI',
             p_param_type => 'INT',
             p_access_method => 'IN',
             p_comments => null);
    commit;
    end;
    The first template works fine:
    http://localhost:8080/ords/xxx/test_parameter/demo_product_info_10/
    shows a jpeg image of a wallet.
    The second template does not work:
    http://localhost:8080/ords/xxx/test_parameter/demo_product_info/10/
    fails with error:
    mapped request using: BasePathMapper [basePath=/xxx/] to: SCHEMA:apex|XXX
    Choosing: oracle.dbtools.http.dispatch.DispatchMetaData as current candidate with score: MetaDataScore [score=0, matchedMethod=  GET: {10299, false}
      common: CommonMetaData [accepts=[], cors=null, documentation=null, frameOptions=null, pageSize=10, pagination=NONE, requiresPrivilege=null, transport=null]
    , matchedPattern= /test_parameter/demo_product_info/{product_id}
    common: CommonMetaData [accepts=[], cors=null, documentation=null, frameOptions=null, pageSize=null, pagination=null, requiresPrivilege=null, transport=null]
    methods:
      GET: {10299, false}
      common: CommonMetaData [accepts=[], cors=null, documentation=null, frameOptions=null, pageSize=10, pagination=NONE, requiresPrivilege=null, transport=null]
    stack trace:
    oracle.dbtools.http.errors.InternalServerException: java.lang.IllegalArgumentException: INT
    at oracle.dbtools.http.errors.ErrorPageFilter.internalError(ErrorPageFilter.java:165)
    at oracle.dbtools.http.errors.ErrorPageFilter.doFilter(ErrorPageFilter.java:113)
    at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:44)
    at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:51)
    at oracle.dbtools.http.cors.CORSFilter.doFilter(CORSFilter.java:35)
    at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:44)
    I changed the add_parameter-call p_param_type => 'INT' to be  p_param_type => 'STRING'
    then error remains the same and strack trace says
    oracle.dbtools.http.errors.InternalServerException: java.lang.IllegalArgumentException: STRING
    at oracle.dbtools.http.errors.ErrorPageFilter.internalError(ErrorPageFilter.java:165)
    at oracle.dbtools.http.errors.ErrorPageFilter.doFilter(ErrorPageFilter.java:113)
    Could you please confirm and fix,
    kind regards,
    Tom

    This is a guess, but I suspect that ords_services.add_parameter() is not required at all.
    Also, your URL /demo_product_info/10/ should not have the trailing slash (according to your template URI).
    For more information, I suggest you look here:
    ords.3.0.0.343.07.58.zip\ords.war\scripts\migrate\core\ords_migrate.plb
    The migration package will show what is usually done for templates that already exist within APEX 4.2. I checked my templates and the ones with URI variables {in-curly-brackets} contain no records in apex_040200.wwv_flow_rt$parameters.
    -Kris

  • Configuration Template Builder WL8.1 does not work

    Hello,
         After spending nearly 2 days now trying to get a Configuration Template
    built, I've concluded this simply does not work. Has anyone used the
    Config Template builder to package a semi-complex application on top of WLI?
         I'm trying to have 2 of my applications, the JMS and JDBC resources,
    and a WLI event generator packaged up for easy deployment to someone
    else's server configuration. The problem with this is that there are
    required resources for WLI, namely a database. The Pointbase database
    included for WLI does not get included in the template automatically.
    There are also some flat-out bugs:
    If you choose to include a resource adapter "application", such as
    jms-xa-adp.rar, the template builder does not bundle this in the
    template and deploy it correctly. The template builder restricts you to
    putting applications in the relative path starting at ./
    For jms-xa-adp.rar, its original location is in $WL_HOME/server/lib, and
    the template builder defaults to put it in ./lib of your template.
    However, when you create a domain with the template, jms-xa-adp.rar does
    not get placed in your ./lib directory. This causes you to then go and
    manually edit your config.xml to point back at $WL_HOME/server/lib or to
    manually copy jms-xa-adp.rar into your ./lib directory (which the
    template mechanism should do for you).
    Relative paths in the config.xml file require you to execute the config
    builder from the directory of the domain you are making a template for.
    The template builder should instead be smart enough to realize that
    relative paths in the config.xml file are relative to the directory that
    the config.xml is in, not the one you are running the template builder
    from. You'll get an error when trying to create the template cause it
    won't find the resources if you're not in that directory.
    If anyone has successfully used this to package a WLI application in a
    template, please share your experiences and how to do so. In the
    meantime, I'm claiming there is no way to nicely package up a server
    configuration for a WLI app in Weblogic, and this is a big shortcoming.
    Weblogic needs a simple transferrable way of creating server
    configurations (it tries to do this with the template, but that is
    failing). With JBoss, for example, you simply copy your server directory
    into another installation. This doesn't work with Weblogic unfortunately
    because it puts hard-coded paths in the config.xml file.
    Thanks

    Russ,
         Thank you for the detailed responses. The only one I'm currently
    struggling with still is the #5, with the scripts between the two. One
    of the major benefits of using a J2EE App Server is supposed to be the
    portability between servers. I find it disconcerting that BEA Weblogic
    restricts me to the platform I created the domain on by creating
    platform-specific startup/shutdown scripts for only the platform created
    on. It's understandable that a script converter would be difficult, but
    at least both the .sh/.cmd files should be created from the first time
    you make a domain. If the user only wants one or the other, they can
    delete the appropriate one. It's also understandable that the
    users/deployers shouldn't have to manually convert a startup/shutdown
    script to take the domain to a different box.
         JBoss clearly has BEA beat on ease of deployment here. Their model is
    the concept I'm thinking of: you have some generic startup/shutdown
    scripts that can load a platform-independent server configuration. You
    truly can copy directories as-is between JBoss installations.
         I was hoping to package up a server domain for use on any of the
    supported platforms, but since I don't have the time to manually convert
    the startup/shutdown scripts, I'm going to have to tell people it's only
    for Solaris now.
         Hopefully BEA can fix this in a future SP. There's no need for this
    platform-dependency. Also, if the Windows version can generate both
    scripts at creation time, then the Solaris should be able to do this as
    well (or at least give you the option).
    Thanks again for the replies
    russ wrote:
    Hi Steven,
    I have several comments and questions about your last two posts. I will try to
    address them in order.
    1) "The Pointbase database included for WLI does not get included in the template
    automatically."
         By default the template builder only includes the *.cmd and *.sh files in the
    template from your domain directory. If you begin building with an existing
    domain template all files that were in the template will get included. This was
    done because there is no way for the builder to automatically determine all the
    files that are required by your template/domain and we steered away from recursively
    including all files from the directory so that unused files were not needlessly
    included. We can extrapolate some files based on the application paths in the
    config.xml, but the rest is left up to the template builder to be aware of what
    is needed for their domain to run. So, if you need the Pointbase *.dbn and *.wal
    files included in your template just select these files on the ?Add Files? panel
    of the template builder and add them to the ?Domain Directory?.
    2) ?If you choose to include a resource adapter "application", such as jms-xa-adp.rar,
    the template builder does not bundle this in the template and deploy it correctly.?
         The template builder considers application files to be in two categories: Imported
    or Internal. When you are at the ?Add Applications? panel of the builder you
    will see a checklist of all the applications that are in the domain you selected.
    On the right hand side there are two text fields. The top one displays the application
    path as it is currently set in the config.xml of that domain. The bottom field
    will be different depending on what category the application falls into. As you
    click on each application in the list, you may notice that the bottom field may
    change from an editable field titled ?Imported Application Path? to a non-editable
    field titled ?Internal Application Path?. The difference between the two categories
    is that an ?Imported? application?s files will be included in the template jar.
    An ?Internal? application?s files will not be included in the template jar because
    they are considered internal to the weblogic installation. The jms-xa-adp.rar
    should fall into the internal category and should not get included in your template.
         From what you are describing it sounds like the builder attempted to import that
    application when it should not have. In an attempt to recreate the problem you
    are seeing I deployed that Connector Module through the WLS console and ended
    up with an application path of ?C:\bea\weblogic81\server\lib? where ?C:\bea\weblogic81?
    is my WL_HOME (a.k.a. USER_INSTALL_DIR). If I then attempt to build a template
    from this domain, the builder recognizes this as an internal path and does not
    include it inside my template. If the current application path you had looks
    different from the one above, that may explain why the builder was attempting
    to import it. What was the value of the ?Current Application Path? for that application
    deployment?
    3) ?Relative paths in the config.xml file require you to execute the config builder
    from the directory of the domain you are making a template for.?
         The builder is ?smart? enough to determine relative paths. You should not have
    to invoke it from the domain directory you are working with. There is a known
    bug in the WebLogic Platform 8.1.1.0 release of the template builder that will
    cause it to not find files with relative paths in your domain directory if the
    application path in the config.xml is just a ?.?. If this is the case, you should
    see a FileNotFoundException when you attempt to create the template. This will
    be fixed in SP2 and you can work around this problem by changing those paths to
    ?./? instead. If this was not the case, what was the path the wizard choked
    on?
    4) ?Looking through the config file, it seems that it's all of the WLI components
    that have absolute paths in the config file. In addition, BEA_WLS_DBMS_ADK has
    an absolute path, not sure if that is WLI or WLS. ?
         BEA_WLS_DBMS_ADK is an integration application. If you created the original
    domain using the configuration wizard most of the applications in an integration
    enabled domain will reference paths inside of you installation directory or ?internal?
    paths. For instance, I used the wizard to create a ?Basic WebLogic Integration
    Domain?. The path for that application in this domain is: ?C:\bea\weblogic81/integration/adapters/dbms/lib/BEA_WLS_DBMS_ADK.ear?
    where ?C:\bea\weblogic81? is my WL_HOME or USER_INSTALL_DIR. When I load this
    domain into the builder it shows this application as ?internal? and the ?Internal
    Application Path? is "$USER_INSTALL_DIR$/integration/adapters/dbms/lib/BEA_WLS_DBMS_ADK.ear".
    This will be set as the path value of this application in the config.xml that
    will be included in the template you build. When you later use the Configuration
    Wizard on this template it will substitute the $USER_INSTALL_DIR$ to the value
    of the installation directory of the machine you are creating it on.
         If you were to Change these to relative paths, as Mark previously suggested,
    it will only work if you copy the domain directory to the same location relative
    to your installation directory on the target machine. Also, if you copy the domain
    in this manner you will more than likely run into problems with your start/stop
    scripts and be forced to hand modify all the paths contained within. The configuration
    wizard tries to alleviate these problems and make the configuration entirely portable.
    This gives the user who creates the domain from your template the ability to
    put it anywhere they want regardless of the paths in the config.xml.
    5) ?However, there is another major problem with the Template Builder: it only
    includes the startup/shutdown script for the platform you create the template
    on. ???I built the template on Solaris with the UNIX scripts. However, I tried
    to create a new config on Windows with this template, and the scripts were not
    converted to .bat files!?
         As I stated previously, the builder will only include *.cmd and *.sh scripts
    into your template by default. If you created the domain on a unix platform using
    the configuration wizard it will not extract the *.cmd files since these aren?t
    considered to be useful on unix. If you were then to attempt building a template
    from this domain and take it onto a windows platform, it will obviously be missing
    any windows scripts. Conversely, the wizard will extract *.sh scripts on windows
    because they can still be useful if a user has an MKS or Cygwin type environment
    installed. The config wizard and template builder do not have the ability to convert
    scripts. The builder will only include existing scripts that are in your domain
    directory and automatically determine any necessary string substitutions that
    will be needed. Please note that since WebLogic is only supported on the NT/2K/XP
    versions of windows you will find that the wizards use ?.cmd? files and not ?.bat?
    files since these are more commonly associated with Win 95/98/ME.
         I will be happy to answer any more questions you may have and would also like
    to take a look at your domain configuration to try and get a better understanding
    of the problems you are encountering.
    thanx,
    russ

Maybe you are looking for

  • ALV - Maybe a NEW problem to get changed data, after input from ALV

    Hi all, I have tried to search an existing post to solve this ALV problem, with key words 'ALV' and 'refresh', but I don't find the good one... so sorry if the problem have already been solved. <u>An example of the problem and process should be more

  • How Can I set up a JTable columns?

    Dear All, How can I set up my JTable columns to have the amount the user specifies? for example when the user types in 50 in JTextField 1 I want the JTables columns to then set to 50. How can this be done? Thanks lol import javax.swing.*; import java

  • SetSize(int,int) not working in JTextPane.. Please help

    Hi, I want to set size of JTextPane so that by default it should show atleast 2 lines. I am using setSize(int, int) , but its not working. Can anybody help me?

  • Where/how can i find out what this is doing

    I know this old but not concerned with that, just what is it doing,  this is java script in an .asp that loads a flash application, I'm most concerned/interested why it references a clsid? what is the code base all about? (is this embedding code in t

  • Creating new Infotype

    I created a new infotype 9015. It works and posts correctly.  Then I tried adding a module within the 9015 code to generate an infotype 0014. So the end result should be a 9015 and a 0014 record.   While Im in PA30 I can see the expected results but