Implicit navigation trouble -- parent dir

Hi!
I've got folowing directory structure for my web app:
root
|--templates
| |--nav.xhtml
| |--footer.xhtml
|--index.xhtml
|--search.xhtml
here is my index.xhtml:
<h:body>
     <div class="header" align="center">
<ui:include src="templates/nav.xhtml" />
     </div>
     <h:form>
<h:commandButton value="Search" action="search" />
     </h:form>
     <div class="header" align="center">
<ui:include src="templates/footer.xhtml" />
     </div>
</h:body>
here is my nav.xhtml:
<h:body>
     <h:commandButton value="Search" action="../search" />
</h:body>
When I click "Search" button from nav.xhtml template navigation doesn't occur. However "Search" button from index.xhtml works perfectly. What's wrong with my nav.xhtml template?
Here is the link to EAR: http://dl.dropbox.com/u/1724150/Application.EAR-1.ear
Thanks!

The problem is that you don't understand how JSF navigation even works, or else you wouldn't come up with something as inherently wrong as an action "../search". I suggest you open up the JSF book and reread the entire chapter on navigation. Then the problem should go away.

Similar Messages

  • Navigation in Parent Child Hiearachy is a bug in OBIEE 11.1.1.6 ?

    Hi All,
    Please look into one of my earlier posts
    OBIEE 11g - Navigation in Parent Child Hiearchy not working
    One of my friends Ram told me that this is an Oracle Bug in 11.1.1.6. It's I just wanted to know if anybody has faced the same issue and reported this as a bug in Oracle. Unfortunately, i don't have the privileges to log a bug or see the bug information, can anybody please provide any information on this ?
    Thanks,
    Ronny

    Hi,
    Bug 14406555 : 11.1.1.6.2BP1 UPGRADE : ACTION LINK INTERACTION FAILS WITH GETLEVELINFO ERROR
    FYI: MOS
    What actually did happen?
    After the upgrade, when they expand the parent-child hierarchy and click on the measure column to navigate through the Action Link, nothing happens and they see error in the IE browser at the bottom - Message: 'getLevelInfo(...)' is null or not an objectLine: 1Char: 11175Code: 0URI: http://nyfsqla105.ny.fw.gs.com:9704/analytics/res/b_mozilla/answers/selectionsmodel.js It does not show any error in FF but it does not do anything. Inspite of checking "Do not display in a popup if only one action link is available at runtime" for Action links, it does show pop up after the upgrade.
    Thanks
    Deva

  • OBIEE 11g - Navigation in Parent Child Hiearchy not working

    Hi All,
    I have a employee parent child hierarchy and I want to show revenue for each employee in the report. I have modeled my revenue as a measure like case 4 shown in the following link
    http://www.rittmanmead.com/2010/11/oracle-bi-ee-11g-parent-child-hierarchies-multiple-modeling-methods/
    So for example this is my report ,
    --David (30)
    ---Sandra (15)
    -----Joe (10)
    Joe'e revenue is 10, Sandra's is 5 (showing her 5 Joe's revenue) and David's is 5 (showing his 5 Sandra's revenue)
    Issue :
    Now what I want is to provide action link on the revenue column so that when user would click on revenue for any employee it would direct them to a detail report showing the bifurcation.
    For ex, I want that when user click on 15 which is Sandra's revenue, he would be redirected to a detailed report for Sandra and similary for Joe and David
    MY ISSUE IS that the navigation is NOT working for sandra and Joe. It is only working for David (who is the ancestor of sandra and Joe). When I click on 15 to see sandra's detail report, it doesn't do anything and in the bottom left corner of the browser status bar below I see an ERROR saying
    (same for Joe but David work's fine)
    Message: 'getLevelInfo(...)' is null or not an object
    Line: 1
    Char: 11142
    Code: 0
    URI: http://localhost:7001/analytics/res/b_mozilla/answers/selectionsmodel.js
    Why is that happening? Is that because I have modeled the revenue as an measure and not attribute. Is navigation not possible in this case?
    Anybody has any solution or workaround for this, it will be highly appreciated.
    Thanks,
    Ronny

    Ok, so let me explain this in detail and give the structure of my tables and the data,
    There are three tables.
    1.Parent Child relationship table - pctable
    2.Closure table which OBIEE creates through a script - reltable
    3.Fact table which contains the revenue - facttable
    This is the data
    pctable
    personid | managerid
    David | NULL
    Sandra| David
    Joe|Sandra
    reltable
    memberkey | ancestorkey |distance |is_leaf
    David|NULL|NULL|0
    David|David|0|0
    Sandra|Sandra|0|0
    Joe|Joe|0|0
    Sandra|David|1|0
    Joe|Sandra|1|1
    Joe|David|2|1
    facttable
    personid|revenue
    David|5
    Sandra|5
    Joe|10
    and my joins conditions are, I join pctable to reltable and then reltable is joined to facttable like this.
    pctable.personid = reltable.ancestorkey
    reltable.memberkey = facttable.personid
    and then in the report, when I pull up the pchierarchy build from pctable and revenue , I get as below and like I said, when I click on Sandra to see the revenue she contributes, I am not able to navigate. Can you let me know what modifications needs to be done?
    ---David(20)
    ----Sandra(15)
    ------Joe(10)

  • Error with getAttribute( ) function, while navigating from parent to child

    Hi,
    I have been trying to develop a small project with two task flow(TF).
    Both the TF contains only one page.
    Both of my pages are made from different VO,s.
    from the Parent page (P1) if i select a row and navigate to Child Page (P2), i need to filter the result in P2 using the selected row in P1.
    From P1 when i selected a row and navigate to P2 by clicking a button, i have used a Bean to get the parameters from the selected row and Passed the same to TF2.
    I made an AMImpl method and binded it to P2, such that whenever my P2 render this AMImpl method will be executed.
    Inside the AMImpl method i am trying to run the VO query of P2 with new selected criteria from TF1 ie.P1.
    i also have few more functionalites in P2 like when i select a row and clicks on a button i will some some info on a pop-up for the corresponding selected row.
    When i run the page P2 individually,all works fine. But when i navigate from P1 to P2 none of the functions are working, i.e when i click on the button on P2 to see popup its showing that Attribute is Null in the selected row, even though the attribute is not null. After navigation in P2 this function getAttribute( ) is returning null. but when i run P2 individually the same function is returning all required fields without error.
    Actual AMimpl.java method code :
    RowKeySet selectedRows =
    Table.getSelectedRowKeys(); //Table is a "Rich Table" i declared outside the method and binded to my actual table on P2
    Iterator selectedRowsIterator =
    selectedRows.iterator();
    DCBindingContainer dc =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iterBinding =
    dc.findIteratorBinding("P2Iterator");
    RowSetIterator rowSetIterator = iterBinding.getRowSetIterator();
    Key selectedRowkey =
    (Key)((List)(selectedRowsIterator.next())).get(0);
    Row selectedRow = rowSetIterator.getRow(selectedRowkey);
    String parameter1ForCurrentRow =
    selectedRow.getAttribute("parameter1").toString(); // -->this particular line is returning null while navigating from P1 to P2, but the same line returns actual value if the run P2 individually
    Kindly guide me how to achieve this.
    Regards
    Siva

    Hi Timo
    thanks for your reply.
    The reason I am doing this is to avoid the numerous instances of VO2 (Child VO) that will get created for every row of VO1. (eg: 100 rows of Vo1 means 100 instances of VO2 created & executed ).
    I am trying to avoid that by Binding and executing the params to a single child VO instance, only on the click of a button.
    Please advise if my assumption about as many child instances of VO2 being created and executed is incorrect and ADFBC does some kind of Lazy instantiation / loading of the child VO until the point of execution of the UI code where it is bound to ?

  • How to go to the parent dir using java code

    I want to store a file in a directory. That directory is in the parent directory of present working directory. So how can I do this using java.
    i want to store the file "datafile" in c:\super\datadir
    now i am in the directory called c:\super\programdir
    how can i do this using the java program.

    File parentDir = new File("").getAbsoluteFile().getParentFile();
    File dataFile = new File(parentDir,"datadir/datafile");

  • Newbie :  Navigation trouble startpage.....

    Hi,
    I am having some problems with navigating to jsf pages. I have the folowing configuration:
    - JBOSS 3.2.x/Apache 4.1.29
    - part of a web.xml :
        <context-param>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>server</param-value>
        </context-param>
        <context-param>
            <param-name>javax.faces.application.CONFIG_FILES</param-name>
            <param-value>/WEB-INF/faces-config.xml</param-value>
        </context-param>
        <!-- Faces Servlet -->
        <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup> 1 </load-on-startup>
        </servlet>
        <!-- Faces Servlet Mapping -->
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>*.jsf</url-pattern>
        </servlet-mapping>-- navigation rules of faces-config.xml
       <navigation-rule>
      <from-view-id>/*.jsf</from-view-id>
      <navigation-case>
       <to-view-id>/faces/start.jsp</to-view-id>
      </navigation-case>
    </navigation-rule>When I am trying to reach webserver:port/app/do.jsf I expected to be reach the folowing page: webserver:port/app/faces/overview.jsp.
    Unfortunately I am getting the 404-error that page webserver:port/app/do.jsp does not exist.
    What am I doing wrong????
    Thanx,
    Romano

    Hi,
    if you use the JSF RI 1.0, you have to change
        <context-param>
            <param-name>javax.faces.application.CONFIG_FILES</param-name>
            <param-value>/WEB-INF/faces-config.xml</param-value>
        </context-param>to
        <context-param>
            <param-name>javax.faces.CONFIG_FILES</param-name>
            <param-value>/WEB-INF/faces-config.xml</param-value>
        </context-param>anyway, it will work in that case because this is the default name for faces-config.xml, but if you add new config files, they won't be founded.
    Frederic

  • Navigation Troubles

    I am new to the forum and almost new to iWeb. Here is my dilemma. In iWeb08 I created a site. I thought the navigation menu was great. So, now I am on iWeb09. I want to update the website I created. What I want to do is take the main page navigation menu and make it read 2007, 2008, 2009 and then have pages specific to those links and have the site I created previously under 2007 and new pages under their own year. Can I do this easily or am I stuck with manually having to create a navigation bar.
    If I do have to manually create a navigation bar, is it difficult to link the new pages together. I really don't have a lot of experience with iWeb and what web site experience I do have is years old.
    Thanks in advance and sorry for being a nOOb.

    What I would do is create an additional site for each year. Then when a "year" site is open you will have a new menu specifically for that year. You may need to create a manual home button to get back to the home site.

  • SharePoint Foundation - Site Navigation

    Hi,
    I'm trying to set the navigation in SPF site so the top bar will show dropdown menu, and the subsite will show the same navigation as parent site.
    1. when create sub site define that its navigation will be as parent
    2. Edit root site navigation  - heading and links in root site - and select "Oslo" layout in "Change the look"
    Root site seems ok and show the top navigation with dropdown - but subsite no... what's the solution? is it a bug?
    keren tsur

    Hi Keren,
    Sorry for the misunderstanding.
    I tested in my SharePoint Foundation environment as below:
    In the root site, go to site settings > Change the look > select "sea monster", and it displayed dropdown menu for subsits.
    New subsite and make it use the top link bar as parent site.
    Then I accessed the subsite, it displayed as default looking in blue color and the top link bar didn't change.
    It seems like the navigation displays per the theme since there are other themes which will not display drop menu for subsites. In addition,I didn't find the "Oslo" theme in my "change the look".
    Thanks for your understanding.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Navigation issue in an analysis expanded to All Rows

    I have noticed strange behavior in OBIEE 11.1.1.3 when navigating from analyses which are expanded to All Rows.
    For example: when the user navigates (collapses) a parent object in a hierarchy the expanded analysis reloads and returns to the default view of 25 rows, so the user has to expand it to All Rows again to be able to scroll down to the place of drilling.
    Is there a way to keep the expanded view when navigating from analyses displayed in All Rows?
    Changing the default number of records displayed per page in the instanceconfig.xml file doesn't solve the problem.

    After upgrading OBIEE to 11.1.1.6 version this issue still remains, but it is 'masked' with the larger bug in the Navigation in Parent Child Hierarchy.
    Does anyone know if this 'object expanding' from All Rows and reload to the default view of 25 rows has been registered as a bug?
    Is it included in one of the patches available for 11.1.1.6?

  • A simple python3 mass file/dir renamer for the cli

    Hi fellow archers!
    I released a simple script for mass file/renaming of files; it provides some interesting feature (incremental numbering, name cleaning, use parent dir name, replace patterns) and can be used together with ranger file manager to apply it to selection.
    Check it out on github!
    https://github.com/andya9/pyrenamer/tree/master
    (I tested it a lot and use it nearly daily on important file; but as always, try it safely first! an option to only *show* expected output is provided)

    I resolved this issue. For some reason JDeveloper did not reconize the build.xml file as a valid ant build file until I closed it and re-started it.
    Thanks!
    etnot

  • Parent directory on JFileChooser main panel

    Yes I did a search on the forum before posting.
    How could I display the parent directory '..' of the current directory on the file list panel of a JFileChooser? It should be selectable/clickable/openable, of course.

    Thanks camickr.
    It does barely works but problems are:
    1) A mouse selection on the parent directory [icon + text] item behaves weird at the initial launch time of the program and when we have returned back from a subsub-directory.
    2)The parent directory [icon + text] item doesn't come at the top of the file list. How to achieve this requirement?
    Here's a quick and dirty SSCCE:
    import javax.swing.*;
    import javax.swing.filechooser.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.beans.*;
    import java.io.*;
    import java.net.*;
    public class ParentFcTest{
      JFrame frame;
      JFileChooser jfc;
      JPanel contentPane, mainPanel;
      Box buttonPanel;
      JButton convButton, rescanButton;
      boolean inProgress;
      File cf; // file currently processed
      FsvWithParentDir fwp;
      FvForPd ffp;
      public ParentFcTest(){
        frame = new JFrame();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        jfc = new JFileChooser(".", fwp = new FsvWithParentDir());
        jfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
        Component comp = jfc.getComponent(3);
        comp.setVisible(false); // hide labels, textfields, buttons etc.
        ffp = new FvForPd(fwp);
        jfc.setFileView(ffp);
        mainPanel = new JPanel(new BorderLayout());
        mainPanel.add(jfc, BorderLayout.CENTER);
        convButton = new JButton("...Select file or folder");
        buttonPanel = new Box(BoxLayout.Y_AXIS);
        JPanel p1 = new JPanel();
        p1.add(convButton);
        rescanButton = new JButton("Update file list");
        rescanButton.setBackground(new Color(200, 255, 50));
        JPanel p2 = new JPanel();
        p2.add(rescanButton);
        buttonPanel.add(p1);
        buttonPanel.add(p2);
        rescanButton.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent e){
            jfc.rescanCurrentDirectory();
        contentPane = (JPanel)frame.getContentPane();
        contentPane.add(mainPanel, BorderLayout.CENTER);
        contentPane.add(buttonPanel, BorderLayout.SOUTH);
        frame.pack();
        frame.setVisible(true);
        jfc.addPropertyChangeListener(new PropertyChangeListener(){
          File f;
          public void propertyChange(PropertyChangeEvent pce){
            f = jfc.getSelectedFile();
            if (f == cf){ // we need this because of #$# below
              return;
            if (inProgress){ // vv restore old selection
              jfc.setSelectedFile(cf); // #$# generates another PCE !
              JOptionPane.showMessageDialog
           (frame, "Can't select a new file while processing current file");
              return;
            if (pce.getPropertyName().equals
             (JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)){ // selected
              if (f.isFile()){
                convButton.setText("Process this file");
              else if (f.isDirectory()){
                convButton.setText("Open this folder");
            else if (pce.getPropertyName().equals
             (JFileChooser.DIRECTORY_CHANGED_PROPERTY)){ // physical dir change
              convButton.setText("...Select file or folder");
        convButton.addActionListener(new Converter(jfc));
      } // constructor
      class Converter implements ActionListener{
        JFileChooser fc;
        public Converter(JFileChooser jf){
          fc = jf;
        public void actionPerformed(ActionEvent e){
          JButton btn = (JButton)e.getSource();
          if (btn.getText().startsWith("...")){ // message only, no action
            return;
          File f = fc.getSelectedFile();
          if (f.isFile()){
            inProgress = true;
            rescanButton.setEnabled(false);
            cf = f;
            convButton.setText("...please wait");
            ConvWorker cw = new ConvWorker();
            cw.execute();
          else{
            jfc.setCurrentDirectory(f);
      class ConvWorker extends SwingWorker<Object,Object>{
        public Object doInBackground(){
          return null;
        protected void done(){
          inProgress = false;
          jfc.rescanCurrentDirectory();
          convButton.setText("...Select file or folder");
          rescanButton.setEnabled(true);
      class FvForPd extends FileView{
        FsvWithParentDir fsvp;
        ImageIcon ii;
        public FvForPd(FsvWithParentDir fsv){
          fsvp = fsv;
          try{
            ii = new ImageIcon
              (new URL("http://homepage1.nifty.com/algafield/pardir.gif"));
          catch (MalformedURLException e){
            e.printStackTrace();
        public Icon getIcon(File f){
          if (f.equals(fsvp.getParent())){
            return ii;
          else{
            return super.getIcon(f);
        public String getName(File f){ // it does work but...
          if (f.equals(fsvp.getParent())){
            return ("..");
          else{
            return super.getName(f);
      public static void main(String[] args){
        SwingUtilities.invokeLater(new Runnable(){
          public void run(){
            new ParentFcTest();
    import java.io.*;
    import javax.swing.*;
    import javax.swing.filechooser.*;
    public class FsvWithParentDir extends FileSystemView{
      File[] filelist;
      File parent;
      public File createNewFolder(File containingDir){
        File folder = new File(containingDir, "NEWFOLDER");
        folder.mkdir();
        return folder;
      public File[] getFiles(File dir, boolean useFileHiding){
        File[] files = super.getFiles(dir, useFileHiding);
        File[] nfiles = new File[files.length + 1];
        for (int i = 1; i < nfiles.length; ++i){
          nfiles[i] = files[i - 1];
        parent = dir.getParentFile();
        if (parent != null){
          nfiles[0] = parent;
          filelist = nfiles;
        else{
          filelist = files;
        return filelist;
      public File getParent(){
        return parent;
      // this doesn't work
      public Icon getSystemIcon(File f){
        if (parent != null && f.equals(parent)){
          ImageIcon ii = new ImageIcon(getClass().getResource("/pardir.gif"));
          return ii;
        else{
          return super.getSystemIcon(f);
    }

  • File location

    I've a file located at c:\java\config\help.txt
    I'm using File input stream to read that file. I'm the running my class from c:\java\test\. The file location is hardcoded in the source as c:\java\config\help.txt
    Is that a way that I could define simply cofig/help.txt rather then entire path. So in theory if I want to run my class in unix machines it would still work?
    Thanks
    Tim

    Demo:
    import java.io.*;
    import java.net.*;
    public class Test {
        public static void main(String[] args) throws IOException {
            URL url = Test.class.getResource("/");  //url of dir holding this class
            URL url2 = new URL(url, "../config/help.txt");
            InputStream in = url2.openStream();
            BufferedReader r = new BufferedReader(new InputStreamReader(in));
            String s;
            while ((s = r.readLine()) != null)
                System.out.println(s);
    }I'm assuming that Test.class is in a dir that's a sibling to dir config (ie, these
    two dirs are in the same parent dir). I had a bit of trouble going "up and over" to config,
    hence the URL monkey business. Is there a cleaner solution, anyone?

  • Import statement is not working

    hi everybody,
    I have a directory under which I have a number of sub-directories. Lets call this directory "parent_directory". under this directory I have another directory called "child_1". Under "child_1" I have another subdirectory called "child_2". Now I have a code in child_2 that has the following statement:
    import program_1;
    //this is a program present in the parent directory. lets call it
    //program_1.java
    when I am compiling I am getting an error saying:
    program_2.java:28: '.' expected
    import program_1;
    ^
    1 error
    program_2.java is the program present in child_2 in which I have included the import statement.
    If I change the ";" to "." then again error appears as the import statement only needs the name of the class and doesnot need the extension.
    I will be very grateful to you if you could please suggest me a way around this.

    This questions belongs in the "New to Java" forum ...
    sigh
    Anyways, import works on package names with trailing * or full qualified class names, e.g.import mypackage1.*; // imports all classes in mypackage1
    import mypackage2.MyClass2; // imports MyClass2 from mypackage2So instead of import program_1; you need to do
    1. ensure that program_1 is in some package
    2. ensure that your directory structure mirrors your package structure (same names!)
    3. ensure that your CLASSPATH is either not set at all or points to the parent dir of your topmost package
    Example:
    Directory structure:C:\tmp\java\top\
    C:\tmp\java\top\MyClass1.java
    C:\tmp\java\top\bottom\
    C:\tmp\java\top\bottom\MyClass2.java
    CLASSPATH=".;<java install dir>\jre\lib\rt.jar;C:\tmp\java"Source for MyClass1.java:package top;
    public class MyClass1 {
    }Source for MyClass2.java:package top.bottom;
    import top.MyClass1;
    public class MyClass2 {
      private MyClass1 myClass1;
    }

  • How do I Copy files from one directory to another?

    I know how to move files using the renameTo() method of File class, but is there a simple way to copy files, without the need of reading the input stream form one file and writing to a new one?

    Hi all,
    I ripped this off the jakarta-ant project's file copier (with a small tweak)..
    package com.museumcompany.util;
    import java.io.IOException;
    import java.io.File;
    import java.io.BufferedReader;
    import java.io.FileReader;
    import java.io.BufferedWriter;
    import java.io.FileWriter;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.lang.reflect.Method;
    import java.text.DecimalFormat;
    import java.util.Random;
    import java.util.Stack;
    import java.util.StringTokenizer;
    * This class also encapsulates methods which allow Files to be
    * refered to using abstract path names which are translated to native
    * system file paths at runtime as well as copying files or setting
    * there last modification time.
    * @author [email protected]
    * @author Conor MacNeill
    * @author Stefan Bodewig
    * @version $Revision: 1.8 $
    public class FileUtils {
    private static Random rand = new Random(System.currentTimeMillis());
    private static Object lockReflection = new Object();
    * Factory method.
    public static FileUtils newFileUtils() {
    return new FileUtils();
    * Empty constructor.
    protected FileUtils() {}
    * Convienence method to copy a file from a source to a destination.
    * Overwrite is prevented, and the last modified is kept.
    * @throws IOException
    public void copyFile(String sourceFile, String destFile) throws IOException {
    copyFile(new File(sourceFile), new File(destFile), false, true);
    * Method to copy a file from a source to a
    * destination specifying if
    * source files may overwrite newer destination files and the
    * last modified time of <code>destFile</code> file should be made equal
    * to the last modified time of <code>sourceFile</code>.
    * @throws IOException
    public void copyFile(File sourceFile, File destFile,
    boolean overwrite, boolean preserveLastModified)
    throws IOException {
    if (overwrite || !destFile.exists() ||
    destFile.lastModified() < sourceFile.lastModified()) {
    if (destFile.exists() && destFile.isFile()) {
    destFile.delete();
    // ensure that parent dir of dest file exists!
    // not using getParentFile method to stay 1.1 compat
    File parent = new File(destFile.getParent());
    if (!parent.exists()) {
    parent.mkdirs();
    FileInputStream in = new FileInputStream(sourceFile);
    FileOutputStream out = new FileOutputStream(destFile);
    byte[] buffer = new byte[8 * 1024];
    int count = 0;
    do {
    out.write(buffer, 0, count);
    count = in.read(buffer, 0, buffer.length);
    } while (count != -1);
    in.close();
    out.close();
    if (preserveLastModified) {
    destFile.setLastModified(sourceFile.lastModified());
    public File createTempFile(String prefix, String suffix, File parentDir) {
    File result = null;
    DecimalFormat fmt = new DecimalFormat("#####");
    synchronized (rand) {
    do {
    result = new File(parentDir,
    prefix + fmt.format(rand.nextInt())
    + suffix);
    } while (result.exists());
    return result;

  • CREATE_DEEP_ENTITY : Multiple Return Values

    Hello,
    My requirement is to pass some item data to web service & then i use FM to create a Item id for each item passed. So, if i have passed 10 items in input, 10 item ids will be created.
    in SEGW model, i have created a entity type ENT1 that has fields Item id & item name ( This is the info i want WS to return in response). Other entity type ENT2 has item data information or fields that i want to input to web service. Then i created a navigation from ENT1 to ENT2 with cardinality as M:N.
    So, now if i pass 10 Items info in input, i should get back in response 10 item ids with their name. I hope my requirement is clear.
    Then, i have used method CREATE_DEEP_ENTITY to create items & then i have all the items created & their name in an internal table. Then i use below method to send this table in response:
    copy_data_to_ref(
                 EXPORTING
                 is_data = lt_created_items
                 CHANGING
                 cr_data = er_deep_entity
    My issue is that i don't see any item in response if i pass here a table in IS_data but if i pass a work area, then thats returned in response.
    What could be the reason & how can i solve this?
    Regards
    Gaurav K

    Hello Gaurav,
    That is because the navigation property defined in the model for a particular entity need to be a part of your payload.
    Explanation : consider
    Say u have an entity ITEM and entity set ITEMSet where u will be sending your item details.
    Say u have a header entity PARENT and entity set PARENTSet where u send header info.
    Say u have another entity ITEMDETAIL and entity set ITEMDETAILSet ( which will be got from your BE logic as a part of response )
    Say u have association & navigation between entities as below :
    PARENT to ITEM - 1 to N
    PARENT to ITEMDETAIL - 1 to N
    Navigation Properties :
    PARENT to ITEM - ParentItem
    PARENT to ITEMDETAIL - ParentItemDetail
    Now in Payload u would send as below  :
    JSON payload -
    "HeaderProperty1":"",
    "HeaderPropertyN":"",
    "ParentItem":[{
    < Your item info >
    With this u will fire the Deep Entity, Creation of Items happens and u will send back the response as well. i.e., deep structure holding header,items sent initially in payload and item details which u got as part of successful creation )
    But now in response u will not be able to see item details which u got as part of successful creation because the above payload will not have navigation property ParentItemDetail as part of payload so u wont see in response though u send those details as part of your deep structure
    So now solution is :
    Send the payload as below :
    "HeaderProperty1":"",
    "HeaderPropertyN":"",
    "ParentItem":[{
    < Your item info >
    "ParentItemDetail":[{
    With this u can see the item details which u got as part of successful creation along with your header and items sent initially in payload as well
    Regards,
    Ashwin

Maybe you are looking for

  • Firefox PDF links - Trying to Open in Pages

    Hi all, I have a bit of a hiccup in that every time I attempt to click on a PDF link in Firefox 3.6.3 to open the file in Preview, the system attempts to open it with pages and I receive the following error message: The document "PhotoVideo_Solicitat

  • HT4167 why won't my firewire port recognise my PreSonus Firebox

    Logic on my old macbook has decided to stop recognising my presonus firebox, even after all the latest drivers etc have been added. It just isn't showing up as an input or output option, yet is still lit up by the firewire cable....help!

  • Compress or reduce file size

    This is a pretty basic question but I have never had this issue before. I have an mpeg file (mpeg1 muxed codec) of 18mb which is too big to email. What's the best way of either decreasing the file size or compressing it? Also, I seem to think that ne

  • You cannot burn the disc because you do not have permission to do so...

    Just completed the upgrade from Tiger to Leopard yesterday, and I'm getting this error whenever some of the accounts on the system (that are managed accounts in the parental controls window) ry and burn CDs. I have verified that the account has permi

  • PreparedStatement.close() hangs, blocking finalization

    We encountered an incident on a production system with a class that would call PreparedStatement.close() on finalize(), and there was an instance where the jvm finalizer thread stalled on this the PreparedStatement.close() call, blocking garbage coll